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

Trigger to redeploy containers when a secret changes #7019

Closed
danni opened this issue Feb 4, 2016 · 17 comments
Closed

Trigger to redeploy containers when a secret changes #7019

danni opened this issue Feb 4, 2016 · 17 comments

Comments

@danni
Copy link

danni commented Feb 4, 2016

Updating a secret should redeploy all deployments who mount that secret so that the latest version of the secret is automatically reflected in the cluster.

@0xmichalis
Copy link
Contributor

We should consider a solution similar to the outcome of kubernetes/kubernetes#22368.

cc: @smarterclayton @ironcladlou

@mwoodson
Copy link

mwoodson commented May 2, 2016

We have run into this issue in Openshift Ops. We change secrets, but nothing redeploys. Then, our service is broken.

@0xmichalis
Copy link
Contributor

cc: @mfojtik @legionus relevant to the discussion we had today.

@mfojtik
Copy link
Member

mfojtik commented Aug 26, 2016

@Kargakis i wonder how you will trigger a new deployment in kube when the secret changes (without changing the PodSpec).

@0xmichalis
Copy link
Contributor

@Kargakis i wonder how you will trigger a new deployment in kube when the secret changes (without changing the PodSpec).

See kubernetes/kubernetes#22368 (comment)

@mfojtik
Copy link
Member

mfojtik commented Aug 26, 2016

@Kargakis so ConfigMap will have version and you will refer to it in podSpec?

@0xmichalis
Copy link
Contributor

@Kargakis so ConfigMap will have version and you will refer to it in podSpec?

There are two options discussed. IIUC:

  1. Config map template is inlined in the deployment just like the pod template spec. A change to the config map template will make the deployment controller create a new config map, mount it in the deployment, profit.
  2. User creates a config map and adds an owner reference to it.
oc create configmap registry --owner=dc/registry --from-file=config.yml

The deployment controller watches for config maps, spots the owner reference, mounts that cm in the deployment it references, profit.

I am in favor of the second option as it solves secret updates too whereas with 1. we would need to additionally inline a secrets template in the deployment and overbloat the resource. Let's join the discussion upstream.

@liggitt
Copy link
Contributor

liggitt commented Aug 26, 2016

ownerReferences don't have the infomation you need to create the mount. It also means that if the dc is deleted, the configmap is deleted

@0xmichalis
Copy link
Contributor

ownerReferences don't have the infomation you need to create the mount.

What more do you need than a reference?

It also means that if the dc is deleted, the configmap is deleted

If the configmap is not shared, then it makes sense to me. If you want the config map to stay around, you will have to remove the owner reference (if that's possible).

@0xmichalis
Copy link
Contributor

What more do you need than a reference?

The path can be provided in the deployment.

@smarterclayton
Copy link
Contributor

This should be part of the generic trigger controller, and must be level
driven. We probably can't afford to do a one off solution for each type of
thing we want to trigger on.

On Fri, Aug 26, 2016 at 4:39 PM, Michail Kargakis notifications@github.com
wrote:

What more do you need than a reference?

The path can be provided in the deployment.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#7019 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG_p8jcSGMWYvp3ITdekHR3W__AcCfVks5qj08JgaJpZM4HTAua
.

@0xmichalis
Copy link
Contributor

Triggers is what I have been thinking. Users specify a ConfigMapTrigger that optionally holds a mount path and a container name and when the controller notices a CM that holds a foo deployment reference, it mounts that map in foo. Same story about secrets.

@liggitt
Copy link
Contributor

liggitt commented Aug 27, 2016

We already have a way to specify mount information in the spec. Don't duplicate that in the triggers. The triggers should just have the name of the thing you want to trigger on.

@smarterclayton
Copy link
Contributor

smarterclayton commented Aug 27, 2016 via email

@0xmichalis
Copy link
Contributor

Trello'd: https://trello.com/c/C8HTTOob/909-secret-change-trigger

@micw
Copy link

micw commented Dec 11, 2018

Edit: removed, wrong issue tracker ^^ sorry.

@exhuma
Copy link

exhuma commented Jul 2, 2019

Has this ever been solved? Trello shows a "sign-up" popup and then redirects to the default board, making it impossible to read the card details.

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

No branches or pull requests

10 participants