Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mathis-marcotte committed Feb 11, 2025
2 parents e39dc95 + b09c631 commit 591db0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,20 +189,20 @@ func updateWorkingVolumeMounts(targetContainerSpec []corev1.Container, isFirst b
patch = append(patch, patchOperation{
Op: "add",
// the path for only the first value
Path: "/spec/containers/0/volumeMounts",
Path: fmt.Sprintf("/spec/containers/%d/volumeMounts", key),
Value: mapSlice,
})
} else {
patch = append(patch, patchOperation{
Op: "add",
// Now that there is one that has created an array, this can just go after it.
Path: "/spec/containers/0/volumeMounts/-",
Path: fmt.Sprintf("/spec/containers/%d/volumeMounts/-", key),
Value: credsCache,
})
patch = append(patch, patchOperation{
Op: "add",
// Now that there is one that has created an array, this can just go after it.
Path: "/spec/containers/0/volumeMounts/-",
Path: fmt.Sprintf("/spec/containers/%d/volumeMounts/-", key),
Value: kerbConf,
})
}
Expand Down

0 comments on commit 591db0f

Please sign in to comment.