This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 9400fe3  [SPARK-49623] Refactor prefix `appResources` to 
`workloadResources`
9400fe3 is described below

commit 9400fe3bdaac2207a930d8ec0d25e90f0486b030
Author: zhou-jiang <[email protected]>
AuthorDate: Thu Sep 12 17:11:38 2024 -0700

    [SPARK-49623] Refactor prefix `appResources` to `workloadResources`
    
    ### What changes were proposed in this pull request?
    
    This PR refactors previous `appResources` to `workloadResources` for helm 
chart / template / values to avoid confusion.
    
    ### Why are the changes needed?
    
    In operator helm chart, prefix / group `appResources` was introduced to 
indicate the resources are created for Spark workloads whereas other resources 
are serving the operator deployment itself.
    
    As we extend the support to cover `SparkCluster`, the naming becomes 
confusing as the resources in fact serve both `SparkApp` and `SparkCluster`. 
Thus, this PR aims to refactor the naming prefix to cover the new resource in a 
more general fashion.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No - not yet released
    
    ### How was this patch tested?
    
    CI + Helm chart test.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No
    
    Closes #121 from jiangzho/helm.
    
    Authored-by: zhou-jiang <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .../templates/_helpers.tpl                         |  12 +-
 .../templates/app-rbac.yaml                        | 176 ---------------------
 .../templates/operator-rbac.yaml                   |  10 +-
 .../templates/tests/test-rbac.yaml                 |   5 +-
 .../templates/workload-rbac.yaml                   | 176 +++++++++++++++++++++
 .../helm/spark-kubernetes-operator/values.yaml     |  43 ++---
 tests/e2e/helm/dynamic-config-values.yaml          |   4 +-
 7 files changed, 214 insertions(+), 212 deletions(-)

diff --git a/build-tools/helm/spark-kubernetes-operator/templates/_helpers.tpl 
b/build-tools/helm/spark-kubernetes-operator/templates/_helpers.tpl
index e8ee901..587c833 100644
--- a/build-tools/helm/spark-kubernetes-operator/templates/_helpers.tpl
+++ b/build-tools/helm/spark-kubernetes-operator/templates/_helpers.tpl
@@ -94,11 +94,11 @@ Create the path of the operator image to use
 {{- end }}
 
 {{/*
-List of Spark app namespaces. If not provied in values, use the same namespace 
as operator
+List of Spark workload namespaces. If not provied in values, use the same 
namespace as operator
 */}}
-{{- define "spark-operator.appNamespacesStr" -}}
-{{- if index (.Values.appResources.namespaces) "data" }}
-{{- $ns_list := join "," .Values.appResources.namespaces.data }}
+{{- define "spark-operator.workloadNamespacesStr" -}}
+{{- if index (.Values.workloadResources.namespaces) "data" }}
+{{- $ns_list := join "," .Values.workloadResources.namespaces.data }}
 {{- printf "%s" $ns_list }}
 {{- else }}
 {{- printf "%s" .Release.Namespace }}
@@ -113,8 +113,8 @@ Default property overrides
 spark.kubernetes.operator.namespace={{ .Release.Namespace }}
 spark.kubernetes.operator.name={{- include "spark-operator.name" . }}
 spark.kubernetes.operator.dynamicConfig.enabled={{ 
.Values.operatorConfiguration.dynamicConfig.enable }}
-{{- if .Values.appResources.namespaces.overrideWatchedNamespaces }}
-spark.kubernetes.operator.watchedNamespaces={{ include 
"spark-operator.appNamespacesStr" . | trim }}
+{{- if .Values.workloadResources.namespaces.overrideWatchedNamespaces }}
+spark.kubernetes.operator.watchedNamespaces={{ include 
"spark-operator.workloadNamespacesStr" . | trim }}
 {{- end }}
 {{- end }}
 
