kubeflow / spark-operator

Kubernetes operator for managing the lifecycle of Apache Spark applications on Kubernetes.
Apache License 2.0
2.74k stars 1.36k forks source link

enable-ui-service breaks helm chart #1274

Open kehao95 opened 3 years ago

kehao95 commented 3 years ago

It seems that enable-ui-service was added recently. Which result in passing -enable-ui-service=true/false on spark-operator deployment even with old version spark-operator who doesn't accept this flag.

my case:

# helm chart
  spark-operator:
    namespace: spark
    enabled: true
    chart: spark-operator/spark-operator
    version: 1.1.3
    valuesFile: values/spark-operator.yaml

# values.yaml

image:
  # -- Image repository
  repository: gcr.io/spark-operator/spark-operator
  # -- Image pull policy
  pullPolicy: IfNotPresent
  # -- Overrides the image tag whose default is the chart appVersion.
  tag: "v1beta2-1.2.0-3.0.0"
...
uiService:
  # -- Enable UI service creation for Spark application
  enable: true

Error:


 + echo root:x:0:0:root:/root:/bin/bash
 root:x:0:0:root:/root:/bin/bash
 + [[ -z root:x:0:0:root:/root:/bin/bash ]]
 + exec /usr/bin/tini -s -- /usr/bin/spark-operator -v=2 -logtostderr -namespace=spark -enable-ui-service=true -ingress-url-format= -controller-threads=10 -resync-interval=30 -enable-batch-scheduler=false -label-selector-filter= -enable-metrics=true -metrics-labels=app_type -metrics-port=10254 -metrics-endpoint=/metrics -metrics-prefix= -enable-resource-quota-enforcement=false
 flag provided but not defined: -enable-ui-service
 Usage of /usr/bin/spark-operator:
   -alsologtostderr
         log to standard error as well as files
   -controller-threads int
         Number of worker threads used by the SparkApplication controller. (default 10)
   -enable-batch-scheduler
         Enable batch schedulers for pods' scheduling, the available batch schedulers are: (volcano).
   -enable-metrics
         Whether to enable the metrics endpoint.
   -enable-resource-quota-enforcement
         Whether to enable ResourceQuota enforcement for SparkApplication resources. Requires the webhook to be enabled.
   -enable-webhook
         Whether to enable the mutating admission webhook for admitting and patching Spark pods.
   -ingress-url-format string

deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "2"
    meta.helm.sh/release-name: spark-operator
    meta.helm.sh/release-namespace: spark
  labels:
    app.kubernetes.io/instance: spark-operator
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: spark-operator
    app.kubernetes.io/version: v1beta2-1.2.3-3.1.1
    helm.sh/chart: spark-operator-1.1.3
  name: spark-operator
  namespace: spark
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/instance: spark-operator
      app.kubernetes.io/name: spark-operator
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        prometheus.io/path: /metrics
        prometheus.io/port: "10254"
        prometheus.io/scrape: "true"
      creationTimestamp: null
      labels:
        app.kubernetes.io/instance: spark-operator
        app.kubernetes.io/name: spark-operator
    spec:
      containers:
      - args:
        - -v=2
        - -logtostderr
        - -namespace=spark
        - -enable-ui-service=true
        - -ingress-url-format=
        - -controller-threads=10
        - -resync-interval=30
        - -enable-batch-scheduler=false
        - -label-selector-filter=
        - -enable-metrics=true
        - -metrics-labels=app_type
        - -metrics-port=10254
        - -metrics-endpoint=/metrics
        - -metrics-prefix=
        - -enable-resource-quota-enforcement=false
        image: gcr.io/spark-operator/spark-operator:v1beta2-1.2.0-3.0.0
        imagePullPolicy: IfNotPresent
        name: spark-operator
        ports:
        - containerPort: 10254
          name: metrics
          protocol: TCP
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      serviceAccount: spark-operator
      serviceAccountName: spark-operator
      terminationGracePeriodSeconds: 30
theofpa commented 3 years ago

Removing the argument -enable-ui-service from the deployment, results to the same error message but this time for the argument -label-selector-filter=. After removing both, the older versions of spark-operator start properly.

sshah90 commented 3 years ago

Not sure but I see helm chart release had operator changes which break deployment for HelmChart Version >= 1.1.1 and image tag= v1beta2-1.2.3-3.1.1

HelmChart Release Compare

caongocthai commented 2 years ago

Removing the argument -enable-ui-service from the deployment, results to the same error message but this time for the argument -label-selector-filter=. After removing both, the older versions of spark-operator start properly.

@theofpa How did you remove these arguments?

xpaulnim commented 2 years ago

@sshah90 @port3000 see my coment in #1157

theofpa commented 2 years ago

Removing the argument -enable-ui-service from the deployment, results to the same error message but this time for the argument -label-selector-filter=. After removing both, the older versions of spark-operator start properly.

@theofpa How did you remove these arguments?

In the container spec of the spark-operator deployment, I just removed the lines:

        - -enable-ui-service=true
        - -label-selector-filter=

so it now looks like this:

spec:
      containers:
      - args:
        - -v=2
        - -logtostderr
        - -namespace=
        - -ingress-url-format=
        - -controller-threads=10
        - -resync-interval=30
        - -enable-batch-scheduler=false
        - -enable-metrics=true
        - -metrics-labels=app_type
        - -metrics-port=10254
        - -metrics-endpoint=/metrics
        - -metrics-prefix=
        - -enable-resource-quota-enforcement=false
        image: gcr.io/spark-operator/spark-operator:v1beta2-1.1.2-2.4.5
...