Doppler Kubernetes Operator - 'reload' annotation reloads all my pods

Hey Doppler community! :wave:

I’m using Doppler’s k8s operator to sync my secrets on my clusters, and since some weeks ago when I apply changes on a project referencing secrets in others projects (umbrella structure) it reloads all my deployments (with secrets.doppler.com/reload: "true") even child projects which don’t use any of the updated secrets.

It wasn’t the case before, only pods with updated secrets in corresponding projects got reloaded…

Here’s an example, if I edit ENV_TWO, front/backend deployments (which don’t reference this secret) get reloaded anyway. Use case below

# main project (dev)
ENV_ONE = foo
ENV_TWO = bar
ENV_THREE = bob

# frontend project
MY_VAR = ${main.dev.ENV_ONE}

# backend project
MY_VAR = ${main.dev.ENV_THREE}

The deployments only use their corresponding project in envFrom

I’m expecting the operator to only reload impacted deployments.

What can I do?

Thanks in advance

Hi @Grraahaam, thanks for the report!

I’ve reproduced this and have implemented a fix that will be included in our next release (scheduled for either this week or next week). The fix was server-side, so you won’t need to update the k8s operator.

I do want to note that the guarantee Doppler provides is that if a change has happened, we will definitely respond as such (with an HTTP 200), but there may be instances where we respond with a 200 instead of a 304 even if nothing has changed, so you shouldn’t rely on that explicitly.

Cheers,
Andre

1 Like

Hey @apazzolini !

Thanks for taking the time to fix this!

I’m curious about why before, when I updated only ENV_ONE (or any references) or created/updated/deleted a secret in the backend project (e.g. the example in the first post), only the backend deployment got restarted… :thinking:

The above behaviour is actually what I’d like to keep, it’s great! Only restarts the required k8s resources

If your internal fix resolve the issue, then fine, it’s perfect! If not, could you explain how could I achieve the above? Thanks

Cheers!

The internal fix will restore it to the behavior you’re requesting, which is the desired behavior. :+1: (You were seeing extraneous deploys due to a regression on our end)

1 Like

FYI @Grraahaam this fix has been released, so you should no longer see those extra restarts.

1 Like