diff --git a/build-tools/helm/spark-kubernetes-operator/templates/app-rbac.yaml 
b/build-tools/helm/spark-kubernetes-operator/templates/app-rbac.yaml
deleted file mode 100644
index 1ae62d9..0000000
--- a/build-tools/helm/spark-kubernetes-operator/templates/app-rbac.yaml
+++ /dev/null
@@ -1,176 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-{{/*
-RBAC rules used to create the app (cluster)role based on the scope
-*/}}
-{{- define "spark-operator.appRbacRules" }}
-rules:
-  - apiGroups:
-      - ""
-    resources:
-      - pods
-      - services
-      - configmaps
-      - persistentvolumeclaims
-    verbs:
-      - '*'
-{{- end }}
-
-{{/*
-RoleRef for app service account rolebindings
-*/}}
-{{- define "spark-operator.appRoleRef" }}
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-{{- if .Values.appResources.clusterRole.create }}
-  kind: ClusterRole
-  name: {{ .Values.appResources.clusterRole.name }}
-{{- else }}
-  kind: Role
-  name: {{ .Values.appResources.role.name }}
-{{- end }}
-{{- end }}
-
-{{/*
-Labels and annotations to be applied
-*/}}
-{{- define "spark-operator.appLabels" -}}
-  {{- with .Values.appResources.labels }}
-    {{- toYaml . | nindent 4 }}
-  {{- end }}
-  {{- include "spark-operator.commonLabels" . | nindent 4 }}
-{{- end }}
-
-{{- define "spark-operator.appAnnotations" -}}
-  {{- with .Values.appResources.annotations }}
-    {{- toYaml . | nindent 4 }}
-  {{- end }}
-{{- end }}
-
-{{- define "spark-operator.appLabelsAnnotations" }}
-  labels:
-  {{ template "spark-operator.appLabels" $ }}
-  annotations:
-  {{ template "spark-operator.appAnnotations" $ }}
-{{- end }}
----
-{{- $appResources := .Values.appResources -}}
-{{- $systemNs := .Release.Namespace -}}
-{{- $operatorRbac := .Values.operatorRbac -}}
-{{- if index (.Values.appResources.namespaces) "data" }}
-{{- range $appNs := .Values.appResources.namespaces.data }}
-{{- if $appResources.namespaces.create }}
-apiVersion: v1
-kind: Namespace
-metadata:
-  name: {{ $appNs }}
-{{- template "spark-operator.appLabelsAnnotations" $ }}
----
-{{- end }}
-{{- if $appResources.serviceAccount.create }}
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: {{ $appResources.serviceAccount.name }}
-  namespace: {{ $appNs }}
-{{- template "spark-operator.appLabelsAnnotations" $ }}
----
-{{- end }}
-{{- if $appResources.role.create }}
-apiVersion: rbac.authorization.k8s.io/v1
-kind: Role
-metadata:
-  name: {{ $appResources.role.name }}
-  namespace: {{ $appNs }}
-{{- template "spark-operator.appLabelsAnnotations" $ }}
-{{- template "spark-operator.appRbacRules" $ }}
----
-{{- end }}
-{{- if $appResources.roleBinding.create }}
-apiVersion: rbac.authorization.k8s.io/v1
-kind: RoleBinding
-metadata:
-  name: {{ $appResources.roleBinding.name }}
-  namespace: {{ $appNs }}
-{{- template "spark-operator.appLabelsAnnotations" $ }}
-{{- template "spark-operator.appRoleRef" $ }}
-subjects:
-  - kind: ServiceAccount
-    name: {{ $appResources.serviceAccount.name }}
-    namespace: {{ $appNs }}
----
-{{- end }}
-{{- end }}
-{{- else }}
-{{- if $appResources.serviceAccount.create }}
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: {{ $appResources.serviceAccount.name }}
-  namespace: {{ $systemNs }}
-{{- template "spark-operator.appLabelsAnnotations" $ }}
----
-{{- end }}
-{{- if $appResources.role.create }}
-apiVersion: rbac.authorization.k8s.io/v1
-kind: Role
-metadata:
-  name: {{ $appResources.role.name }}
-  namespace: {{ $systemNs }}
-{{- template "spark-operator.appLabelsAnnotations" $ }}
-{{- template "spark-operator.appRbacRules" $ }}
----
-{{- end }}
-{{- if $appResources.roleBinding.create }}
-apiVersion: rbac.authorization.k8s.io/v1
-kind: RoleBinding
-metadata:
-  name: {{ $appResources.serviceAccount.name }}
-  namespace: {{ $systemNs }}
-{{- template "spark-operator.appLabelsAnnotations" $ }}
-{{- template "spark-operator.appRoleRef" $ }}
-subjects:
-  - kind: ServiceAccount
-    name: {{ $appResources.serviceAccount.name }}
-    namespace: {{ $systemNs }}
----
-{{- end }}
-{{- end }}
-
-{{- if $appResources.clusterRole.create }}
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRole
-metadata:
-  name: {{ $appResources.clusterRole.name }}
-{{- template "spark-operator.appLabelsAnnotations" $ }}
-{{- template "spark-operator.appRbacRules" $ }}
----
-{{- end }}
-{{- if $appResources.sparkApplicationSentinel.create }}
-{{- range $sentinelNs := 
.Values.appResources.sparkApplicationSentinel.sentinelNamespaces.data }}
-apiVersion: spark.apache.org/v1alpha1
-kind: SparkApplication
-metadata:
-  name: {{ $appResources.sparkApplicationSentinel.name }}
-  namespace: {{ $sentinelNs }}
-  labels:
-    "spark.operator/sentinel": "true"
-    {{- template "spark-operator.appLabels" $ }}
-  annotations:
-    {{- template "spark-operator.appAnnotations" $ }}
-{{- end }}
----
-{{- end }}
diff --git 
a/build-tools/helm/spark-kubernetes-operator/templates/operator-rbac.yaml 
b/build-tools/helm/spark-kubernetes-operator/templates/operator-rbac.yaml
index f05be1c..e9fc7f0 100644
--- a/build-tools/helm/spark-kubernetes-operator/templates/operator-rbac.yaml
+++ b/build-tools/helm/spark-kubernetes-operator/templates/operator-rbac.yaml
@@ -124,17 +124,17 @@ subjects:
 ---
 {{- end }}
 
