Skip to content

Commit 3c75376

Browse files
authored
Chart: add POD_NAME env for leader election (#2039)
Signed-off-by: aakcht <[email protected]>
1 parent b723367 commit 3c75376

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

charts/spark-operator-chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: spark-operator
33
description: A Helm chart for Spark on Kubernetes operator
4-
version: 1.3.0
4+
version: 1.3.1
55
appVersion: v1beta2-1.4.2-3.5.0
66
keywords:
77
- spark

charts/spark-operator-chart/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# spark-operator
22

3-
![Version: 1.3.0](https://img.shields.io/badge/Version-1.3.0-informational?style=flat-square) ![AppVersion: v1beta2-1.4.2-3.5.0](https://img.shields.io/badge/AppVersion-v1beta2--1.4.2--3.5.0-informational?style=flat-square)
3+
![Version: 1.3.1](https://img.shields.io/badge/Version-1.3.1-informational?style=flat-square) ![AppVersion: v1beta2-1.4.2-3.5.0](https://img.shields.io/badge/AppVersion-v1beta2--1.4.2--3.5.0-informational?style=flat-square)
44

55
A Helm chart for Spark on Kubernetes operator
66

charts/spark-operator-chart/templates/deployment.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ spec:
4848
- name: {{ .Chart.Name }}
4949
image: {{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}
5050
imagePullPolicy: {{ .Values.image.pullPolicy }}
51+
{{- if gt (int .Values.replicaCount) 1 }}
52+
env:
53+
- name: POD_NAME
54+
valueFrom:
55+
fieldRef:
56+
apiVersion: v1
57+
fieldPath: metadata.name
58+
{{- end }}
5159
envFrom:
5260
{{- toYaml .Values.envFrom | nindent 10 }}
5361
securityContext:

0 commit comments

Comments
 (0)