Skip to content

Commit 333ee0b

Browse files
authored
feat: add support for service labels on driver-svc (#1985)
* feat: add support for service labels on driver-svc Signed-off-by: Cian Gallagher <[email protected]> * docs: update helm docs Signed-off-by: Cian Gallagher <[email protected]> * fix: undo changes to api-docs Signed-off-by: Cian Gallagher <[email protected]> * docs: update api-docs Signed-off-by: Cian Gallagher <[email protected]> * fix: update appVersion Signed-off-by: Cian Gallagher <[email protected]> * ci: remove step to check api change Signed-off-by: Cian Gallagher <[email protected]> * docs: update helm-docs Signed-off-by: Cian Gallagher <[email protected]> * docs: update helm-docs Signed-off-by: Cian Gallagher <[email protected]> * fix: update app version Signed-off-by: Cian Gallagher <[email protected]> * docs: update helm docs Signed-off-by: Cian Gallagher <[email protected]> --------- Signed-off-by: Cian Gallagher <[email protected]>
1 parent 8fc4058 commit 333ee0b

File tree

13 files changed

+74
-28
lines changed

13 files changed

+74
-28
lines changed

.github/workflows/main.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@ jobs:
1818
with:
1919
fetch-depth: "0"
2020

21-
- name: The API should not change once published
22-
run: |
23-
if ! git diff --quiet origin/master -- pkg/apis/sparkoperator.k8s.io/v1beta1; then
24-
echo "sparkoperator.k8s.io/v1beta1 api has changed"
25-
false
26-
fi
27-
if ! git diff --quiet origin/master -- pkg/apis/sparkoperator.k8s.io/v1beta2; then
28-
echo "sparkoperator.k8s.io/v1beta2 api has changed"
29-
false
30-
fi
31-
3221
- name: The API documentation hasn't changed
3322
run: |
3423
make build-api-docs

charts/spark-operator-chart/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v2
22
name: spark-operator
33
description: A Helm chart for Spark on Kubernetes operator
4-
version: 1.2.13
5-
appVersion: v1beta2-1.4.4-3.5.0
4+
version: 1.2.14
5+
appVersion: v1beta2-1.4.5-3.5.0
66
keywords:
77
- spark
88
home: https://github.com/kubeflow/spark-operator

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.2.13](https://img.shields.io/badge/Version-1.2.13-informational?style=flat-square) ![AppVersion: v1beta2-1.4.4-3.5.0](https://img.shields.io/badge/AppVersion-v1beta2--1.4.4--3.5.0-informational?style=flat-square)
3+
![Version: 1.2.14](https://img.shields.io/badge/Version-1.2.14-informational?style=flat-square) ![AppVersion: v1beta2-1.4.5-3.5.0](https://img.shields.io/badge/AppVersion-v1beta2--1.4.5--3.5.0-informational?style=flat-square)
44

55
A Helm chart for Spark on Kubernetes operator
66

charts/spark-operator-chart/crds/sparkoperator.k8s.io_scheduledsparkapplications.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,6 +1336,10 @@ spec:
13361336
additionalProperties:
13371337
type: string
13381338
type: object
1339+
serviceLabels:
1340+
additionalProperties:
1341+
type: string
1342+
type: object
13391343
shareProcessNamespace:
13401344
type: boolean
13411345
sidecars:

charts/spark-operator-chart/crds/sparkoperator.k8s.io_sparkapplications.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,10 @@ spec:
13221322
additionalProperties:
13231323
type: string
13241324
type: object
1325+
serviceLabels:
1326+
additionalProperties:
1327+
type: string
1328+
type: object
13251329
shareProcessNamespace:
13261330
type: boolean
13271331
sidecars:

docs/api-docs.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,19 @@ executors to connect to the driver.</p>
11051105
</tr>
11061106
<tr>
11071107
<td>
1108+
<code>serviceLabels</code><br/>
1109+
<em>
1110+
map[string]string
1111+
</em>
1112+
</td>
1113+
<td>
1114+
<em>(Optional)</em>
1115+
<p>ServiceLabels defines the labels to be added to the Kubernetes headless service used by
1116+
executors to connect to the driver.</p>
1117+
</td>
1118+
</tr>
1119+
<tr>
1120+
<td>
11081121
<code>ports</code><br/>
11091122
<em>
11101123
<a href="#sparkoperator.k8s.io/v1beta2.Port">

manifest/crds/sparkoperator.k8s.io_scheduledsparkapplications.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,6 +1336,10 @@ spec:
13361336
additionalProperties:
13371337
type: string
13381338
type: object
1339+
serviceLabels:
1340+
additionalProperties:
1341+
type: string
1342+
type: object
13391343
shareProcessNamespace:
13401344
type: boolean
13411345
sidecars:

manifest/crds/sparkoperator.k8s.io_sparkapplications.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,10 @@ spec:
13221322
additionalProperties:
13231323
type: string
13241324
type: object
1325+
serviceLabels:
1326+
additionalProperties:
1327+
type: string
1328+
type: object
13251329
shareProcessNamespace:
13261330
type: boolean
13271331
sidecars:

pkg/apis/sparkoperator.k8s.io/v1beta2/types.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,10 @@ type DriverSpec struct {
563563
// executors to connect to the driver.
564564
// +optional
565565
ServiceAnnotations map[string]string `json:"serviceAnnotations,omitempty"`
566+
// ServiceLabels defines the labels to be added to the Kubernetes headless service used by
567+
// executors to connect to the driver.
568+
// +optional
569+
ServiceLabels map[string]string `json:"serviceLabels,omitempty"`
566570
// Ports settings for the pods, following the Kubernetes specifications.
567571
// +optional
568572
Ports []Port `json:"ports,omitempty"`
@@ -659,7 +663,7 @@ type MonitoringSpec struct {
659663
// If not specified, the content in spark-docker/conf/metrics.properties will be used.
660664
MetricsProperties *string `json:"metricsProperties,omitempty"`
661665
// MetricsPropertiesFile is the container local path of file metrics.properties for configuring
662-
//the Spark metric system. If not specified, value /etc/metrics/conf/metrics.properties will be used.
666+
// the Spark metric system. If not specified, value /etc/metrics/conf/metrics.properties will be used.
663667
// +optional
664668
MetricsPropertiesFile *string `json:"metricsPropertiesFile,omitempty"`
665669
// Prometheus is for configuring the Prometheus JMX exporter.

pkg/config/constants.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ const (
150150
SparkDriverKubernetesMaster = "spark.kubernetes.driver.master"
151151
// SparkDriverServiceAnnotationKeyPrefix is the key prefix of annotations to be added to the driver service.
152152
SparkDriverServiceAnnotationKeyPrefix = "spark.kubernetes.driver.service.annotation."
153+
// SparkDriverServiceLabelKeyPrefix is the key prefix of annotations to be added to the driver service.
154+
SparkDriverServiceLabelKeyPrefix = "spark.kubernetes.driver.service.label."
153155
// SparkDynamicAllocationEnabled is the Spark configuration key for specifying if dynamic
154156
// allocation is enabled or not.
155157
SparkDynamicAllocationEnabled = "spark.dynamicAllocation.enabled"

0 commit comments

Comments
 (0)