-{{- $appResources := .Values.appResources -}}
+{{- $workloadResources := .Values.workloadResources -}}
 {{- $systemNs := .Release.Namespace -}}
 {{- $operatorRbac := .Values.operatorRbac -}}
-{{- if index (.Values.appResources.namespaces) "data" }}
-{{- range $appNs := .Values.appResources.namespaces.data }}
+{{- if index (.Values.workloadResources.namespaces) "data" }}
+{{- range $workloadNs := .Values.workloadResources.namespaces.data }}
 {{- if $operatorRbac.role.create }}
 apiVersion: rbac.authorization.k8s.io/v1
 kind: Role
 metadata:
   name: {{ $operatorRbac.role.name }}
-  namespace: {{ $appNs }}
+  namespace: {{ $workloadNs }}
 {{- template "spark-operator.rbacLabelsAnnotations" $ }}
 {{- template "spark-operator.operatorRbacRules" $ }}
 ---
@@ -144,7 +144,7 @@ apiVersion: rbac.authorization.k8s.io/v1
 kind: RoleBinding
 metadata:
   name: {{ $operatorRbac.roleBinding.name }}
-  namespace: {{ $appNs }}
+  namespace: {{ $workloadNs }}
 {{- template "spark-operator.rbacLabelsAnnotations" $ }}
 roleRef:
   apiGroup: rbac.authorization.k8s.io
