Support podAnnotations (#16876)

Signed-off-by: Sam Clinckspoor <sam.clinckspoor@gmail.com>
This commit is contained in:
Sam Clinckspoor
2019-09-06 07:12:57 -07:00
committed by Kubernetes Prow Robot
parent b1ba7434ea
commit 5b783871ec
4 changed files with 12 additions and 5 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
name: sparkoperator
description: A Helm chart for Spark on Kubernetes operator
version: 0.2.8
version: 0.3.0
appVersion: v2.4.0-v1beta1-0.9.0
kubeVersion: ">=1.8.0-0"
keywords:
+3 -3
View File
@@ -15,7 +15,7 @@ $ helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incuba
$ helm install incubator/sparkoperator --namespace spark-operator --set sparkJobNamespace=default
```
Note that you need to use the `--namespace` flag during `helm install` to specify in which namespace you want to install the operator. The namespace can be existing or not. When it's not available, Helm would take care of creating the namespace. Note that this namespace has no relation to the namespace where you would like to deploy Spark jobs (i.e. the setting `sparkJobNamespace` shown in the table below). They can be the same namespace or different ones.
Note that you need to use the `--namespace` flag during `helm install` to specify in which namespace you want to install the operator. The namespace can be existing or not. When it's not available, Helm would take care of creating the namespace. Note that this namespace has no relation to the namespace where you would like to deploy Spark jobs (i.e. the setting `sparkJobNamespace` shown in the table below). They can be the same namespace or different ones.
#### Configuration
@@ -36,10 +36,10 @@ The following table lists the configurable parameters of the Spark operator char
| `metricsPort` | Port for the metrics endpoint | 10254 |
| `metricsEndpoint` | Metrics endpoint | "/metrics" |
| `metricsPrefix` | Prefix for the metrics | "" |
| `podAnnotations` | annotations to be added to pods | `{}` |
| `resyncInterval` | Informer resync interval in seconds | 30 |
| `webhookPort` | Service port of the webhook server | 8080 |
| `resources` | Resources needed for the sparkoperator deployment | {} |
| `enableBatchScheduler` | Whether to enable batch scheduler for pod scheduling | false |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
@@ -24,12 +24,17 @@ spec:
type: Recreate
template:
metadata:
{{- if .Values.enableMetrics }}
{{- if or .Values.podAnnotations .Values.enableMetrics }}
annotations:
{{- if .Values.enableMetrics }}
prometheus.io/scrape: "true"
prometheus.io/port: "{{ .Values.metricsPort }}"
prometheus.io/path: {{ .Values.metricsEndpoint }}
{{- end }}
{{- if .Values.podAnnotations }}
{{ toYaml .Values.podAnnotations | trim | indent 8 }}
{{- end }}
{{- end }}
labels:
app.kubernetes.io/name: {{ include "sparkoperator.name" . }}
app.kubernetes.io/version: {{ .Values.operatorVersion }}
+2
View File
@@ -42,3 +42,5 @@ logLevel: 2
## Whether to enable batch scheduler for pod scheduling,
## if enabled, end user can specify batch scheduler name in spark application.
enableBatchScheduler: false
podAnnotations: {}