diff --git a/incubator/sparkoperator/README.md b/incubator/sparkoperator/README.md index 7089720a66..7cd6ac35d5 100644 --- a/incubator/sparkoperator/README.md +++ b/incubator/sparkoperator/README.md @@ -26,7 +26,6 @@ The following table lists the configurable parameters of the Spark operator char | `operatorImageName` | The name of the operator image | `gcr.io/spark-operator/spark-operator` | | `operatorVersion` | The version of the operator to install | `v2.3.1-v1alpha1-latest` | | `sparkJobNamespace` | K8s namespace where Spark jobs are to be deployed. | `default` | -| `createSparkJobNamespace` | Whether to create the Spark job namespace | false | | `enableWebhook` | Whether to enable mutating admission webhook | true | | `enableMetrics` | Whether to expose metrics to be scraped by Premetheus | true | diff --git a/incubator/sparkoperator/templates/spark-namespace.yaml b/incubator/sparkoperator/templates/spark-namespace.yaml deleted file mode 100644 index f9beb4929f..0000000000 --- a/incubator/sparkoperator/templates/spark-namespace.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{ if .Values.createSparkJobNamespace }} -apiVersion: v1 -kind: Namespace -metadata: - name: {{ .Values.sparkJobNamespace }} - labels: - app.kubernetes.io/name: {{ include "sparkoperator.name" . }} - helm.sh/chart: {{ include "sparkoperator.chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/managed-by: {{ .Release.Service }} -{{ end }} diff --git a/incubator/sparkoperator/templates/spark-operator-deployment.yaml b/incubator/sparkoperator/templates/spark-operator-deployment.yaml index 45eaea70f3..12292d3a63 100644 --- a/incubator/sparkoperator/templates/spark-operator-deployment.yaml +++ b/incubator/sparkoperator/templates/spark-operator-deployment.yaml @@ -56,26 +56,16 @@ spec: - containerPort: 10254 {{ end }} command: ["/usr/bin/spark-operator"] - {{- if and (.Values.enableMetrics) (.Values.enableWebhook) }} args: + - -logtostderr + - -namespace={{ .Values.sparkJobNamespace }} + {{- if .Values.enableMetrics }} - -enable-metrics=true - -metrics-labels=app_type + {{- end }} + {{- if .Values.enableWebhook }} - -enable-webhook=true - -webhook-svc-namespace={{ .Release.Namespace }} - -webhook-svc-name={{ include "sparkoperator.fullname" . }}-webhook - - -logtostderr - {{- else if (.Values.enableMetrics) }} - args: - - -enable-metrics=true - - -metrics-labels=app_type - - -logtostderr - {{- else if (.Values.enableWebhook) }} - args: - - -enable-webhook=true - - -webhook-svc-namespace={{ .Release.Namespace }} - - -webhook-svc-name={{ include "sparkoperator.fullname" . }}-webhook - - -logtostderr - {{- else }} - args: - - -logtostderr + - -webhook-config-name={{ include "sparkoperator.fullname" . }}-webhook-config {{- end }} diff --git a/incubator/sparkoperator/templates/spark-operator-rbac.yaml b/incubator/sparkoperator/templates/spark-operator-rbac.yaml index d87403cbb9..3ff3f9ae12 100644 --- a/incubator/sparkoperator/templates/spark-operator-rbac.yaml +++ b/incubator/sparkoperator/templates/spark-operator-rbac.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: sparkoperator-cr + name: {{ include "sparkoperator.fullname" . }}-cr labels: app.kubernetes.io/name: {{ include "sparkoperator.name" . }} helm.sh/chart: {{ include "sparkoperator.chart" . }} @@ -34,7 +34,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: sparkoperator-crb + name: {{ include "sparkoperator.fullname" . }}-crb namespace: {{ .Release.Namespace }} labels: app.kubernetes.io/name: {{ include "sparkoperator.name" . }} @@ -47,6 +47,6 @@ subjects: namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole - name: sparkoperator-cr + name: {{ include "sparkoperator.fullname" . }}-cr apiGroup: rbac.authorization.k8s.io {{- end }} diff --git a/incubator/sparkoperator/values.yaml b/incubator/sparkoperator/values.yaml index 91428f3d13..f375959420 100644 --- a/incubator/sparkoperator/values.yaml +++ b/incubator/sparkoperator/values.yaml @@ -1,6 +1,5 @@ -operatorImageName: gcr.io/spark-operator/spark-operator -operatorVersion: v2.4.0-v1alpha1-latest -sparkJobNamespace: default +operatorImageName: lightbend/sparkoperator +operatorVersion: test imagePullPolicy: IfNotPresent @@ -15,7 +14,7 @@ serviceAccounts: create: true name: -createSparkJobNamespace: false +sparkJobNamespace: default enableWebhook: true enableMetrics: true