Skip to content

Commit

Permalink
added privileged to static pod args
Browse files Browse the repository at this point in the history
  • Loading branch information
luthermonson committed Jul 14, 2021
1 parent dd3f666 commit d2207cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/podexecutor/staticpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,11 @@ func (s *StaticPodConfig) KubeProxy(args []string) error {
}

return staticpod.Run(s.ManifestsDir, staticpod.Args{
Command: "kube-proxy",
Args: args,
Image: image,
CPUMillis: 250,
Command: "kube-proxy",
Args: args,
Image: image,
CPUMillis: 250,
Privileged: true,
})
}

Expand Down
4 changes: 4 additions & 0 deletions pkg/staticpod/staticpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type Args struct {
CPUMillis int64
SecurityContext *v1.PodSecurityContext
Annotations map[string]string
Privileged bool
}

func Run(dir string, args Args) error {
Expand Down Expand Up @@ -121,6 +122,9 @@ func pod(args Args) (*v1.Pod, error) {
Spec: v1.PodSpec{
Containers: []v1.Container{
{
SecurityContext: &v1.SecurityContext{
Privileged: &args.Privileged,
},
Command: append([]string{args.Command}, args.Args...),
Image: args.Image.Name(),
ImagePullPolicy: v1.PullIfNotPresent,
Expand Down

0 comments on commit d2207cc

Please sign in to comment.