diff --git a/go/tasks/plugins/k8s/spark/spark.go b/go/tasks/plugins/k8s/spark/spark.go index 66600709a..64ea664fc 100755 --- a/go/tasks/plugins/k8s/spark/spark.go +++ b/go/tasks/plugins/k8s/spark/spark.go @@ -407,8 +407,9 @@ func getEventInfoForSpark(sj *sparkOp.SparkApplication) (*pluginsCore.TaskInfo, }) } } else if sj.Status.AppState.State == sparkOp.RunningState && sj.Status.DriverInfo.WebUIIngressAddress != "" { - // Append https as the operator doesn't currently. - customInfoMap[sparkDriverUI] = fmt.Sprintf("https://%s", sj.Status.DriverInfo.WebUIIngressAddress) + // Older versions of spark-operator does not have http:// but newer versions have. + customInfoMap[sparkDriverUI] = strings.TrimPrefix(sj.Status.DriverInfo.WebUIIngressAddress, "http://") + customInfoMap[sparkDriverUI] = fmt.Sprintf("https://%s", customInfoMap[sparkDriverUI]) // Custom doesn't work unless the UI has a custom plugin to parse this, hence add to Logs as well. taskLogs = append(taskLogs, &core.TaskLog{ Uri: customInfoMap[sparkDriverUI],