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

KUDO 0.10.0 does not perform rolling update if ConfigMap changes #1302

Closed
ANeumann82 opened this issue Jan 23, 2020 · 5 comments · Fixed by #1308
Closed

KUDO 0.10.0 does not perform rolling update if ConfigMap changes #1302

ANeumann82 opened this issue Jan 23, 2020 · 5 comments · Fixed by #1308
Assignees
Labels

Comments

@ANeumann82
Copy link
Member

What happened:
When updating an operator with a specific param that updates only a ConfigMap, the StatefulSet that references this ConfigMap does not get restarted.

What you expected to happen:
The StatefulSet referencing the updated ConfigMap should perform a rollingUpdate

How to reproduce it (as minimally and precisely as possible):

  • Have an operator with a configMap and a stateful set. Let the StatefulSet use the ConfigMap.
  • Deploy the operator
  • Run `kudo update --instance -p <PARAM_IN_CONFIGMAP>=SomeNewValue
  • The ConfigMap is updated, but the StatefulSet does not restart.

Anything else we need to know?:
From what I figured out, this is an issue from removing Kustomize to render templates and enhance them with metadata (labels and annotations):

Before the update, Kustomize would add annotations and labels to the rendered statefulset, including the statefulset.spec.template.metadata. As this is a change to the spec in the StatefulSet, it would trigger a restart of the STS.

With the new code, we only set the metadata on the statefulSet itself, not on the template for the Pods, and therefore we don't trigger the restart anymore.

Environment:

  • Kudo version (use kubectl kudo version): 0.10.0
@ANeumann82
Copy link
Member Author

Related to #1303

@alenkacz
Copy link
Contributor

oh, good catch! :) so maybe we removed kustomize prematurely after all? We should really test this functionality...

@ANeumann82
Copy link
Member Author

Well, removing kustomize is fine, I think, we just need to apply the metadata recursivly, the same as kustomize did.

@alenkacz
Copy link
Contributor

@ANeumann82 I wonder if we're not reimplementing kustomize then... depends on how complex looking for those places recursively is. I guess it's still better than kustomize as dep :)

@zmalik zmalik self-assigned this Jan 24, 2020
ANeumann82 added a commit that referenced this issue Jan 24, 2020
Fixes #1302 #1303

Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
@ANeumann82
Copy link
Member Author

@alenkacz I've created a PR that applies the metadata recursively, it's not too much code.

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

Successfully merging a pull request may close this issue.

3 participants