Skip to content

Commit 901d520

Browse files
authored
Merge pull request #7846 from bengentil/ben/tilt-securitycontext
🌱 tilt: remove securityContext for live_update
2 parents c8d46b2 + 850794a commit 901d520

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hack/tools/tilt-prepare/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,12 @@ func prepareWorkload(name, prefix, binaryName, containerName string, objs []unst
775775
cmd := []string{"sh", "/start.sh", "/" + binaryName}
776776
args := append(container.Args, []string(ts.ExtraArgs[name])...)
777777

778+
// remove securityContext for tilt live_update, see https://github.com/tilt-dev/tilt/issues/3060
779+
container.SecurityContext = nil
780+
// ensure it's also removed from the pod template matching this container
781+
// setting this outside the loop would means altering every deployments
782+
d.Spec.Template.Spec.SecurityContext = nil
783+
778784
// alter deployment for working nicely with delve debugger;
779785
// most specifically, configuring delve, starting the manager with profiling enabled, dropping liveness and
780786
// readiness probes and disabling leader election.

0 commit comments

Comments
 (0)