Add spark operator chart 2.0.2
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
appVersion: 2.0.2
|
||||||
|
description: A Helm chart for Spark on Kubernetes operator.
|
||||||
|
home: https://github.com/kubeflow/spark-operator
|
||||||
|
keywords:
|
||||||
|
- apache spark
|
||||||
|
- big data
|
||||||
|
maintainers:
|
||||||
|
- email: yuchaoran2011@gmail.com
|
||||||
|
name: yuchaoran2011
|
||||||
|
url: https://github.com/yuchaoran2011
|
||||||
|
- email: github@chenyicn.net
|
||||||
|
name: ChenYi015
|
||||||
|
url: https://github.com/ChenYi015
|
||||||
|
name: spark-operator
|
||||||
|
version: 2.0.2
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
# spark-operator
|
||||||
|
|
||||||
|
 
|
||||||
|
|
||||||
|
A Helm chart for Spark on Kubernetes operator.
|
||||||
|
|
||||||
|
**Homepage:** <https://github.com/kubeflow/spark-operator>
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
This chart bootstraps a [Kubernetes Operator for Apache Spark](https://github.com/kubeflow/spark-operator) deployment using the [Helm](https://helm.sh) package manager.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Helm >= 3
|
||||||
|
- Kubernetes >= 1.16
|
||||||
|
|
||||||
|
## Previous Helm Chart
|
||||||
|
|
||||||
|
The previous `spark-operator` Helm chart hosted at [helm/charts](https://github.com/helm/charts) has been moved to this repository in accordance with the [Deprecation timeline](https://github.com/helm/charts#deprecation-timeline). Note that a few things have changed between this version and the old version:
|
||||||
|
|
||||||
|
- This repository **only** supports Helm chart installations using Helm 3+ since the `apiVersion` on the chart has been marked as `v2`.
|
||||||
|
- Previous versions of the Helm chart have not been migrated, and the version has been set to `1.0.0` at the onset. If you are looking for old versions of the chart, it's best to run `helm pull incubator/sparkoperator --version <your-version>` until you are ready to move to this repository's version.
|
||||||
|
- Several configuration properties have been changed, carefully review the [values](#values) section below to make sure you're aligned with the new values.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Add Helm Repo
|
||||||
|
|
||||||
|
```shell
|
||||||
|
helm repo add spark-operator https://kubeflow.github.io/spark-operator
|
||||||
|
|
||||||
|
helm repo update
|
||||||
|
```
|
||||||
|
|
||||||
|
See [helm repo](https://helm.sh/docs/helm/helm_repo) for command documentation.
|
||||||
|
|
||||||
|
### Install the chart
|
||||||
|
|
||||||
|
```shell
|
||||||
|
helm install [RELEASE_NAME] spark-operator/spark-operator
|
||||||
|
```
|
||||||
|
|
||||||
|
For example, if you want to create a release with name `spark-operator` in the `spark-operator` namespace:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
helm install spark-operator spark-operator/spark-operator \
|
||||||
|
--namespace spark-operator \
|
||||||
|
--create-namespace
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that by passing the `--create-namespace` flag to the `helm install` command, `helm` will create the release namespace if it does not exist.
|
||||||
|
|
||||||
|
See [helm install](https://helm.sh/docs/helm/helm_install) for command documentation.
|
||||||
|
|
||||||
|
### Upgrade the chart
|
||||||
|
|
||||||
|
```shell
|
||||||
|
helm upgrade [RELEASE_NAME] spark-operator/spark-operator [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade) for command documentation.
|
||||||
|
|
||||||
|
### Uninstall the chart
|
||||||
|
|
||||||
|
```shell
|
||||||
|
helm uninstall [RELEASE_NAME]
|
||||||
|
```
|
||||||
|
|
||||||
|
This removes all the Kubernetes resources associated with the chart and deletes the release, except for the `crds`, those will have to be removed manually.
|
||||||
|
|
||||||
|
See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall) for command documentation.
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
| Key | Type | Default | Description |
|
||||||
|
|-----|------|---------|-------------|
|
||||||
|
| nameOverride | string | `""` | String to partially override release name. |
|
||||||
|
| fullnameOverride | string | `""` | String to fully override release name. |
|
||||||
|
| commonLabels | object | `{}` | Common labels to add to the resources. |
|
||||||
|
| image.registry | string | `"docker.io"` | Image registry. |
|
||||||
|
| image.repository | string | `"kubeflow/spark-operator"` | Image repository. |
|
||||||
|
| image.tag | string | If not set, the chart appVersion will be used. | Image tag. |
|
||||||
|
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy. |
|
||||||
|
| image.pullSecrets | list | `[]` | Image pull secrets for private image registry. |
|
||||||
|
| controller.replicas | int | `1` | Number of replicas of controller. |
|
||||||
|
| controller.workers | int | `10` | Reconcile concurrency, higher values might increase memory usage. |
|
||||||
|
| controller.logLevel | string | `"info"` | Configure the verbosity of logging, can be one of `debug`, `info`, `error`. |
|
||||||
|
| controller.uiService.enable | bool | `true` | Specifies whether to create service for Spark web UI. |
|
||||||
|
| controller.uiIngress.enable | bool | `false` | Specifies whether to create ingress for Spark web UI. `controller.uiService.enable` must be `true` to enable ingress. |
|
||||||
|
| controller.uiIngress.urlFormat | string | `""` | Ingress URL format. Required if `controller.uiIngress.enable` is true. |
|
||||||
|
| controller.batchScheduler.enable | bool | `false` | Specifies whether to enable batch scheduler for spark jobs scheduling. If enabled, users can specify batch scheduler name in spark application. |
|
||||||
|
| controller.batchScheduler.kubeSchedulerNames | list | `[]` | Specifies a list of kube-scheduler names for scheduling Spark pods. |
|
||||||
|
| controller.batchScheduler.default | string | `""` | Default batch scheduler to be used if not specified by the user. If specified, this value must be either "volcano" or "yunikorn". Specifying any other value will cause the controller to error on startup. |
|
||||||
|
| controller.serviceAccount.create | bool | `true` | Specifies whether to create a service account for the controller. |
|
||||||
|
| controller.serviceAccount.name | string | `""` | Optional name for the controller service account. |
|
||||||
|
| controller.serviceAccount.annotations | object | `{}` | Extra annotations for the controller service account. |
|
||||||
|
| controller.rbac.create | bool | `true` | Specifies whether to create RBAC resources for the controller. |
|
||||||
|
| controller.rbac.annotations | object | `{}` | Extra annotations for the controller RBAC resources. |
|
||||||
|
| controller.labels | object | `{}` | Extra labels for controller pods. |
|
||||||
|
| controller.annotations | object | `{}` | Extra annotations for controller pods. |
|
||||||
|
| controller.volumes | list | `[]` | Volumes for controller pods. |
|
||||||
|
| controller.nodeSelector | object | `{}` | Node selector for controller pods. |
|
||||||
|
| controller.affinity | object | `{}` | Affinity for controller pods. |
|
||||||
|
| controller.tolerations | list | `[]` | List of node taints to tolerate for controller pods. |
|
||||||
|
| controller.priorityClassName | string | `""` | Priority class for controller pods. |
|
||||||
|
| controller.podSecurityContext | object | `{}` | Security context for controller pods. |
|
||||||
|
| controller.topologySpreadConstraints | list | `[]` | Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in. Ref: [Pod Topology Spread Constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/). The labelSelector field in topology spread constraint will be set to the selector labels for controller pods if not specified. |
|
||||||
|
| controller.env | list | `[]` | Environment variables for controller containers. |
|
||||||
|
| controller.envFrom | list | `[]` | Environment variable sources for controller containers. |
|
||||||
|
| controller.volumeMounts | list | `[]` | Volume mounts for controller containers. |
|
||||||
|
| controller.resources | object | `{}` | Pod resource requests and limits for controller containers. Note, that each job submission will spawn a JVM within the controller pods using "/usr/local/openjdk-11/bin/java -Xmx128m". Kubernetes may kill these Java processes at will to enforce resource limits. When that happens, you will see the following error: 'failed to run spark-submit for SparkApplication [...]: signal: killed' - when this happens, you may want to increase memory limits. |
|
||||||
|
| controller.securityContext | object | `{}` | Security context for controller containers. |
|
||||||
|
| controller.sidecars | list | `[]` | Sidecar containers for controller pods. |
|
||||||
|
| controller.podDisruptionBudget.enable | bool | `false` | Specifies whether to create pod disruption budget for controller. Ref: [Specifying a Disruption Budget for your Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) |
|
||||||
|
| controller.podDisruptionBudget.minAvailable | int | `1` | The number of pods that must be available. Require `controller.replicas` to be greater than 1 |
|
||||||
|
| controller.pprof.enable | bool | `false` | Specifies whether to enable pprof. |
|
||||||
|
| controller.pprof.port | int | `6060` | Specifies pprof port. |
|
||||||
|
| controller.pprof.portName | string | `"pprof"` | Specifies pprof service port name. |
|
||||||
|
| controller.workqueueRateLimiter.bucketQPS | int | `50` | Specifies the average rate of items process by the workqueue rate limiter. |
|
||||||
|
| controller.workqueueRateLimiter.bucketSize | int | `500` | Specifies the maximum number of items that can be in the workqueue at any given time. |
|
||||||
|
| controller.workqueueRateLimiter.maxDelay.enable | bool | `true` | Specifies whether to enable max delay for the workqueue rate limiter. This is useful to avoid losing events when the workqueue is full. |
|
||||||
|
| controller.workqueueRateLimiter.maxDelay.duration | string | `"6h"` | Specifies the maximum delay duration for the workqueue rate limiter. |
|
||||||
|
| webhook.enable | bool | `true` | Specifies whether to enable webhook. |
|
||||||
|
| webhook.replicas | int | `1` | Number of replicas of webhook server. |
|
||||||
|
| webhook.logLevel | string | `"info"` | Configure the verbosity of logging, can be one of `debug`, `info`, `error`. |
|
||||||
|
| webhook.port | int | `9443` | Specifies webhook port. |
|
||||||
|
| webhook.portName | string | `"webhook"` | Specifies webhook service port name. |
|
||||||
|
| webhook.failurePolicy | string | `"Fail"` | Specifies how unrecognized errors are handled. Available options are `Ignore` or `Fail`. |
|
||||||
|
| webhook.timeoutSeconds | int | `10` | Specifies the timeout seconds of the webhook, the value must be between 1 and 30. |
|
||||||
|
| webhook.resourceQuotaEnforcement.enable | bool | `false` | Specifies whether to enable the ResourceQuota enforcement for SparkApplication resources. |
|
||||||
|
| webhook.serviceAccount.create | bool | `true` | Specifies whether to create a service account for the webhook. |
|
||||||
|
| webhook.serviceAccount.name | string | `""` | Optional name for the webhook service account. |
|
||||||
|
| webhook.serviceAccount.annotations | object | `{}` | Extra annotations for the webhook service account. |
|
||||||
|
| webhook.rbac.create | bool | `true` | Specifies whether to create RBAC resources for the webhook. |
|
||||||
|
| webhook.rbac.annotations | object | `{}` | Extra annotations for the webhook RBAC resources. |
|
||||||
|
| webhook.labels | object | `{}` | Extra labels for webhook pods. |
|
||||||
|
| webhook.annotations | object | `{}` | Extra annotations for webhook pods. |
|
||||||
|
| webhook.sidecars | list | `[]` | Sidecar containers for webhook pods. |
|
||||||
|
| webhook.volumes | list | `[]` | Volumes for webhook pods. |
|
||||||
|
| webhook.nodeSelector | object | `{}` | Node selector for webhook pods. |
|
||||||
|
| webhook.affinity | object | `{}` | Affinity for webhook pods. |
|
||||||
|
| webhook.tolerations | list | `[]` | List of node taints to tolerate for webhook pods. |
|
||||||
|
| webhook.priorityClassName | string | `""` | Priority class for webhook pods. |
|
||||||
|
| webhook.podSecurityContext | object | `{}` | Security context for webhook pods. |
|
||||||
|
| webhook.topologySpreadConstraints | list | `[]` | Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in. Ref: [Pod Topology Spread Constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/). The labelSelector field in topology spread constraint will be set to the selector labels for webhook pods if not specified. |
|
||||||
|
| webhook.env | list | `[]` | Environment variables for webhook containers. |
|
||||||
|
| webhook.envFrom | list | `[]` | Environment variable sources for webhook containers. |
|
||||||
|
| webhook.volumeMounts | list | `[]` | Volume mounts for webhook containers. |
|
||||||
|
| webhook.resources | object | `{}` | Pod resource requests and limits for webhook pods. |
|
||||||
|
| webhook.securityContext | object | `{}` | Security context for webhook containers. |
|
||||||
|
| webhook.podDisruptionBudget.enable | bool | `false` | Specifies whether to create pod disruption budget for webhook. Ref: [Specifying a Disruption Budget for your Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) |
|
||||||
|
| webhook.podDisruptionBudget.minAvailable | int | `1` | The number of pods that must be available. Require `webhook.replicas` to be greater than 1 |
|
||||||
|
| spark.jobNamespaces | list | `["default"]` | List of namespaces where to run spark jobs. If empty string is included, all namespaces will be allowed. Make sure the namespaces have already existed. |
|
||||||
|
| spark.serviceAccount.create | bool | `true` | Specifies whether to create a service account for spark applications. |
|
||||||
|
| spark.serviceAccount.name | string | `""` | Optional name for the spark service account. |
|
||||||
|
| spark.serviceAccount.annotations | object | `{}` | Optional annotations for the spark service account. |
|
||||||
|
| spark.rbac.create | bool | `true` | Specifies whether to create RBAC resources for spark applications. |
|
||||||
|
| spark.rbac.annotations | object | `{}` | Optional annotations for the spark application RBAC resources. |
|
||||||
|
| prometheus.metrics.enable | bool | `true` | Specifies whether to enable prometheus metrics scraping. |
|
||||||
|
| prometheus.metrics.port | int | `8080` | Metrics port. |
|
||||||
|
| prometheus.metrics.portName | string | `"metrics"` | Metrics port name. |
|
||||||
|
| prometheus.metrics.endpoint | string | `"/metrics"` | Metrics serving endpoint. |
|
||||||
|
| prometheus.metrics.prefix | string | `""` | Metrics prefix, will be added to all exported metrics. |
|
||||||
|
| prometheus.podMonitor.create | bool | `false` | Specifies whether to create pod monitor. Note that prometheus metrics should be enabled as well. |
|
||||||
|
| prometheus.podMonitor.labels | object | `{}` | Pod monitor labels |
|
||||||
|
| prometheus.podMonitor.jobLabel | string | `"spark-operator-podmonitor"` | The label to use to retrieve the job name from |
|
||||||
|
| prometheus.podMonitor.podMetricsEndpoint | object | `{"interval":"5s","scheme":"http"}` | Prometheus metrics endpoint properties. `metrics.portName` will be used as a port |
|
||||||
|
|
||||||
|
## Maintainers
|
||||||
|
|
||||||
|
| Name | Email | Url |
|
||||||
|
| ---- | ------ | --- |
|
||||||
|
| yuchaoran2011 | <yuchaoran2011@gmail.com> | <https://github.com/yuchaoran2011> |
|
||||||
|
| ChenYi015 | <github@chenyicn.net> | <https://github.com/ChenYi015> |
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,78 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "spark-operator.chart" . }}
|
||||||
|
{{ include "spark-operator.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- with .Values.commonLabels }}
|
||||||
|
{{ toYaml . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "spark-operator.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Spark Operator image
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.image" -}}
|
||||||
|
{{ printf "%s/%s:%s" .Values.image.registry .Values.image.repository (.Values.image.tag | default .Chart.AppVersion) }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,204 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of controller component
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.controller.name" -}}
|
||||||
|
{{- include "spark-operator.fullname" . }}-controller
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels for the controller
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.controller.labels" -}}
|
||||||
|
{{ include "spark-operator.labels" . }}
|
||||||
|
app.kubernetes.io/component: controller
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels for the controller
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.controller.selectorLabels" -}}
|
||||||
|
{{ include "spark-operator.selectorLabels" . }}
|
||||||
|
app.kubernetes.io/component: controller
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to be used by the controller
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.controller.serviceAccountName" -}}
|
||||||
|
{{- if .Values.controller.serviceAccount.create -}}
|
||||||
|
{{ .Values.controller.serviceAccount.name | default (include "spark-operator.controller.name" .) }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ .Values.controller.serviceAccount.name | default "default" }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the cluster role to be used by the controller
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.controller.clusterRoleName" -}}
|
||||||
|
{{ include "spark-operator.controller.name" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the cluster role binding to be used by the controller
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.controller.clusterRoleBindingName" -}}
|
||||||
|
{{ include "spark-operator.controller.clusterRoleName" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the role to be used by the controller
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.controller.roleName" -}}
|
||||||
|
{{ include "spark-operator.controller.name" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the role binding to be used by the controller
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.controller.roleBindingName" -}}
|
||||||
|
{{ include "spark-operator.controller.roleName" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the deployment to be used by controller
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.controller.deploymentName" -}}
|
||||||
|
{{ include "spark-operator.controller.name" . }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the lease resource to be used by leader election
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.controller.leaderElectionName" -}}
|
||||||
|
{{ include "spark-operator.controller.name" . }}-lock
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the pod disruption budget to be used by controller
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.controller.podDisruptionBudgetName" -}}
|
||||||
|
{{ include "spark-operator.controller.name" . }}-pdb
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service used by controller
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.controller.serviceName" -}}
|
||||||
|
{{ include "spark-operator.controller.name" . }}-svc
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the role policy rules for the controller in every Spark job namespace
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.controller.policyRules" -}}
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- create
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- configmaps
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- create
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- persistentvolumeclaims
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- create
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- services
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- create
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
- apiGroups:
|
||||||
|
- extensions
|
||||||
|
- networking.k8s.io
|
||||||
|
resources:
|
||||||
|
- ingresses
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- apiGroups:
|
||||||
|
- sparkoperator.k8s.io
|
||||||
|
resources:
|
||||||
|
- sparkapplications
|
||||||
|
- scheduledsparkapplications
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- create
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
- apiGroups:
|
||||||
|
- sparkoperator.k8s.io
|
||||||
|
resources:
|
||||||
|
- sparkapplications/status
|
||||||
|
- sparkapplications/finalizers
|
||||||
|
- scheduledsparkapplications/status
|
||||||
|
- scheduledsparkapplications/finalizers
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
{{- if .Values.controller.batchScheduler.enable }}
|
||||||
|
{{/* required for the `volcano` batch scheduler */}}
|
||||||
|
- apiGroups:
|
||||||
|
- scheduling.incubator.k8s.io
|
||||||
|
- scheduling.sigs.dev
|
||||||
|
- scheduling.volcano.sh
|
||||||
|
resources:
|
||||||
|
- podgroups
|
||||||
|
verbs:
|
||||||
|
- "*"
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,184 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.controller.deploymentName" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.controller.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.controller.replicas }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "spark-operator.controller.selectorLabels" . | nindent 6 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.controller.selectorLabels" . | nindent 8 }}
|
||||||
|
{{- with .Values.controller.labels }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.controller.annotations .Values.prometheus.metrics.enable }}
|
||||||
|
annotations:
|
||||||
|
{{- if .Values.prometheus.metrics.enable }}
|
||||||
|
prometheus.io/scrape: "true"
|
||||||
|
prometheus.io/port: {{ .Values.prometheus.metrics.port | quote }}
|
||||||
|
prometheus.io/path: {{ .Values.prometheus.metrics.endpoint }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.annotations }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: spark-operator-controller
|
||||||
|
image: {{ include "spark-operator.image" . }}
|
||||||
|
{{- with .Values.image.pullPolicy }}
|
||||||
|
imagePullPolicy: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
args:
|
||||||
|
- controller
|
||||||
|
- start
|
||||||
|
{{- with .Values.controller.logLevel }}
|
||||||
|
- --zap-log-level={{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.spark.jobNamespaces }}
|
||||||
|
{{- if has "" . }}
|
||||||
|
- --namespaces=""
|
||||||
|
{{- else }}
|
||||||
|
- --namespaces={{ . | join "," }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
- --controller-threads={{ .Values.controller.workers }}
|
||||||
|
{{- with .Values.controller.uiService.enable }}
|
||||||
|
- --enable-ui-service=true
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.uiIngress.enable }}
|
||||||
|
{{- with .Values.controller.uiIngress.urlFormat }}
|
||||||
|
- --ingress-url-format={{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.batchScheduler.enable }}
|
||||||
|
- --enable-batch-scheduler=true
|
||||||
|
{{- with .Values.controller.batchScheduler.kubeSchedulerNames }}
|
||||||
|
- --kube-scheduler-names={{ . | join "," }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.batchScheduler.default }}
|
||||||
|
- --default-batch-scheduler={{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.prometheus.metrics.enable }}
|
||||||
|
- --enable-metrics=true
|
||||||
|
- --metrics-bind-address=:{{ .Values.prometheus.metrics.port }}
|
||||||
|
- --metrics-endpoint={{ .Values.prometheus.metrics.endpoint }}
|
||||||
|
- --metrics-prefix={{ .Values.prometheus.metrics.prefix }}
|
||||||
|
- --metrics-labels=app_type
|
||||||
|
{{- end }}
|
||||||
|
- --leader-election=true
|
||||||
|
- --leader-election-lock-name={{ include "spark-operator.controller.leaderElectionName" . }}
|
||||||
|
- --leader-election-lock-namespace={{ .Release.Namespace }}
|
||||||
|
{{- if .Values.controller.pprof.enable }}
|
||||||
|
- --pprof-bind-address=:{{ .Values.controller.pprof.port }}
|
||||||
|
{{- end }}
|
||||||
|
- --workqueue-ratelimiter-bucket-qps={{ .Values.controller.workqueueRateLimiter.bucketQPS }}
|
||||||
|
- --workqueue-ratelimiter-bucket-size={{ .Values.controller.workqueueRateLimiter.bucketSize }}
|
||||||
|
{{- if .Values.controller.workqueueRateLimiter.maxDelay.enable }}
|
||||||
|
- --workqueue-ratelimiter-max-delay={{ .Values.controller.workqueueRateLimiter.maxDelay.duration }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.prometheus.metrics.enable .Values.controller.pprof.enable }}
|
||||||
|
ports:
|
||||||
|
{{- if .Values.controller.pprof.enable }}
|
||||||
|
- name: {{ .Values.controller.pprof.portName | quote }}
|
||||||
|
containerPort: {{ .Values.controller.pprof.port }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.prometheus.metrics.enable }}
|
||||||
|
- name: {{ .Values.prometheus.metrics.portName | quote }}
|
||||||
|
containerPort: {{ .Values.prometheus.metrics.port }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.env }}
|
||||||
|
env:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.envFrom }}
|
||||||
|
envFrom:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.volumeMounts }}
|
||||||
|
volumeMounts:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.resources }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: 8081
|
||||||
|
scheme: HTTP
|
||||||
|
path: /healthz
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: 8081
|
||||||
|
scheme: HTTP
|
||||||
|
path: /readyz
|
||||||
|
{{- with .Values.controller.securityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.sidecars }}
|
||||||
|
{{- toYaml . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.image.pullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.volumes }}
|
||||||
|
volumes:
|
||||||
|
{{- toYaml . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.controller.priorityClassName }}
|
||||||
|
priorityClassName: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
serviceAccountName: {{ include "spark-operator.controller.serviceAccountName" . }}
|
||||||
|
{{- with .Values.controller.podSecurityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.controller.topologySpreadConstraints }}
|
||||||
|
{{- if le (int .Values.controller.replicas) 1 }}
|
||||||
|
{{- fail "controller.replicas must be greater than 1 to enable topology spread constraints for controller pods"}}
|
||||||
|
{{- end }}
|
||||||
|
{{- $selectorLabels := include "spark-operator.controller.selectorLabels" . | fromYaml }}
|
||||||
|
{{- $labelSelectorDict := dict "labelSelector" ( dict "matchLabels" $selectorLabels ) }}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{- range .Values.controller.topologySpreadConstraints }}
|
||||||
|
- {{ mergeOverwrite . $labelSelectorDict | toYaml | nindent 8 | trim }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.controller.podDisruptionBudget.enable }}
|
||||||
|
{{- if le (int .Values.controller.replicas) 1 }}
|
||||||
|
{{- fail "controller.replicas must be greater than 1 to enable pod disruption budget for controller" }}
|
||||||
|
{{- end -}}
|
||||||
|
apiVersion: policy/v1
|
||||||
|
kind: PodDisruptionBudget
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.controller.podDisruptionBudgetName" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.controller.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "spark-operator.controller.selectorLabels" . | nindent 6 }}
|
||||||
|
{{- with .Values.controller.podDisruptionBudget.minAvailable }}
|
||||||
|
minAvailable: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.controller.rbac.create -}}
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.controller.clusterRoleName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.controller.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.controller.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- nodes
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- events
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- apiGroups:
|
||||||
|
- apiextensions.k8s.io
|
||||||
|
resources:
|
||||||
|
- customresourcedefinitions
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
{{- if not .Values.spark.jobNamespaces | or (has "" .Values.spark.jobNamespaces) }}
|
||||||
|
{{ include "spark-operator.controller.policyRules" . }}
|
||||||
|
{{- end }}
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.controller.clusterRoleBindingName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.controller.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.controller.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ include "spark-operator.controller.serviceAccountName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: {{ include "spark-operator.controller.clusterRoleName" . }}
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.controller.roleName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.controller.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.controller.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- coordination.k8s.io
|
||||||
|
resources:
|
||||||
|
- leases
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- apiGroups:
|
||||||
|
- coordination.k8s.io
|
||||||
|
resources:
|
||||||
|
- leases
|
||||||
|
resourceNames:
|
||||||
|
- {{ include "spark-operator.controller.leaderElectionName" . }}
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- update
|
||||||
|
{{- if has .Release.Namespace .Values.spark.jobNamespaces }}
|
||||||
|
{{ include "spark-operator.controller.policyRules" . }}
|
||||||
|
{{- end }}
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.controller.roleBindingName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.controller.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.controller.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ include "spark-operator.controller.serviceAccountName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ include "spark-operator.controller.roleName" . }}
|
||||||
|
|
||||||
|
{{- if and .Values.spark.jobNamespaces (not (has "" .Values.spark.jobNamespaces)) }}
|
||||||
|
{{- range $jobNamespace := .Values.spark.jobNamespaces }}
|
||||||
|
{{- if ne $jobNamespace $.Release.Namespace }}
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.controller.roleName" $ }}
|
||||||
|
namespace: {{ $jobNamespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.controller.labels" $ | nindent 4 }}
|
||||||
|
{{- with $.Values.controller.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{ include "spark-operator.controller.policyRules" $ }}
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.controller.roleBindingName" $ }}
|
||||||
|
namespace: {{ $jobNamespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.controller.labels" $ | nindent 4 }}
|
||||||
|
{{- with $.Values.controller.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ include "spark-operator.controller.serviceAccountName" $ }}
|
||||||
|
namespace: {{ $.Release.Namespace }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ include "spark-operator.controller.roleName" $ }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.controller.pprof.enable }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.controller.serviceName" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.controller.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
{{- include "spark-operator.controller.selectorLabels" . | nindent 4 }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.controller.pprof.port }}
|
||||||
|
targetPort: {{ .Values.controller.pprof.portName | quote }}
|
||||||
|
name: {{ .Values.controller.pprof.portName }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.controller.serviceAccount.create }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.controller.serviceAccountName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.controller.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.controller.serviceAccount.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of pod monitor
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.prometheus.podMonitorName" -}}
|
||||||
|
{{- include "spark-operator.fullname" . }}-podmonitor
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.prometheus.podMonitor.create -}}
|
||||||
|
{{- if not .Values.prometheus.metrics.enable }}
|
||||||
|
{{- fail "`metrics.enable` must be set to true when `podMonitor.create` is true." }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if not (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/PodMonitor") }}
|
||||||
|
{{- fail "The cluster does not support the required API version `monitoring.coreos.com/v1` for `PodMonitor`." }}
|
||||||
|
{{- end }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PodMonitor
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.prometheus.podMonitorName" . }}
|
||||||
|
{{- with .Values.prometheus.podMonitor.labels }}
|
||||||
|
labels:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
podMetricsEndpoints:
|
||||||
|
- interval: {{ .Values.prometheus.podMonitor.podMetricsEndpoint.interval }}
|
||||||
|
port: {{ .Values.prometheus.metrics.portName | quote }}
|
||||||
|
scheme: {{ .Values.prometheus.podMonitor.podMetricsEndpoint.scheme }}
|
||||||
|
jobLabel: {{ .Values.prometheus.podMonitor.jobLabel }}
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- {{ .Release.Namespace }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "spark-operator.selectorLabels" . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of spark component
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.spark.name" -}}
|
||||||
|
{{- include "spark-operator.fullname" . }}-spark
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to be used by spark applications
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.spark.serviceAccountName" -}}
|
||||||
|
{{- if .Values.spark.serviceAccount.create -}}
|
||||||
|
{{- .Values.spark.serviceAccount.name | default (include "spark-operator.spark.name" .) -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Values.spark.serviceAccount.name | default "default" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the role to be used by spark service account
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.spark.roleName" -}}
|
||||||
|
{{- include "spark-operator.spark.serviceAccountName" . }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the role binding to be used by spark service account
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.spark.roleBindingName" -}}
|
||||||
|
{{- include "spark-operator.spark.serviceAccountName" . }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.spark.rbac.create -}}
|
||||||
|
{{- range $jobNamespace := .Values.spark.jobNamespaces | default list }}
|
||||||
|
{{- if ne $jobNamespace "" }}
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.spark.roleName" $ }}
|
||||||
|
namespace: {{ $jobNamespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.labels" $ | nindent 4 }}
|
||||||
|
{{- with $.Values.spark.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
- configmaps
|
||||||
|
- persistentvolumeclaims
|
||||||
|
- services
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- create
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.spark.roleBindingName" $ }}
|
||||||
|
namespace: {{ $jobNamespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.labels" $ | nindent 4 }}
|
||||||
|
{{- with $.Values.spark.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ include "spark-operator.spark.serviceAccountName" $ }}
|
||||||
|
namespace: {{ $jobNamespace }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ include "spark-operator.spark.roleName" $ }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.spark.serviceAccount.create }}
|
||||||
|
{{- range $jobNamespace := .Values.spark.jobNamespaces | default list }}
|
||||||
|
{{- if ne $jobNamespace "" }}
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.spark.serviceAccountName" $ }}
|
||||||
|
namespace: {{ $jobNamespace }}
|
||||||
|
labels: {{ include "spark-operator.labels" $ | nindent 4 }}
|
||||||
|
{{- with $.Values.spark.serviceAccount.annotations }}
|
||||||
|
annotations: {{ toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,166 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of webhook component
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.webhook.name" -}}
|
||||||
|
{{- include "spark-operator.fullname" . }}-webhook
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels for the webhook
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.webhook.labels" -}}
|
||||||
|
{{ include "spark-operator.labels" . }}
|
||||||
|
app.kubernetes.io/component: webhook
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels for the webhook
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.webhook.selectorLabels" -}}
|
||||||
|
{{ include "spark-operator.selectorLabels" . }}
|
||||||
|
app.kubernetes.io/component: webhook
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of service account to be used by webhook
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.webhook.serviceAccountName" -}}
|
||||||
|
{{- if .Values.webhook.serviceAccount.create -}}
|
||||||
|
{{ .Values.webhook.serviceAccount.name | default (include "spark-operator.webhook.name" .) }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ .Values.webhook.serviceAccount.name | default "default" }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the cluster role to be used by the webhook
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.webhook.clusterRoleName" -}}
|
||||||
|
{{ include "spark-operator.webhook.name" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the cluster role binding to be used by the webhook
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.webhook.clusterRoleBindingName" -}}
|
||||||
|
{{ include "spark-operator.webhook.clusterRoleName" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the role to be used by the webhook
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.webhook.roleName" -}}
|
||||||
|
{{ include "spark-operator.webhook.name" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the role binding to be used by the webhook
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.webhook.roleBindingName" -}}
|
||||||
|
{{ include "spark-operator.webhook.roleName" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the secret to be used by webhook
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.webhook.secretName" -}}
|
||||||
|
{{ include "spark-operator.webhook.name" . }}-certs
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service to be used by webhook
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.webhook.serviceName" -}}
|
||||||
|
{{ include "spark-operator.webhook.name" . }}-svc
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of mutating webhook configuration
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.mutatingWebhookConfigurationName" -}}
|
||||||
|
webhook.sparkoperator.k8s.io
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of mutating webhook configuration
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.validatingWebhookConfigurationName" -}}
|
||||||
|
quotaenforcer.sparkoperator.k8s.io
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the deployment to be used by webhook
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.webhook.deploymentName" -}}
|
||||||
|
{{ include "spark-operator.webhook.name" . }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the lease resource to be used by leader election
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.webhook.leaderElectionName" -}}
|
||||||
|
{{ include "spark-operator.webhook.name" . }}-lock
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the pod disruption budget to be used by webhook
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.webhook.podDisruptionBudgetName" -}}
|
||||||
|
{{ include "spark-operator.webhook.name" . }}-pdb
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the role policy rules for the webhook in every Spark job namespace
|
||||||
|
*/}}
|
||||||
|
{{- define "spark-operator.webhook.policyRules" -}}
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- resourcequotas
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- sparkoperator.k8s.io
|
||||||
|
resources:
|
||||||
|
- sparkapplications
|
||||||
|
- sparkapplications/status
|
||||||
|
- sparkapplications/finalizers
|
||||||
|
- scheduledsparkapplications
|
||||||
|
- scheduledsparkapplications/status
|
||||||
|
- scheduledsparkapplications/finalizers
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- create
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.webhook.enable }}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.webhook.deploymentName" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.webhook.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.webhook.replicas }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "spark-operator.webhook.selectorLabels" . | nindent 6 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.webhook.selectorLabels" . | nindent 8 }}
|
||||||
|
{{- with .Values.webhook.labels }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.webhook.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: spark-operator-webhook
|
||||||
|
image: {{ include "spark-operator.image" . }}
|
||||||
|
{{- with .Values.image.pullPolicy }}
|
||||||
|
imagePullPolicy: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
args:
|
||||||
|
- webhook
|
||||||
|
- start
|
||||||
|
{{- with .Values.webhook.logLevel }}
|
||||||
|
- --zap-log-level={{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.spark.jobNamespaces }}
|
||||||
|
{{- if has "" . }}
|
||||||
|
- --namespaces=""
|
||||||
|
{{- else }}
|
||||||
|
- --namespaces={{ . | join "," }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
- --webhook-secret-name={{ include "spark-operator.webhook.secretName" . }}
|
||||||
|
- --webhook-secret-namespace={{ .Release.Namespace }}
|
||||||
|
- --webhook-svc-name={{ include "spark-operator.webhook.serviceName" . }}
|
||||||
|
- --webhook-svc-namespace={{ .Release.Namespace }}
|
||||||
|
- --webhook-port={{ .Values.webhook.port }}
|
||||||
|
- --mutating-webhook-name={{ include "spark-operator.webhook.name" . }}
|
||||||
|
- --validating-webhook-name={{ include "spark-operator.webhook.name" . }}
|
||||||
|
{{- with .Values.webhook.resourceQuotaEnforcement.enable }}
|
||||||
|
- --enable-resource-quota-enforcement=true
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.prometheus.metrics.enable }}
|
||||||
|
- --enable-metrics=true
|
||||||
|
- --metrics-bind-address=:{{ .Values.prometheus.metrics.port }}
|
||||||
|
- --metrics-endpoint={{ .Values.prometheus.metrics.endpoint }}
|
||||||
|
- --metrics-prefix={{ .Values.prometheus.metrics.prefix }}
|
||||||
|
- --metrics-labels=app_type
|
||||||
|
{{- end }}
|
||||||
|
- --leader-election=true
|
||||||
|
- --leader-election-lock-name={{ include "spark-operator.webhook.leaderElectionName" . }}
|
||||||
|
- --leader-election-lock-namespace={{ .Release.Namespace }}
|
||||||
|
ports:
|
||||||
|
- name: {{ .Values.webhook.portName | quote }}
|
||||||
|
containerPort: {{ .Values.webhook.port }}
|
||||||
|
{{- if .Values.prometheus.metrics.enable }}
|
||||||
|
- name: {{ .Values.prometheus.metrics.portName | quote }}
|
||||||
|
containerPort: {{ .Values.prometheus.metrics.port }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.webhook.env }}
|
||||||
|
env:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.webhook.envFrom }}
|
||||||
|
envFrom:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.webhook.volumeMounts }}
|
||||||
|
volumeMounts:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.webhook.resources }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: 8081
|
||||||
|
scheme: HTTP
|
||||||
|
path: /healthz
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: 8081
|
||||||
|
scheme: HTTP
|
||||||
|
path: /readyz
|
||||||
|
{{- with .Values.webhook.securityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.webhook.sidecars }}
|
||||||
|
{{- toYaml . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.image.pullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.webhook.volumes }}
|
||||||
|
volumes:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.webhook.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.webhook.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.webhook.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.webhook.priorityClassName }}
|
||||||
|
priorityClassName: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
serviceAccountName: {{ include "spark-operator.webhook.serviceAccountName" . }}
|
||||||
|
{{- with .Values.webhook.podSecurityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.webhook.topologySpreadConstraints }}
|
||||||
|
{{- if le (int .Values.webhook.replicas) 1 }}
|
||||||
|
{{- fail "webhook.replicas must be greater than 1 to enable topology spread constraints for webhook pods"}}
|
||||||
|
{{- end }}
|
||||||
|
{{- $selectorLabels := include "spark-operator.webhook.selectorLabels" . | fromYaml }}
|
||||||
|
{{- $labelSelectorDict := dict "labelSelector" ( dict "matchLabels" $selectorLabels ) }}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{- range .Values.webhook.topologySpreadConstraints }}
|
||||||
|
- {{ mergeOverwrite . $labelSelectorDict | toYaml | nindent 8 | trim }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.webhook.enable }}
|
||||||
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
|
kind: MutatingWebhookConfiguration
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.webhook.name" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.webhook.labels" . | nindent 4 }}
|
||||||
|
webhooks:
|
||||||
|
- name: mutate--v1-pod.sparkoperator.k8s.io
|
||||||
|
admissionReviewVersions: ["v1"]
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: {{ include "spark-operator.webhook.serviceName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
port: {{ .Values.webhook.port }}
|
||||||
|
path: /mutate--v1-pod
|
||||||
|
sideEffects: NoneOnDryRun
|
||||||
|
{{- with .Values.webhook.failurePolicy }}
|
||||||
|
failurePolicy: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.spark.jobNamespaces }}
|
||||||
|
{{- if not (has "" .) }}
|
||||||
|
namespaceSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: kubernetes.io/metadata.name
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $jobNamespace := . }}
|
||||||
|
- {{ $jobNamespace }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
objectSelector:
|
||||||
|
matchLabels:
|
||||||
|
sparkoperator.k8s.io/launched-by-spark-operator: "true"
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
apiVersions: ["v1"]
|
||||||
|
resources: ["pods"]
|
||||||
|
operations: ["CREATE"]
|
||||||
|
{{- with .Values.webhook.timeoutSeconds }}
|
||||||
|
timeoutSeconds: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
- name: mutate-sparkoperator-k8s-io-v1beta2-sparkapplication.sparkoperator.k8s.io
|
||||||
|
admissionReviewVersions: ["v1"]
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: {{ include "spark-operator.webhook.serviceName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
port: {{ .Values.webhook.port }}
|
||||||
|
path: /mutate-sparkoperator-k8s-io-v1beta2-sparkapplication
|
||||||
|
sideEffects: NoneOnDryRun
|
||||||
|
{{- with .Values.webhook.failurePolicy }}
|
||||||
|
failurePolicy: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.spark.jobNamespaces }}
|
||||||
|
{{- if not (has "" .) }}
|
||||||
|
namespaceSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: kubernetes.io/metadata.name
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $jobNamespace := . }}
|
||||||
|
- {{ $jobNamespace }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["sparkoperator.k8s.io"]
|
||||||
|
apiVersions: ["v1beta2"]
|
||||||
|
resources: ["sparkapplications"]
|
||||||
|
operations: ["CREATE", "UPDATE"]
|
||||||
|
{{- with .Values.webhook.timeoutSeconds }}
|
||||||
|
timeoutSeconds: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
- name: mutate-sparkoperator-k8s-io-v1beta2-scheduledsparkapplication.sparkoperator.k8s.io
|
||||||
|
admissionReviewVersions: ["v1"]
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: {{ include "spark-operator.webhook.serviceName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
port: {{ .Values.webhook.port }}
|
||||||
|
path: /mutate-sparkoperator-k8s-io-v1beta2-scheduledsparkapplication
|
||||||
|
sideEffects: NoneOnDryRun
|
||||||
|
{{- with .Values.webhook.failurePolicy }}
|
||||||
|
failurePolicy: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.spark.jobNamespaces }}
|
||||||
|
{{- if not (has "" .) }}
|
||||||
|
namespaceSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: kubernetes.io/metadata.name
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $jobNamespace := . }}
|
||||||
|
- {{ $jobNamespace }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["sparkoperator.k8s.io"]
|
||||||
|
apiVersions: ["v1beta2"]
|
||||||
|
resources: ["scheduledsparkapplications"]
|
||||||
|
operations: ["CREATE", "UPDATE"]
|
||||||
|
{{- with .Values.webhook.timeoutSeconds }}
|
||||||
|
timeoutSeconds: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.webhook.enable }}
|
||||||
|
{{- if .Values.webhook.podDisruptionBudget.enable }}
|
||||||
|
{{- if le (int .Values.webhook.replicas) 1 }}
|
||||||
|
{{- fail "webhook.replicas must be greater than 1 to enable pod disruption budget for webhook" }}
|
||||||
|
{{- end -}}
|
||||||
|
apiVersion: policy/v1
|
||||||
|
kind: PodDisruptionBudget
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.webhook.podDisruptionBudgetName" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.webhook.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "spark-operator.webhook.selectorLabels" . | nindent 6 }}
|
||||||
|
{{- with .Values.webhook.podDisruptionBudget.minAvailable }}
|
||||||
|
minAvailable: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,193 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.webhook.enable }}
|
||||||
|
{{- if .Values.webhook.rbac.create }}
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.webhook.clusterRoleName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.webhook.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.webhook.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- events
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- apiGroups:
|
||||||
|
- admissionregistration.k8s.io
|
||||||
|
resources:
|
||||||
|
- mutatingwebhookconfigurations
|
||||||
|
- validatingwebhookconfigurations
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- admissionregistration.k8s.io
|
||||||
|
resources:
|
||||||
|
- mutatingwebhookconfigurations
|
||||||
|
- validatingwebhookconfigurations
|
||||||
|
resourceNames:
|
||||||
|
- {{ include "spark-operator.webhook.name" . }}
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- update
|
||||||
|
{{- if not .Values.spark.jobNamespaces | or (has "" .Values.spark.jobNamespaces) }}
|
||||||
|
{{ include "spark-operator.webhook.policyRules" . }}
|
||||||
|
{{- end }}
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.webhook.clusterRoleBindingName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.webhook.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.webhook.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ include "spark-operator.webhook.serviceAccountName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: {{ include "spark-operator.webhook.clusterRoleName" . }}
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.webhook.roleName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.webhook.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.webhook.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- secrets
|
||||||
|
resourceNames:
|
||||||
|
- {{ include "spark-operator.webhook.secretName" . }}
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- coordination.k8s.io
|
||||||
|
resources:
|
||||||
|
- leases
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- apiGroups:
|
||||||
|
- coordination.k8s.io
|
||||||
|
resources:
|
||||||
|
- leases
|
||||||
|
resourceNames:
|
||||||
|
- {{ include "spark-operator.webhook.leaderElectionName" . }}
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- update
|
||||||
|
{{- if has .Release.Namespace .Values.spark.jobNamespaces }}
|
||||||
|
{{ include "spark-operator.webhook.policyRules" . }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.webhook.roleBindingName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.webhook.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.webhook.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ include "spark-operator.webhook.serviceAccountName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ include "spark-operator.webhook.roleName" . }}
|
||||||
|
|
||||||
|
{{- if and .Values.spark.jobNamespaces (not (has "" .Values.spark.jobNamespaces)) }}
|
||||||
|
{{- range $jobNamespace := .Values.spark.jobNamespaces }}
|
||||||
|
{{- if ne $jobNamespace $.Release.Namespace }}
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.webhook.roleName" $ }}
|
||||||
|
namespace: {{ $jobNamespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.webhook.labels" $ | nindent 4 }}
|
||||||
|
{{- with $.Values.webhook.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{ include "spark-operator.webhook.policyRules" $ }}
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.webhook.roleBindingName" $ }}
|
||||||
|
namespace: {{ $jobNamespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.webhook.labels" $ | nindent 4 }}
|
||||||
|
{{- with $.Values.webhook.rbac.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ include "spark-operator.webhook.serviceAccountName" $ }}
|
||||||
|
namespace: {{ $.Release.Namespace }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: {{ include "spark-operator.webhook.roleName" $ }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.webhook.enable }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.webhook.serviceName" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.webhook.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
{{- include "spark-operator.webhook.selectorLabels" . | nindent 4 }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.webhook.port }}
|
||||||
|
targetPort: {{ .Values.webhook.portName | quote }}
|
||||||
|
name: {{ .Values.webhook.portName }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.webhook.enable }}
|
||||||
|
{{- if .Values.webhook.serviceAccount.create -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.webhook.serviceAccountName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.webhook.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.webhook.serviceAccount.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2024 The Kubeflow authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.webhook.enable }}
|
||||||
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
|
kind: ValidatingWebhookConfiguration
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spark-operator.webhook.name" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "spark-operator.webhook.labels" . | nindent 4 }}
|
||||||
|
webhooks:
|
||||||
|
- name: validate-sparkoperator-k8s-io-v1beta2-sparkapplication.sparkoperator.k8s.io
|
||||||
|
admissionReviewVersions: ["v1"]
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: {{ include "spark-operator.webhook.serviceName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
port: {{ .Values.webhook.port }}
|
||||||
|
path: /validate-sparkoperator-k8s-io-v1beta2-sparkapplication
|
||||||
|
sideEffects: NoneOnDryRun
|
||||||
|
{{- with .Values.webhook.failurePolicy }}
|
||||||
|
failurePolicy: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.spark.jobNamespaces }}
|
||||||
|
{{- if not (has "" .) }}
|
||||||
|
namespaceSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: kubernetes.io/metadata.name
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $jobNamespace := . }}
|
||||||
|
- {{ $jobNamespace }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["sparkoperator.k8s.io"]
|
||||||
|
apiVersions: ["v1beta2"]
|
||||||
|
resources: ["sparkapplications"]
|
||||||
|
operations: ["CREATE", "UPDATE"]
|
||||||
|
{{- with .Values.webhook.timeoutSeconds }}
|
||||||
|
timeoutSeconds: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
- name: validate-sparkoperator-k8s-io-v1beta2-scheduledsparkapplication.sparkoperator.k8s.io
|
||||||
|
admissionReviewVersions: ["v1"]
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: {{ include "spark-operator.webhook.serviceName" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
port: {{ .Values.webhook.port }}
|
||||||
|
path: /validate-sparkoperator-k8s-io-v1beta2-scheduledsparkapplication
|
||||||
|
sideEffects: NoneOnDryRun
|
||||||
|
{{- with .Values.webhook.failurePolicy }}
|
||||||
|
failurePolicy: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.spark.jobNamespaces }}
|
||||||
|
{{- if not (has "" .) }}
|
||||||
|
namespaceSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: kubernetes.io/metadata.name
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
{{- range $jobNamespace := . }}
|
||||||
|
- {{ $jobNamespace }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["sparkoperator.k8s.io"]
|
||||||
|
apiVersions: ["v1beta2"]
|
||||||
|
resources: ["scheduledsparkapplications"]
|
||||||
|
operations: ["CREATE", "UPDATE"]
|
||||||
|
{{- with .Values.webhook.timeoutSeconds }}
|
||||||
|
timeoutSeconds: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,359 @@
|
|||||||
|
#
|
||||||
|
# Copyright 2024 The Kubeflow authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Default values for spark-operator.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
# -- String to partially override release name.
|
||||||
|
nameOverride: ""
|
||||||
|
|
||||||
|
# -- String to fully override release name.
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
# -- Common labels to add to the resources.
|
||||||
|
commonLabels: {}
|
||||||
|
|
||||||
|
image:
|
||||||
|
# -- Image registry.
|
||||||
|
registry: docker.io
|
||||||
|
# -- Image repository.
|
||||||
|
repository: kubeflow/spark-operator
|
||||||
|
# -- Image tag.
|
||||||
|
# @default -- If not set, the chart appVersion will be used.
|
||||||
|
tag: ""
|
||||||
|
# -- Image pull policy.
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
# -- Image pull secrets for private image registry.
|
||||||
|
pullSecrets: []
|
||||||
|
# - name: <secret-name>
|
||||||
|
|
||||||
|
controller:
|
||||||
|
# -- Number of replicas of controller.
|
||||||
|
replicas: 1
|
||||||
|
|
||||||
|
# -- Reconcile concurrency, higher values might increase memory usage.
|
||||||
|
workers: 10
|
||||||
|
|
||||||
|
# -- Configure the verbosity of logging, can be one of `debug`, `info`, `error`.
|
||||||
|
logLevel: info
|
||||||
|
|
||||||
|
uiService:
|
||||||
|
# -- Specifies whether to create service for Spark web UI.
|
||||||
|
enable: true
|
||||||
|
|
||||||
|
uiIngress:
|
||||||
|
# -- Specifies whether to create ingress for Spark web UI.
|
||||||
|
# `controller.uiService.enable` must be `true` to enable ingress.
|
||||||
|
enable: false
|
||||||
|
# -- Ingress URL format.
|
||||||
|
# Required if `controller.uiIngress.enable` is true.
|
||||||
|
urlFormat: ""
|
||||||
|
|
||||||
|
batchScheduler:
|
||||||
|
# -- Specifies whether to enable batch scheduler for spark jobs scheduling.
|
||||||
|
# If enabled, users can specify batch scheduler name in spark application.
|
||||||
|
enable: false
|
||||||
|
# -- Specifies a list of kube-scheduler names for scheduling Spark pods.
|
||||||
|
kubeSchedulerNames: []
|
||||||
|
# - default-scheduler
|
||||||
|
# -- Default batch scheduler to be used if not specified by the user.
|
||||||
|
# If specified, this value must be either "volcano" or "yunikorn". Specifying any other
|
||||||
|
# value will cause the controller to error on startup.
|
||||||
|
default: ""
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# -- Specifies whether to create a service account for the controller.
|
||||||
|
create: true
|
||||||
|
# -- Optional name for the controller service account.
|
||||||
|
name: ""
|
||||||
|
# -- Extra annotations for the controller service account.
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
|
rbac:
|
||||||
|
# -- Specifies whether to create RBAC resources for the controller.
|
||||||
|
create: true
|
||||||
|
# -- Extra annotations for the controller RBAC resources.
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
|
# -- Extra labels for controller pods.
|
||||||
|
labels: {}
|
||||||
|
# key1: value1
|
||||||
|
# key2: value2
|
||||||
|
|
||||||
|
# -- Extra annotations for controller pods.
|
||||||
|
annotations: {}
|
||||||
|
# key1: value1
|
||||||
|
# key2: value2
|
||||||
|
|
||||||
|
# -- Volumes for controller pods.
|
||||||
|
volumes: []
|
||||||
|
|
||||||
|
# -- Node selector for controller pods.
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
# -- Affinity for controller pods.
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
# -- List of node taints to tolerate for controller pods.
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
# -- Priority class for controller pods.
|
||||||
|
priorityClassName: ""
|
||||||
|
|
||||||
|
# -- Security context for controller pods.
|
||||||
|
podSecurityContext: {}
|
||||||
|
# runAsUser: 1000
|
||||||
|
# runAsGroup: 2000
|
||||||
|
# fsGroup: 3000
|
||||||
|
|
||||||
|
# -- Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in.
|
||||||
|
# Ref: [Pod Topology Spread Constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/).
|
||||||
|
# The labelSelector field in topology spread constraint will be set to the selector labels for controller pods if not specified.
|
||||||
|
topologySpreadConstraints: []
|
||||||
|
# - maxSkew: 1
|
||||||
|
# topologyKey: topology.kubernetes.io/zone
|
||||||
|
# whenUnsatisfiable: ScheduleAnyway
|
||||||
|
# - maxSkew: 1
|
||||||
|
# topologyKey: kubernetes.io/hostname
|
||||||
|
# whenUnsatisfiable: DoNotSchedule
|
||||||
|
|
||||||
|
# -- Environment variables for controller containers.
|
||||||
|
env: []
|
||||||
|
|
||||||
|
# -- Environment variable sources for controller containers.
|
||||||
|
envFrom: []
|
||||||
|
|
||||||
|
# -- Volume mounts for controller containers.
|
||||||
|
volumeMounts: []
|
||||||
|
|
||||||
|
# -- Pod resource requests and limits for controller containers.
|
||||||
|
# Note, that each job submission will spawn a JVM within the controller pods using "/usr/local/openjdk-11/bin/java -Xmx128m".
|
||||||
|
# Kubernetes may kill these Java processes at will to enforce resource limits. When that happens, you will see the following error:
|
||||||
|
# 'failed to run spark-submit for SparkApplication [...]: signal: killed' - when this happens, you may want to increase memory limits.
|
||||||
|
resources: {}
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 300Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 300Mi
|
||||||
|
|
||||||
|
# -- Security context for controller containers.
|
||||||
|
securityContext: {}
|
||||||
|
# runAsUser: 1000
|
||||||
|
# runAsGroup: 2000
|
||||||
|
# fsGroup: 3000
|
||||||
|
|
||||||
|
# -- Sidecar containers for controller pods.
|
||||||
|
sidecars: []
|
||||||
|
|
||||||
|
# Pod disruption budget for controller to avoid service degradation.
|
||||||
|
podDisruptionBudget:
|
||||||
|
# -- Specifies whether to create pod disruption budget for controller.
|
||||||
|
# Ref: [Specifying a Disruption Budget for your Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)
|
||||||
|
enable: false
|
||||||
|
# -- The number of pods that must be available.
|
||||||
|
# Require `controller.replicas` to be greater than 1
|
||||||
|
minAvailable: 1
|
||||||
|
|
||||||
|
pprof:
|
||||||
|
# -- Specifies whether to enable pprof.
|
||||||
|
enable: false
|
||||||
|
# -- Specifies pprof port.
|
||||||
|
port: 6060
|
||||||
|
# -- Specifies pprof service port name.
|
||||||
|
portName: pprof
|
||||||
|
|
||||||
|
# Workqueue rate limiter configuration forwarded to the controller-runtime Reconciler.
|
||||||
|
workqueueRateLimiter:
|
||||||
|
# -- Specifies the average rate of items process by the workqueue rate limiter.
|
||||||
|
bucketQPS: 50
|
||||||
|
# -- Specifies the maximum number of items that can be in the workqueue at any given time.
|
||||||
|
bucketSize: 500
|
||||||
|
maxDelay:
|
||||||
|
# -- Specifies whether to enable max delay for the workqueue rate limiter.
|
||||||
|
# This is useful to avoid losing events when the workqueue is full.
|
||||||
|
enable: true
|
||||||
|
# -- Specifies the maximum delay duration for the workqueue rate limiter.
|
||||||
|
duration: 6h
|
||||||
|
|
||||||
|
webhook:
|
||||||
|
# -- Specifies whether to enable webhook.
|
||||||
|
enable: true
|
||||||
|
|
||||||
|
# -- Number of replicas of webhook server.
|
||||||
|
replicas: 1
|
||||||
|
|
||||||
|
# -- Configure the verbosity of logging, can be one of `debug`, `info`, `error`.
|
||||||
|
logLevel: info
|
||||||
|
|
||||||
|
# -- Specifies webhook port.
|
||||||
|
port: 9443
|
||||||
|
|
||||||
|
# -- Specifies webhook service port name.
|
||||||
|
portName: webhook
|
||||||
|
|
||||||
|
# -- Specifies how unrecognized errors are handled.
|
||||||
|
# Available options are `Ignore` or `Fail`.
|
||||||
|
failurePolicy: Fail
|
||||||
|
|
||||||
|
# -- Specifies the timeout seconds of the webhook, the value must be between 1 and 30.
|
||||||
|
timeoutSeconds: 10
|
||||||
|
|
||||||
|
resourceQuotaEnforcement:
|
||||||
|
# -- Specifies whether to enable the ResourceQuota enforcement for SparkApplication resources.
|
||||||
|
enable: false
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# -- Specifies whether to create a service account for the webhook.
|
||||||
|
create: true
|
||||||
|
# -- Optional name for the webhook service account.
|
||||||
|
name: ""
|
||||||
|
# -- Extra annotations for the webhook service account.
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
|
rbac:
|
||||||
|
# -- Specifies whether to create RBAC resources for the webhook.
|
||||||
|
create: true
|
||||||
|
# -- Extra annotations for the webhook RBAC resources.
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
|
# -- Extra labels for webhook pods.
|
||||||
|
labels: {}
|
||||||
|
# key1: value1
|
||||||
|
# key2: value2
|
||||||
|
|
||||||
|
# -- Extra annotations for webhook pods.
|
||||||
|
annotations: {}
|
||||||
|
# key1: value1
|
||||||
|
# key2: value2
|
||||||
|
|
||||||
|
# -- Sidecar containers for webhook pods.
|
||||||
|
sidecars: []
|
||||||
|
|
||||||
|
# -- Volumes for webhook pods.
|
||||||
|
volumes: []
|
||||||
|
|
||||||
|
# -- Node selector for webhook pods.
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
# -- Affinity for webhook pods.
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
# -- List of node taints to tolerate for webhook pods.
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
# -- Priority class for webhook pods.
|
||||||
|
priorityClassName: ""
|
||||||
|
|
||||||
|
# -- Security context for webhook pods.
|
||||||
|
podSecurityContext: {}
|
||||||
|
# runAsUser: 1000
|
||||||
|
# runAsGroup: 2000
|
||||||
|
# fsGroup: 3000
|
||||||
|
|
||||||
|
# -- Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in.
|
||||||
|
# Ref: [Pod Topology Spread Constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/).
|
||||||
|
# The labelSelector field in topology spread constraint will be set to the selector labels for webhook pods if not specified.
|
||||||
|
topologySpreadConstraints: []
|
||||||
|
# - maxSkew: 1
|
||||||
|
# topologyKey: topology.kubernetes.io/zone
|
||||||
|
# whenUnsatisfiable: ScheduleAnyway
|
||||||
|
# - maxSkew: 1
|
||||||
|
# topologyKey: kubernetes.io/hostname
|
||||||
|
# whenUnsatisfiable: DoNotSchedule
|
||||||
|
|
||||||
|
# -- Environment variables for webhook containers.
|
||||||
|
env: []
|
||||||
|
|
||||||
|
# -- Environment variable sources for webhook containers.
|
||||||
|
envFrom: []
|
||||||
|
|
||||||
|
# -- Volume mounts for webhook containers.
|
||||||
|
volumeMounts: []
|
||||||
|
|
||||||
|
# -- Pod resource requests and limits for webhook pods.
|
||||||
|
resources: {}
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 300Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 300Mi
|
||||||
|
|
||||||
|
# -- Security context for webhook containers.
|
||||||
|
securityContext: {}
|
||||||
|
# runAsUser: 1000
|
||||||
|
# runAsGroup: 2000
|
||||||
|
# fsGroup: 3000
|
||||||
|
|
||||||
|
# Pod disruption budget for webhook to avoid service degradation.
|
||||||
|
podDisruptionBudget:
|
||||||
|
# -- Specifies whether to create pod disruption budget for webhook.
|
||||||
|
# Ref: [Specifying a Disruption Budget for your Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)
|
||||||
|
enable: false
|
||||||
|
# -- The number of pods that must be available.
|
||||||
|
# Require `webhook.replicas` to be greater than 1
|
||||||
|
minAvailable: 1
|
||||||
|
|
||||||
|
spark:
|
||||||
|
# -- List of namespaces where to run spark jobs.
|
||||||
|
# If empty string is included, all namespaces will be allowed.
|
||||||
|
# Make sure the namespaces have already existed.
|
||||||
|
jobNamespaces:
|
||||||
|
- default
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# -- Specifies whether to create a service account for spark applications.
|
||||||
|
create: true
|
||||||
|
# -- Optional name for the spark service account.
|
||||||
|
name: ""
|
||||||
|
# -- Optional annotations for the spark service account.
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
|
rbac:
|
||||||
|
# -- Specifies whether to create RBAC resources for spark applications.
|
||||||
|
create: true
|
||||||
|
# -- Optional annotations for the spark application RBAC resources.
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
|
prometheus:
|
||||||
|
metrics:
|
||||||
|
# -- Specifies whether to enable prometheus metrics scraping.
|
||||||
|
enable: true
|
||||||
|
# -- Metrics port.
|
||||||
|
port: 8080
|
||||||
|
# -- Metrics port name.
|
||||||
|
portName: metrics
|
||||||
|
# -- Metrics serving endpoint.
|
||||||
|
endpoint: /metrics
|
||||||
|
# -- Metrics prefix, will be added to all exported metrics.
|
||||||
|
prefix: ""
|
||||||
|
|
||||||
|
# Prometheus pod monitor for controller pods
|
||||||
|
podMonitor:
|
||||||
|
# -- Specifies whether to create pod monitor.
|
||||||
|
# Note that prometheus metrics should be enabled as well.
|
||||||
|
create: false
|
||||||
|
# -- Pod monitor labels
|
||||||
|
labels: {}
|
||||||
|
# -- The label to use to retrieve the job name from
|
||||||
|
jobLabel: spark-operator-podmonitor
|
||||||
|
# -- Prometheus metrics endpoint properties. `metrics.portName` will be used as a port
|
||||||
|
podMetricsEndpoint:
|
||||||
|
scheme: http
|
||||||
|
interval: 5s
|
||||||
Reference in New Issue
Block a user