1# Copyright 2024 The Kubeflow Authors.
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
7# http://www.apache.org/licenses/LICENSE-2.0
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
15# Default values for spark-operator.
16# This is a YAML-formatted file.
17# Declare variables to be passed into your templates.
19# -- String to partially override release name.
21# -- String to fully override release name.
23# -- Common labels to add to the resources.
25# Public ConfigMap exposing the Spark Operator version to clients such as the Kubeflow SDK.
27 # -- Specifies whether to create the `kubeflow-spark-public` ConfigMap, together with a Role and RoleBinding
28 # that let all authenticated users read it. Its name is fixed so that clients can find it,
29 # so enable it for only one Spark Operator release per target namespace.
31 # -- Namespace to create the ConfigMap, Role and RoleBinding in, e.g. `kube-public`. Defaults to the release namespace.
32 # The namespace must already exist and the installing user must be allowed to create these resources in it.
34# Image used by the Spark operator.
38 # -- Image repository.
39 repository: chainguard-private/spark-operator
41 # @default -- If not set, the chart appVersion will be used.
42 tag: 2.6.0-r3@sha256:a57c4bedd175ba2a217b28cb58d2bcbf05f6e3354af4d170bf930c0387775f02
43 # -- Image pull policy.
44 pullPolicy: IfNotPresent
45 # -- Image pull secrets for private image registry.
47 # - name: <secret-name>
48# Helm hook configuration.
50 # -- Whether to create a Helm pre-install/pre-upgrade hook Job to update CRDs.
52 # Image used by the Helm hook Job.
56 # -- Image repository.
57 repository: chainguard-private/kubectl
59 # @default -- If not set, the chart appVersion will be used.
60 tag: 1.37.3-r0@sha256:c912ad3f0c21d72422db5614e88ca8bd7967039116d95fb91c74162d1968a841
61 # -- Pod resource requests and limits for the Helm hook Job container.
69 # -- Node selector for the Helm hook Job.
71 # -- Affinity for the Helm hook Job.
73 # -- List of node taints to tolerate for the Helm hook Job.
75 # -- Extra labels for the Helm hook Job pod.
80 # -- Extra annotations for the Helm hook Job pod.
85 # -- Number of replicas of controller.
87 # -- Feature gates to enable or disable specific features.
89 - name: PartialRestart
91 - name: LoadSparkDefaults
95 - name: DefaultTimeToLive
97 # -- The number of old history to retain to allow rollback.
98 revisionHistoryLimit: 10
100 # -- Specifies whether to enable leader election for controller.
102 # -- Leader election lease duration.
104 # -- Leader election renew deadline.
106 # -- Leader election retry period.
108 # -- Reconcile concurrency, higher values might increase memory usage.
110 # -- Configure the verbosity of logging, can be one of `debug`, `info`, `error`.
112 # -- Configure the encoder of logging, can be one of `console` or `json`.
114 # -- Grace period after a successful spark-submit when driver pod not found errors will be retried. Useful if the driver pod can take some time to be created.
115 driverPodCreationGracePeriod: 10s
116 # -- Specifies the maximum number of Executor pods that can be tracked by the controller per SparkApplication.
117 maxTrackedExecutorPerApp: 1000
118 # -- Default Time-To-Live (in seconds) applied to terminated SparkApplications that do not
119 # set spec.timeToLiveSeconds. Requires the DefaultTimeToLive feature gate to be enabled.
120 # 0 (default) disables it.
121 defaultTimeToLiveSeconds: 0
122 # -- Name of the service account used by the Spark driver pod and the Spark Connect server
123 # pod when neither the custom resource nor its pod template specifies one. Leave empty to
124 # disable the fallback, in which case the namespace's default service account is used. The
125 # service account must already exist in every namespace where Spark workloads are created;
126 # note that `spark.serviceAccount.create` only provisions accounts for the namespaces listed
127 # in `spark.jobNamespaces`.
128 defaultServiceAccount: ""
129 # -- Driver PDB feature gate. When true, the controller creates a PodDisruptionBudget for each SparkApplication that sets spec.driverPodDisruptionBudget=true. Default false.
130 driverPodDisruptionBudget:
132 # -- Maximum QPS to the API server from the controller client.
134 # -- Maximum burst for throttle from the controller client.
136 # -- Timestamp precision for ScheduledSparkApplication run names.
137 # Valid values: nanos (default), micros, millis, seconds, minutes.
138 # Shorter precisions produce shorter names which helps with Kubernetes name length limits.
139 # NOTE: Using lower precisions such as "seconds" or "minutes" increases the risk of name
140 # collisions if multiple runs are created within the same time unit (for example during
141 # reconciliation loops or manual re-triggers). A collision will cause run creation to fail.
142 # Choose a precision compatible with your scheduling frequency: "minutes" is only suitable
143 # for jobs scheduled at most once per minute, "seconds" for jobs scheduled at most once per second.
144 scheduledSparkApplicationTimestampPrecision: nanos
146 # -- Specifies whether to create service for Spark web UI.
149 # -- Specifies whether to create ingress for Spark web UI.
150 # `controller.uiService.enable` must be `true` to enable ingress.
152 # -- Ingress URL format.
153 # Required if `controller.uiIngress.enable` is true.
155 # -- Optionally set the ingressClassName.
157 # -- Optionally set default TLS configuration for the Spark UI's ingress. `ingressTLS` in the SparkApplication spec overrides this.
161 # secretName: "example-secret"
162 # -- Optionally set default ingress annotations for the Spark UI's ingress. `ingressAnnotations` in the SparkApplication spec overrides this.
167 # -- Specifies whether to enable batch scheduler for spark jobs scheduling.
168 # If enabled, users can specify batch scheduler name in spark application.
170 # -- Specifies a list of kube-scheduler names for scheduling Spark pods.
171 kubeSchedulerNames: []
172 # - default-scheduler
173 # -- Default batch scheduler to be used if not specified by the user.
174 # If specified, this value must be either "volcano" or "yunikorn". Specifying any other
175 # value will cause the controller to error on startup.
178 # -- Specifies whether to create a service account for the controller.
180 # -- Optional name for the controller service account.
182 # -- Extra annotations for the controller service account.
184 # -- Auto-mount service account token to the controller pods.
185 automountServiceAccountToken: true
187 # -- Specifies whether to create RBAC resources for the controller.
189 # -- Extra annotations for the controller RBAC resources.
191 # -- Extra labels for controller pods.
196 # -- Extra annotations for controller pods.
201 # -- Annotations for the controller Deployment resource (metadata.annotations).
202 deploymentAnnotations: {}
206 # -- Volumes for controller pods.
208 # Create a tmp directory to write Spark artifacts to for deployed Spark apps.
212 # -- Node selector for controller pods.
214 # -- Affinity for controller pods.
216 # -- List of node taints to tolerate for controller pods.
218 # -- Priority class for controller pods.
219 priorityClassName: ""
220 # -- Security context for controller pods.
223 # -- Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in.
224 # Ref: [Pod Topology Spread Constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/).
225 # The labelSelector field in topology spread constraint will be set to the selector labels for controller pods if not specified.
226 topologySpreadConstraints: []
228 # topologyKey: topology.kubernetes.io/zone
229 # whenUnsatisfiable: ScheduleAnyway
231 # topologyKey: kubernetes.io/hostname
232 # whenUnsatisfiable: DoNotSchedule
234 # -- Whether to use user namespace or not
235 # Kubernetes version 1.30 for feature beta (1.33 for GA) or higher is required with support from OS and OCI runtime
236 # ref: https://kubernetes.io/docs/concepts/workloads/pods/user-namespaces/
238 # -- Environment variables for controller containers.
240 # -- Environment variable sources for controller containers.
242 # -- Volume mounts for controller containers.
244 # Mount a tmp directory to write Spark artifacts to for deployed Spark apps.
248 # -- Pod resource requests and limits for controller containers.
249 # Note, that each job submission will spawn a JVM within the controller pods using "/usr/local/openjdk-11/bin/java -Xmx128m".
250 # Kubernetes may kill these Java processes at will to enforce resource limits. When that happens, you will see the following error:
251 # 'failed to run spark-submit for SparkApplication [...]: signal: killed' - when this happens, you may want to increase memory limits.
260 # -- Security context for controller containers.
262 readOnlyRootFilesystem: true
264 allowPrivilegeEscalation: false
271 # -- Sidecar containers for controller pods.
273 # Pod disruption budget for controller to avoid service degradation.
275 # -- Specifies whether to create pod disruption budget for controller.
276 # Ref: [Specifying a Disruption Budget for your Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)
278 # -- The number of pods that must be available.
279 # Require `controller.replicas` to be greater than 1
282 # -- Specifies whether to enable pprof.
284 # -- Specifies pprof port.
286 # -- Specifies pprof service port name.
288 # Workqueue rate limiter configuration forwarded to the controller-runtime Reconciler.
289 workqueueRateLimiter:
290 # -- Specifies the average rate of items process by the workqueue rate limiter.
292 # -- Specifies the maximum number of items that can be in the workqueue at any given time.
295 # -- Specifies whether to enable max delay for the workqueue rate limiter.
296 # This is useful to avoid losing events when the workqueue is full.
298 # -- Specifies the maximum delay duration for the workqueue rate limiter.
300# REST Submitter Service configuration.
301# The submitter service itself is deployed separately (see submitter service repository).
302# These values configure the controller's connection to the submitter.
303# Enable via controller.featureGates RestSubmitter=true.
305 # -- URL of the REST submitter service endpoint.
306 serviceUrl: http://spark-operator-submitter-svc:8080/api/v1/spark-submit
307 # -- HTTP request timeout per spark submission attempt.
309 # -- How long the controller waits for the submitter service to become reachable at startup.
311 # -- Max retry attempts for transient submission failures.
313 # -- Initial backoff duration before the first retry. Doubles on each subsequent attempt.
315 # Controller startup probe settings. Allows the controller to block during startup
316 # without being killed by liveness probe. Should cover startupTimeout.
318 # -- Seconds between probe attempts.
320 # -- Number of failures before restart. (failureThreshold × periodSeconds) should >= startupTimeout.
323 # -- Specifies whether to enable webhook.
325 # -- Number of replicas of webhook server.
327 # -- The number of old history to retain to allow rollback.
328 revisionHistoryLimit: 10
330 # -- Specifies whether to enable leader election for webhook.
332 # -- Leader election lease duration.
334 # -- Leader election renew deadline.
336 # -- Leader election retry period.
338 # -- Configure the verbosity of logging, can be one of `debug`, `info`, `error`.
340 # -- Configure the encoder of logging, can be one of `console` or `json`.
342 # -- Specifies webhook port.
344 # -- Specifies webhook service port name.
346 # -- Specifies how unrecognized errors are handled.
347 # Available options are `Ignore` or `Fail`.
349 # -- Specifies the timeout seconds of the webhook, the value must be between 1 and 30.
351 # -- Maximum QPS to the API server from the controller client.
353 # -- Maximum burst for throttle from the controller client.
355 resourceQuotaEnforcement:
356 # -- Specifies whether to enable the ResourceQuota enforcement for SparkApplication resources.
359 # -- Specifies whether to create a service account for the webhook.
361 # -- Optional name for the webhook service account.
363 # -- Extra annotations for the webhook service account.
365 # -- Auto-mount service account token to the webhook pods.
366 automountServiceAccountToken: true
368 # -- Specifies whether to create RBAC resources for the webhook.
370 # -- Extra annotations for the webhook RBAC resources.
372 # -- Extra labels for webhook pods.
377 # -- Extra annotations for webhook pods.
382 # -- Annotations for the webhook Deployment resource (metadata.annotations).
383 deploymentAnnotations: {}
387 # -- Sidecar containers for webhook pods.
389 # -- Volumes for webhook pods.
391 # Create a dir for the webhook to generate its certificates in.
392 - name: serving-certs
395 # -- Node selector for webhook pods.
397 # -- Affinity for webhook pods.
399 # -- List of node taints to tolerate for webhook pods.
401 # -- Priority class for webhook pods.
402 priorityClassName: ""
403 # -- Security context for webhook pods.
406 # -- Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in.
407 # Ref: [Pod Topology Spread Constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/).
408 # The labelSelector field in topology spread constraint will be set to the selector labels for webhook pods if not specified.
409 topologySpreadConstraints: []
411 # topologyKey: topology.kubernetes.io/zone
412 # whenUnsatisfiable: ScheduleAnyway
414 # topologyKey: kubernetes.io/hostname
415 # whenUnsatisfiable: DoNotSchedule
417 # -- Whether to use user namespace or not
418 # Kubernetes version 1.30 for feature beta (1.33 for GA) or higher is required with support from OS and OCI runtime
419 # ref: https://kubernetes.io/docs/concepts/workloads/pods/user-namespaces/
421 # -- Environment variables for webhook containers.
423 # -- Environment variable sources for webhook containers.
425 # -- Volume mounts for webhook containers.
427 # Mount a dir for the webhook to generate its certificates in.
428 - name: serving-certs
429 mountPath: /etc/k8s-webhook-server/serving-certs
430 subPath: serving-certs
432 # -- Pod resource requests and limits for webhook pods.
441 # -- Security context for webhook containers.
443 readOnlyRootFilesystem: true
445 allowPrivilegeEscalation: false
452 # Pod disruption budget for webhook to avoid service degradation.
454 # -- Specifies whether to create pod disruption budget for webhook.
455 # Ref: [Specifying a Disruption Budget for your Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)
457 # -- The number of pods that must be available.
458 # Require `webhook.replicas` to be greater than 1
461 # -- List of namespaces where to run spark jobs.
462 # If empty string is included, all namespaces will be allowed.
463 # Namespaces specified here will be watched in addition to those matching jobNamespaceSelector.
464 # Make sure the namespaces have already existed.
467 # -- (object) Namespace label selector, in addition to jobNamespaces. Object with matchLabels and/or
468 # matchExpressions; the string form was removed in v2.6.0. When set alongside jobNamespaces,
469 # each webhook is registered twice (names, then labels).
470 jobNamespaceSelector: null
471 # jobNamespaceSelector:
474 # Spark RBAC covers jobNamespaces only; create it yourself for label-selected namespaces.
477 # -- Specifies whether to create a service account for spark applications.
479 # -- Optional name for the spark service account.
481 # -- Optional annotations for the spark service account.
483 # -- Auto-mount service account token to the spark applications pods.
484 automountServiceAccountToken: true
486 # -- Specifies whether to create RBAC resources for spark applications.
488 # -- Optional annotations for the spark application RBAC resources.
492 # -- Specifies whether to enable prometheus metrics scraping.
496 # -- Metrics port name.
498 # -- Metrics serving endpoint.
500 # -- Metrics prefix, will be added to all exported metrics.
502 # -- Job Submit Latency histogram buckets. Specified in seconds.
503 jobSubmitLatencyBuckets: "0.5,1,2,4,8,16,32,64,128,256"
504 # -- Job Start Latency histogram buckets. Specified in seconds.
505 jobStartLatencyBuckets: "30,60,90,120,150,180,210,240,270,300"
506 # -- Labels to be added to the Spark Operator standard metrics, e.g., "label1Key,label2Key".
507 # Defaults to 'app_type' if not set.
509 # Prometheus pod monitor for controller pods
511 # -- Specifies whether to create pod monitor.
512 # Note that prometheus metrics should be enabled as well.
514 # -- Pod monitor labels
516 # -- The label to use to retrieve the job name from
517 jobLabel: spark-operator-podmonitor
518 # -- Prometheus metrics endpoint properties. `metrics.portName` will be used as a port
523 # -- Specifies whether to use [cert-manager](https://cert-manager.io) to generate certificate for webhook.
524 # `webhook.enable` must be set to `true` to enable cert-manager.
526 # -- The reference to the issuer.
527 # @default -- A self-signed issuer will be created and used if not specified.
529 # group: cert-manager.io
530 # kind: ClusterIssuer
532 # -- The duration of the certificate validity (e.g. `2160h`).
533 # See [cert-manager.io/v1.Certificate](https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.Certificate).
534 # @default -- `2160h` (90 days) will be used if not specified.
536 # -- The duration before the certificate expiration to renew the certificate (e.g. `720h`).
537 # See [cert-manager.io/v1.Certificate](https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.Certificate).
538 # @default -- 1/3 of issued certificate’s lifetime.