Skip to content

Commit

Permalink
allow pod sec context to be overriden
Browse files Browse the repository at this point in the history
  • Loading branch information
Stavros Kontopoulos committed Jun 21, 2019
1 parent 6fc5123 commit 28bf15a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/webhook/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,11 @@ func patchSparkPod(pod *corev1.Pod, app *v1beta1.SparkApplication) []patchOperat
}
}

if pod.Spec.SecurityContext == nil {
op := addSecurityContext(pod, app)
if op != nil {
patchOps = append(patchOps, *op)
}
op = addSecurityContext(pod, app)
if op != nil {
patchOps = append(patchOps, *op)
}

op = addGPU(pod, app)
if op != nil {
patchOps = append(patchOps, *op)
Expand Down

0 comments on commit 28bf15a

Please sign in to comment.