Skip to content
This repository was archived by the owner on Sep 13, 2025. It is now read-only.

Conversation

@murog
Copy link
Contributor

@murog murog commented Apr 8, 2019

Fixes issue #48

Clean up

  • renamed service-web.yaml to web-service.yaml

@murog murog requested a review from davidstanke April 8, 2019 23:57
# update images in k8s config to point to project's container registry
kustomize edit set image USER-REPO/web=gcr.io/$PROJECT_ID/web:latest
kustomize edit set image USER-REPO/mysql=gcr.io/$PROJECT_ID/mysql:latest
# save output to _config.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! One question (note that I'm not very familiar with kustomize): is it possible to overwrite the configs in place? If we could do that, we wouldn't have to save a new file. Not a big deal of course but it would be a little cleaner.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not as far as I can tell unfortunately. kustomize buildcan be used in a couple ways:
kustomize build . : prints output
kustomize build . > temp.yaml : save output to temp
kustomize build . | kubectl apply -f - apply output

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kustomize cloud builder has kubectl but I think it would make it harder to follow because it would require some extra env variables or gcloud get-credentials command.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flipping the script! I just learned that kubectl now has kustomize built-in. If I read this correctly, we can patch the config and deploy the app in one command. I haven't tried it yet, though, and IDK if cloud-builders has a new enough version of kubectl for this to work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! will look into it, there might be a version issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cloud-builders uses kubectl gcloud component which is 1.11
https://cloud.google.com/sdk/docs/release-notes

Google Kubernetes Engine kubectl is updated to 1.11.9. Addresses security vulnerability: CVE-2019-1002101.

https://github.com/GoogleCloudPlatform/cloud-builders/blob/master/kubectl/Dockerfile

RUN /builder/google-cloud-sdk/bin/gcloud -q components install kubectl

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants