Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more specific deployment #10

Open
arohner opened this issue Sep 13, 2016 · 1 comment
Open

more specific deployment #10

arohner opened this issue Sep 13, 2016 · 1 comment

Comments

@arohner
Copy link

arohner commented Sep 13, 2016

I have a couple of concerns about how to specify versions using k8s-deploy. I'd be happy to make changes, just want to lay out my case and get feedback first.

  • k8s-deploy works by seding :latest out of a deployment file. This is overly broad, because it doesn't allow two images with the version :latest
  • in production, services should not be using the latest tag for images at all, IMO. They should use either a branch name, like production, or a specific build id, like a commit sha or branch+buildnum, like production-123.

proposal:

  • in deploy-service, make the sed specific enough to match a single image, like image: ${DOCKER_IMAGE}:(.+)$
  • capture the image tag in the sed expression, so the existing script is free to use a value other than latest in the checked-in deployment.yml
@rosskukulinski
Copy link
Owner

Hi @arohner - good feedback.

Do you have an example of using multiple images using :latest in the same deployment that you would want to SED to different values? I would think that's not that common.

FWIW, I'm being defensive about that because I'm leveraging this behavior to trigger rolling deploys of apps when their underlying configmap changes (https://github.com/cloudytimemachine/gateway/blob/master/deploy/gateway.deployment.yml#L26)

In that app, I'm using the same nginx image for every release, but the relevant configmap changes on each deploy. To force kubernetes to do a rolling deploy, I need to modify the Deployment object... and I'm using ENV for this. It's a hack, I'm not happy about it, but it works.

I DO agree that being able to specific the image tag in the sed expression would be more explicit. Maybe if you don't specify (in the configfile?), then we default to :latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants