Skip to content

Conversation

paretl
Copy link

@paretl paretl commented Mar 20, 2025

Based on a need that we currently have, this PR adds the modification of the imagePullSecrets of a pod where an image have been updated. It permits to avoid adding (or missing 😄) this secret on all the releases/deployments of a kube cluster using the harbor mutating webhook

It adds the boolean parameter replaceImagePullSecrets in the configuration which will be used with authSecretName to add this secret to the imagePullSecrets of the pod. To avoid any errors, it keep the existing secrets that are already in imagePullSecrets and only adds the new one.

I'm not a Go expert, so feel free to give me feedbacks and improvements that can be made on the code.

#52

@paretl paretl force-pushed the add-imagePullSecrets branch from 7260b73 to fc45cff Compare March 20, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant