Skip to content

Commit

Permalink
Merge pull request openshift#14636 from openshift-cherrypick-robot/ch…
Browse files Browse the repository at this point in the history
…erry-pick-14604-to-release-4.16

[release-4.16] OCPBUGS-46567: ImagePullSecret getting duplicated when editing DeploymentConfig in Form View
  • Loading branch information
openshift-merge-bot[bot] authored Jan 17, 2025
2 parents 2380f02 + 769ff2b commit de0a2d1
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,12 @@ export const convertEditFormToDeployment = (
containers: getUpdatedContainers(containers, fromImageStreamTag, isi, imageName, envs),
imagePullSecrets: [
...(deployment.spec.template.spec.imagePullSecrets ?? []),
...(imagePullSecret ? [{ name: imagePullSecret }] : []),
...(imagePullSecret &&
!(deployment.spec.template.spec.imagePullSecrets ?? []).some(
(secret) => secret.name === imagePullSecret,
)
? [{ name: imagePullSecret }]
: []),
],
},
},
Expand Down

0 comments on commit de0a2d1

Please sign in to comment.