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

Pods restart every time the chart is deployed #121

Closed
futureviperowner opened this issue Jun 5, 2020 · 7 comments · Fixed by kubernetes-sigs/secrets-store-csi-driver#240 or #194
Closed
Labels
bug Something isn't working helm
Milestone

Comments

@futureviperowner
Copy link

What steps did you take and what happened:
As part of integrating this module with our CI/CD pipeline, we're configuring it to do a helm deployment of the CSI driver chart every time the pipeline is run. However, I've noticed that the pods restart every single time this is done even when nothing about the configuration changes.

Is there a good reason for this? At least one of the pods can take several minutes to terminate and restart.

What did you expect to happen:
Pods should only restart if changes are required to the deployment.

Which access mode did you use to access the Azure Key Vault instance:
Service Principal

Environment:

  • Secrets Store CSI Driver version: v0.0.11
  • Azure Key Vault provider version: 0.0.6
  • Kubernetes version: 1.16.6
  • Cluster type: AKS
@futureviperowner futureviperowner added the bug Something isn't working label Jun 5, 2020
@aramase
Copy link
Member

aramase commented Jun 5, 2020

@doug-papenthien-by How are you redeploying every time in the CI? If the chart already exists and is redeployed, then the helm revision # changes every time. Since helm revision # is used as a label in all the daemonsets, k8s detects changes in the daemonset metadata and restarts all the pods.

  labels:
    app: secrets-store-csi-driver
    app.kubernetes.io/managed-by: Helm
    chart: secrets-store-csi-driver
    chartVersion: 0.0.11
    heritage: Helm
    release: csi
    revision: "2"

@futureviperowner
Copy link
Author

We're using helm upgrade --install .... Normally, we would only run this if something about the deployment has changed in our repo. In the case of the CSI driver, we just need to make sure it's installed in the target environment before attempting our deployment. We can script something to make sure this is only done if it's not already deployed (or we're upgrading the chart version), but this seems contrary to letting helm manage it for us.

Is there a reason those labels are included in the daemonsets? If I do a helm create with helm 3 to create the skeleton of a new chart, it does not include chartVersion, heritgate, release, or revision labels.

@aramase
Copy link
Member

aramase commented Jun 5, 2020

@doug-papenthien-by I went through the helm best practices too and you are right. The revision and heritage are redundant information thats not required and isn't part of recommended labels by helm. We'll remove those from the helm chart as part of next releases.

@aramase aramase added the helm label Jun 5, 2020
@aramase
Copy link
Member

aramase commented Jun 5, 2020

Tracker issue - kubernetes-sigs/secrets-store-csi-driver#226

@danquah
Copy link

danquah commented Aug 17, 2020

Any news on when version 0.0.13 of secrets-store-csi-driver is going to be released, and subsequently, when the secrets-store-csi-driver-provider-azure chart will bump its dependency on it?

@aramase
Copy link
Member

aramase commented Aug 17, 2020

@danquah The release was postponed to this week because of test issues. We're planning to release the new driver and helm charts this week.

@danquah
Copy link

danquah commented Aug 17, 2020

Sounds great 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working helm
Projects
None yet
3 participants