Skip to content

Commit bc8f8a2

Browse files
authored
Fixes #1467 (issue when deleting SparkApplication without metrics server) (#1530)
1 parent ff44591 commit bc8f8a2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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.1.21
5-
appVersion: v1beta2-1.3.5-3.1.1
4+
version: 1.1.22
5+
appVersion: v1beta2-1.3.6-3.1.1
66
keywords:
77
- spark
88
home: https://github.com/GoogleCloudPlatform/spark-on-k8s-operator

pkg/controller/sparkapplication/controller.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,9 @@ func (c *Controller) getAndUpdateAppState(app *v1beta2.SparkApplication) error {
446446
}
447447

448448
func (c *Controller) handleSparkApplicationDeletion(app *v1beta2.SparkApplication) {
449-
c.metrics.exportMetricsOnDelete(app)
449+
if c.metrics != nil {
450+
c.metrics.exportMetricsOnDelete(app)
451+
}
450452
// SparkApplication deletion requested, lets delete driver pod.
451453
if err := c.deleteSparkResources(app); err != nil {
452454
glog.Errorf("failed to delete resources associated with deleted SparkApplication %s/%s: %v", app.Namespace, app.Name, err)

0 commit comments

Comments
 (0)