diff --git 
a/build-tools/helm/spark-kubernetes-operator/templates/tests/test-rbac.yaml 
b/build-tools/helm/spark-kubernetes-operator/templates/tests/test-rbac.yaml
index 33d8fa3..090a520 100644
--- a/build-tools/helm/spark-kubernetes-operator/templates/tests/test-rbac.yaml
+++ b/build-tools/helm/spark-kubernetes-operator/templates/tests/test-rbac.yaml
@@ -29,6 +29,7 @@ spec:
       command: ['bash', '-c' ]
       args: [
         'kubectl auth can-i list sparkapplications --all-namespaces',
+        'kubectl auth can-i list sparkclusters --all-namespaces',
         'kubectl auth can-i create pods --all-namespaces',
         'kubectl auth can-i create services --all-namespaces',
         'kubectl auth can-i create configmaps --all-namespaces',
@@ -41,7 +42,7 @@ spec:
 apiVersion: v1
 kind: Pod
 metadata:
-  name: "{{ include "spark-operator.name" . }}-test-app-rbac"
+  name: "{{ include "spark-operator.name" . }}-test-workload-rbac"
   namespace: {{ .Release.Namespace }}
   labels:
     {{- include "spark-operator.commonLabels" . | nindent 4 }}
@@ -59,5 +60,5 @@ spec:
         'kubectl auth can-i create services -n {{ .Release.Namespace }}',
         'kubectl auth can-i create persistentvolumeclaims -n {{ 
.Release.Namespace }}'
       ]
-  serviceAccountName: {{ .Values.appResources.serviceAccount.name }}
+  serviceAccountName: {{ .Values.workloadResources.serviceAccount.name }}
   restartPolicy: Never
