diff --git a/incubator/sparkoperator/Chart.yaml b/incubator/sparkoperator/Chart.yaml index 379bf02cb4..b9bb549ee7 100644 --- a/incubator/sparkoperator/Chart.yaml +++ b/incubator/sparkoperator/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: sparkoperator description: A Helm chart for Spark on Kubernetes operator -version: 0.4.1 +version: 0.4.2 appVersion: v1beta2-1.0.1-2.4.4 keywords: - spark diff --git a/incubator/sparkoperator/README.md b/incubator/sparkoperator/README.md index da131e29c4..9f5af78834 100644 --- a/incubator/sparkoperator/README.md +++ b/incubator/sparkoperator/README.md @@ -44,5 +44,6 @@ The following table lists the configurable parameters of the Spark operator char | `enableBatchScheduler` | Whether to enable batch scheduler for pod scheduling | false | | `enableResourceQuotaEnforcement` | Whether to enable the ResourceQuota enforcement for SparkApplication resources. Requires the webhook to be enabled by setting enableWebhook to true. | false | | `enableLeaderElection` | Whether to enable leader election when the operator Deployment has more than one replica, i.e., when `replicas` is greater than 1. | false | +| `securityContext` | Defines security context for operator container | `{}` Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. diff --git a/incubator/sparkoperator/templates/spark-operator-deployment.yaml b/incubator/sparkoperator/templates/spark-operator-deployment.yaml index 09b9a9c102..04201a80bf 100644 --- a/incubator/sparkoperator/templates/spark-operator-deployment.yaml +++ b/incubator/sparkoperator/templates/spark-operator-deployment.yaml @@ -52,6 +52,12 @@ spec: - name: sparkoperator image: {{ .Values.operatorImageName }}:{{ .Values.operatorVersion }} imagePullPolicy: {{ .Values.imagePullPolicy }} + {{- if .Values.securityContext }} + securityContext: + {{- range $securityPolicy, $value := .Values.securityContext }} + {{ $securityPolicy }}: {{ $value }} + {{- end }} + {{- end }} {{- if .Values.enableWebhook }} volumeMounts: - name: webhook-certs diff --git a/incubator/sparkoperator/values.yaml b/incubator/sparkoperator/values.yaml index 96ab1d6ff1..2979efa12e 100644 --- a/incubator/sparkoperator/values.yaml +++ b/incubator/sparkoperator/values.yaml @@ -21,6 +21,8 @@ resyncInterval: 30 ingressUrlFormat: "" logLevel: 2 +securityContext: {} + enableWebhook: false webhookPort: 8080