Skip to content

Commit 9f1e144

Browse files
fix: check all containers for sidecar proxy
1 parent b321992 commit 9f1e144

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

internal/workload/podspec_updates.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,9 @@ func (u *Updater) CheckWorkloadContainers(wl *PodWorkload, matches []*cloudsqlap
226226
for _, p := range matches {
227227
wantName := ContainerName(p)
228228
var found bool
229-
for _, c := range wl.PodSpec().Containers {
229+
podSpec := wl.PodSpec()
230+
allContainers := append(podSpec.Containers, podSpec.InitContainers...)
231+
for _, c := range allContainers {
230232
if c.Name == wantName {
231233
found = true
232234
}

0 commit comments

Comments
 (0)