Skip to content

Deployments require manual rollout when configmap and secret change #116

Open

Description

@JeffCook-Alethea

I have noticed that when making updated to the values that affect the ConfigMap and/or Secret the deployment needs to be rollout restarted

kubectl rollout restart deployment/

If the pod spec contained the sha hash of the configmap and secret it would automatically rollout.

https://v3.helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments

kind: Deployment
spec:
  template:
    metadata:
      annotations:
        checksum/configmap: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }}
        checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}

Activity

  1. levkk commented on Jul 6, 2026

    @levkk
    Contributor

    This is by design! Most config options can be reloaded online without pod restarts.

  2. JeffCook-Alethea commented on Jul 6, 2026

    @JeffCook-Alethea
    Author

    This is by design! Most config options can be reloaded online without pod restarts.

    Should there be a log entry to say the config was reloaded?

  3. JeffCook-Alethea commented on Jul 6, 2026

    @JeffCook-Alethea
    Author

    I just changed a user password and the new password didn't work until I restarted the pods.

  4. levkk commented on Jul 6, 2026

    @levkk
    Contributor
  5. JeffCook-Alethea commented on Jul 6, 2026

    @JeffCook-Alethea
    Author

    I don't see checkoutTimeout in the values.yaml file?

    I had tried for a few minutes before I restarted the pod.

    I'm using v0.68

  6. levkk commented on Jul 6, 2026

    @levkk
    Contributor

    Seems to be there: https://github.com/search?q=repo%3Apgdogdev%2Fhelm%20checkoutTimeout&type=code. values.yaml doesn't need to have all defaults - pgdog has them already, and the chart doesn't need to configure all settings, just the ones you care about.

    Kube is odd, it takes a few minutes to sync the ConfigMap to the pods. You need to monitor the disk for changes, unfortunately, and only once you see the new config loaded, you can hit reload. It's kinda annoying, but you can make it work with a bash / python script.

    FWIW, you can fork the chart and make it redeploy on config changes. It's not in main because it's not something most people would want because it breaks app --> pgdog connections, which is noisy / can cause downtime.

    We also built a monitor / automatic reload trigger into the enterprise edition, if you're curious: https://docs.pgdog.dev/enterprise_edition/

  7. JeffCook-Alethea commented on Jul 7, 2026

    @JeffCook-Alethea
    Author

    I also set readWriteSplit in the values file. After 5 minutes it was still not respecting the new setting. I bounced the pod and it started working.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions