Skip to content

Commit

Permalink
chore(k8s): push imagePullSecrets to existing for sync mode (#6531)
Browse files Browse the repository at this point in the history
  • Loading branch information
twelvemo authored Oct 11, 2024
1 parent b556571 commit 04de6e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/plugins/kubernetes/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ export async function configureSyncMode({
if (!podSpec.initContainers) {
podSpec.initContainers = []
}
if (!podSpec.imagePullSecrets) {
podSpec.imagePullSecrets = []
}
const k8sSyncUtilImageName = getK8sSyncUtilImageName()
if (!podSpec.initContainers.find((c) => c.image === k8sSyncUtilImageName)) {
const initContainer: V1Container = {
Expand All @@ -476,7 +479,7 @@ export async function configureSyncMode({
volumeMounts: [gardenVolumeMount],
}
podSpec.initContainers.push(initContainer)
podSpec.imagePullSecrets = provider.config.imagePullSecrets
podSpec.imagePullSecrets.push(...provider.config.imagePullSecrets)
}

if (!targetContainer.volumeMounts) {
Expand Down

0 comments on commit 04de6e6

Please sign in to comment.