Skip to content

Commit 4523b6d

Browse files
committed
[SPARK-52296] Add spark-role=operator label
### What changes were proposed in this pull request? This PR aims to add `spark-role=operator` label. ### Why are the changes needed? Apache Spark uses `spark-role=xxx` label for all resources. We need to label Spark Operator resources (`Deployment`, `ReplicaSet`, `Pod`) in the same way. **BEFORE** ```bash $ kubectl get all -l spark-role=operator No resources found in default namespace. ``` **AFTER** ```bash $ kubectl get all -l spark-role=operator NAME READY STATUS RESTARTS AGE pod/spark-kubernetes-operator-f44746f8b-nx6w9 1/1 Running 0 2m19s NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/spark-kubernetes-operator 1/1 1 1 2m19s NAME DESIRED CURRENT READY AGE replicaset.apps/spark-kubernetes-operator-f44746f8b 1 1 1 2m19s ``` ### Does this PR introduce _any_ user-facing change? No behavior change. ### How was this patch tested? Manually check with `kubectl get all -l spark-role=operator`. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#226 from dongjoon-hyun/SPARK-52296. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent b640ca5 commit 4523b6d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

build-tools/helm/spark-kubernetes-operator/templates/_helpers.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
5454
{{- end }}
5555
app.kubernetes.io/managed-by: {{ .Release.Service }}
5656
helm.sh/chart: {{ include "spark-operator.chart" . }}
57+
spark-role: operator
5758
{{- end }}
5859

5960
{{/*

build-tools/helm/spark-kubernetes-operator/templates/spark-operator.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ spec:
3131
template:
3232
metadata:
3333
labels:
34+
spark-role: operator
3435
{{- include "spark-operator.deploymentSelectorLabels" . | nindent 8 }}
3536
{{- if index (.Values.operatorDeployment.operatorPod) "labels" }}
3637
{{- with .Values.operatorDeployment.operatorPod.labels }}

0 commit comments

Comments
 (0)