diff --git 
a/build-tools/helm/spark-kubernetes-operator/templates/workload-rbac.yaml 
b/build-tools/helm/spark-kubernetes-operator/templates/workload-rbac.yaml
new file mode 100644
index 0000000..1dd9fab
--- /dev/null
+++ b/build-tools/helm/spark-kubernetes-operator/templates/workload-rbac.yaml
@@ -0,0 +1,176 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{/*
+RBAC rules used to create the workload (cluster)role based on the scope
+*/}}
+{{- define "spark-operator.workloadRbacRules" }}
+rules:
+  - apiGroups:
+      - ""
+    resources:
+      - pods
+      - services
+      - configmaps
+      - persistentvolumeclaims
+    verbs:
+      - '*'
+{{- end }}
+
+{{/*
+RoleRef for workload service account rolebindings
+*/}}
+{{- define "spark-operator.workloadRoleRef" }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+{{- if .Values.workloadResources.clusterRole.create }}
+  kind: ClusterRole
+  name: {{ .Values.workloadResources.clusterRole.name }}
+{{- else }}
+  kind: Role
+  name: {{ .Values.workloadResources.role.name }}
+{{- end }}
+{{- end }}
+
+{{/*
+Labels and annotations to be applied
+*/}}
+{{- define "spark-operator.workloadLabels" -}}
+  {{- with .Values.workloadResources.labels }}
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+  {{- include "spark-operator.commonLabels" . | nindent 4 }}
+{{- end }}
+
+{{- define "spark-operator.workloadAnnotations" -}}
+  {{- with .Values.workloadResources.annotations }}
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+{{- end }}
+
+{{- define "spark-operator.workloadLabelsAnnotations" }}
+  labels:
+  {{ template "spark-operator.workloadLabels" $ }}
+  annotations:
+  {{ template "spark-operator.workloadAnnotations" $ }}
+{{- end }}
+---
+{{- $workloadResources := .Values.workloadResources -}}
+{{- $systemNs := .Release.Namespace -}}
+{{- $operatorRbac := .Values.operatorRbac -}}
+{{- if index (.Values.workloadResources.namespaces) "data" }}
+{{- range $workloadNs := .Values.workloadResources.namespaces.data }}
+{{- if $workloadResources.namespaces.create }}
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: {{ $workloadNs }}
+{{- template "spark-operator.workloadLabelsAnnotations" $ }}
+---
+{{- end }}
+{{- if $workloadResources.serviceAccount.create }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ $workloadResources.serviceAccount.name }}
+  namespace: {{ $workloadNs }}
+{{- template "spark-operator.workloadLabelsAnnotations" $ }}
+---
+{{- end }}
+{{- if $workloadResources.role.create }}
+apiVersion: rbac.authorization.k8s.io/v1
+kind: Role
+metadata:
+  name: {{ $workloadResources.role.name }}
+  namespace: {{ $workloadNs }}
+{{- template "spark-operator.workloadLabelsAnnotations" $ }}
+{{- template "spark-operator.workloadRbacRules" $ }}
+---
+{{- end }}
+{{- if $workloadResources.roleBinding.create }}
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+  name: {{ $workloadResources.roleBinding.name }}
+  namespace: {{ $workloadNs }}
+{{- template "spark-operator.workloadLabelsAnnotations" $ }}
+{{- template "spark-operator.workloadRoleRef" $ }}
+subjects:
+  - kind: ServiceAccount
+    name: {{ $workloadResources.serviceAccount.name }}
+    namespace: {{ $workloadNs }}
+---
+{{- end }}
+{{- end }}
+{{- else }}
+{{- if $workloadResources.serviceAccount.create }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ $workloadResources.serviceAccount.name }}
+  namespace: {{ $systemNs }}
+{{- template "spark-operator.workloadLabelsAnnotations" $ }}
+---
+{{- end }}
+{{- if $workloadResources.role.create }}
+apiVersion: rbac.authorization.k8s.io/v1
+kind: Role
+metadata:
+  name: {{ $workloadResources.role.name }}
+  namespace: {{ $systemNs }}
+{{- template "spark-operator.workloadLabelsAnnotations" $ }}
+{{- template "spark-operator.workloadRbacRules" $ }}
+---
+{{- end }}
+{{- if $workloadResources.roleBinding.create }}
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+  name: {{ $workloadResources.serviceAccount.name }}
+  namespace: {{ $systemNs }}
+{{- template "spark-operator.workloadLabelsAnnotations" $ }}
+{{- template "spark-operator.workloadRoleRef" $ }}
+subjects:
+  - kind: ServiceAccount
+    name: {{ $workloadResources.serviceAccount.name }}
+    namespace: {{ $systemNs }}
+---
+{{- end }}
+{{- end }}
+
+{{- if $workloadResources.clusterRole.create }}
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+  name: {{ $workloadResources.clusterRole.name }}
+{{- template "spark-operator.workloadLabelsAnnotations" $ }}
+{{- template "spark-operator.workloadRbacRules" $ }}
+---
+{{- end }}
+{{- if $workloadResources.sparkApplicationSentinel.create }}
+{{- range $sentinelNs := 
.Values.workloadResources.sparkApplicationSentinel.sentinelNamespaces.data }}
+apiVersion: spark.apache.org/v1alpha1
+kind: SparkApplication
+metadata:
+  name: {{ $workloadResources.sparkApplicationSentinel.name }}
+  namespace: {{ $sentinelNs }}
+  labels:
+    "spark.operator/sentinel": "true"
+    {{- template "spark-operator.workloadLabels" $ }}
+  annotations:
+    {{- template "spark-operator.workloadAnnotations" $ }}
+{{- end }}
+---
+{{- end }}
diff --git a/build-tools/helm/spark-kubernetes-operator/values.yaml 
b/build-tools/helm/spark-kubernetes-operator/values.yaml
index 9f78ffe..85ff211 100644
--- a/build-tools/helm/spark-kubernetes-operator/values.yaml
+++ b/build-tools/helm/spark-kubernetes-operator/values.yaml
@@ -90,15 +90,15 @@ operatorRbac:
     create: true
     name: "spark-operator-clusterrolebinding"
   role:
-    # If enabled, a Role would be created inside each app namespace, as 
configured
-    # in {appResources.namespaces.data} for operator. Please enable *at least 
one* of
+    # If enabled, a Role would be created inside each workload namespace, as 
configured
+    # in {workloadResources.namespaces.data} for operator. Please enable *at 
least one* of
     # {operatorRbac.clusterRole.create} or {operatorRbac.role.create} for 
operator
     # unless permission is provided separately from the chart
     create: false
     name: "spark-operator-role"
   roleBinding:
-    # If enabled, a RoleBinding would be created inside each app namespace, as 
configured
-    # in {appResources.namespaces.data} for operator. Please enable *at least 
one* of
+    # If enabled, a RoleBinding would be created inside each workload 
namespace, as configured
+    # in {workloadResources.namespaces.data} for operator. Please enable *at 
least one* of
     # {operatorRbac.clusterRoleBinding.create} or 
{operatorRbac.roleBinding.create} for
     # operator unless permission is provided separately from the chart
     create: false
@@ -115,12 +115,13 @@ operatorRbac:
   labels:
     "app.kubernetes.io/component": "operator-rbac"
 
-appResources:
-  # Create namespace(s), service account(s), clusterrole, role(s) and 
rolebinding(s) for SparkApps
+workloadResources:
+  # Create namespace(s), service account(s), clusterrole, role(s) and 
rolebinding(s) for Spark
+  # workloads, including SparkApps and SparkClusters
   namespaces:
     create: true
     # When enabled, value for conf property 
`spark.operator.watched.namespaces` would be set to
-    # the values provided in {appResources.namespaces.data} field as well
+    # the values provided in {workloadResources.namespaces.data} field as well
     overrideWatchedNamespaces: true
     data:
     # - "spark-1"
@@ -129,21 +130,21 @@ appResources:
     create: true
     name: "spark"
   role:
-    # When enabled, a role would be created in each app namespace, as 
configured in
-    # {appResources.namespaces.data} for Spark apps. Please enable *at least 
one* of
-    # {appResources.roles.create} or {appResources.clusterRole.create} for
-    # Spark app unless permission is provided separately from the chart
+    # When enabled, a role would be created in each workload namespace, as 
configured in
+    # {workloadResources.namespaces.data} for Spark apps. Please enable *at 
least one* of
+    # {workloadResources.roles.create} or 
{workloadResources.clusterRole.create} for
+    # Spark workload unless permission is provided separately from the chart
     create: false
-    name: "spark-app-role"
+    name: "spark-workload-role"
   clusterRole:
-    # When enabled, a clusterrole would be created for Spark apps. Please 
enable *at least one* of
-    # {appResources.roles.create} or {appResources.clusterRole.create} for 
Spark app unless
+    # When enabled, a clusterrole would be created for Spark workloads. Please 
enable *at least one* of
+    # {workloadResources.roles.create} or 
{workloadResources.clusterRole.create} for Spark workload unless
     # permission is provided separately from the chart
     create: true
-    name: "spark-app-clusterrole"
+    name: "spark-workload-clusterrole"
   roleBinding:
     create: true
-    name: "spark-app-rolebinding"
+    name: "spark-workload-rolebinding"
   sparkApplicationSentinel:
     create: false
     name: "spark-app-sentinel"
@@ -151,15 +152,15 @@ appResources:
       data:
       #  - "spark-1"
       #  - "spark-2"
-      # When enabled, a sentinel resources will be deployed to namespace(s) 
provided/
-      # Note that sentinelNamespaces list should be a subset of 
{appResources.namespaces.data}
+      # When enabled, a sentinel resource of type SparkApp will be deployed to 
namespace(s) provided
+      # Note that sentinelNamespaces list should be a subset of 
{workloadResources.namespaces.data}
       # - "default"
-  # App resources are by default annotated to avoid app abort due to operator 
upgrade
+  # workload resources are by default annotated to avoid workload abort due to 
operator upgrade
   annotations:
     "helm.sh/resource-policy": keep
-  # labels to be added on app resources
+  # labels to be added on workload resources
   labels:
-    "app.kubernetes.io/component": "spark-app"
+    "app.kubernetes.io/component": "spark-workload"
 
 operatorConfiguration:
   # If set to true, below properties would be appended to default conf files 
under conf/
diff --git a/tests/e2e/helm/dynamic-config-values.yaml 
b/tests/e2e/helm/dynamic-config-values.yaml
index 1fea7ae..592c51a 100644
--- a/tests/e2e/helm/dynamic-config-values.yaml
+++ b/tests/e2e/helm/dynamic-config-values.yaml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-appResources:
+workloadResources:
   namespaces:
     overrideWatchedNamespaces: false
     data:
@@ -29,4 +29,4 @@ operatorConfiguration:
     enable: true
     create: true
     data:
-      spark.kubernetes.operator.watchedNamespaces: "default"
\ No newline at end of file
+      spark.kubernetes.operator.watchedNamespaces: "default"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to