diff --git a/stable/spark-history-server/Chart.yaml b/stable/spark-history-server/Chart.yaml index f63515368a..c47be44f96 100644 --- a/stable/spark-history-server/Chart.yaml +++ b/stable/spark-history-server/Chart.yaml @@ -1,5 +1,5 @@ name: spark-history-server -version: 0.3.0 +version: 0.4.0 appVersion: 2.4.0 description: A Helm chart for Spark History Server home: https://spark.apache.org diff --git a/stable/spark-history-server/README.md b/stable/spark-history-server/README.md index d55a09ea88..731d2f2893 100644 --- a/stable/spark-history-server/README.md +++ b/stable/spark-history-server/README.md @@ -112,6 +112,12 @@ Note that the default image `lightbend/spark-history-server` is built using this | s3.accessKeyName | The file name that contains the AWS access key ID. Omit if using IAM based authentication | aws-access-key | | s3.secretKeyName | The file name that contains the AWS secret access key. Omit if using IAM based authentication | aws-secret-key | | s3.logDirectory | The S3 log directory that starts with "s3a://" | s3a://spark-hs/ | +| ingress.enabled | if `true`, an ingress is created | false | +| ingress.annotations | annotations for the ingress | {} | +| ingress.path | if `true`, an ingress is created | / | +| ingress.hosts | a list of ingress hosts | [spark-history-server.example.com] | +| ingress.tls | a list of [IngressTLS](https://v1-9.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#ingresstls-v1beta1-extensions) items | [] | +| resources | Resource requests and limits | {} | Note that only when `pvc.enablePVC` is set to `true`, the following settings take effect: diff --git a/stable/spark-history-server/templates/deployment.yaml b/stable/spark-history-server/templates/deployment.yaml index f3c58e13da..9b055ab596 100644 --- a/stable/spark-history-server/templates/deployment.yaml +++ b/stable/spark-history-server/templates/deployment.yaml @@ -18,6 +18,10 @@ spec: labels: app.kubernetes.io/name: {{ include "spark-history-server.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Values.podAnnotations }} + annotations: +{{ toYaml .Values.podAnnotations | indent 8 }} +{{- end }} spec: serviceAccountName: {{ include "spark-history-server.serviceAccountName" . }} containers: @@ -33,6 +37,8 @@ spec: - name: historyport containerPort: {{ .Values.service.port }} protocol: TCP + resources: +{{ toYaml .Values.resources | indent 10 }} command: - "/bin/sh" - "-c" diff --git a/stable/spark-history-server/templates/ingress.yaml b/stable/spark-history-server/templates/ingress.yaml new file mode 100644 index 0000000000..696a479031 --- /dev/null +++ b/stable/spark-history-server/templates/ingress.yaml @@ -0,0 +1,31 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullname := include "spark-history-server.fullname" . -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ $fullname }} + labels: + app.kubernetes.io/name: {{ include "spark-history-server.name" . }} + helm.sh/chart: {{ include "spark-history-server.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + annotations: +{{- range $key, $value := .Values.ingress.annotations }} + {{ $key }}: {{ $value | quote }} +{{- end }} +spec: + rules: + {{- range $host := .Values.ingress.hosts }} + - host: {{ $host }} + http: + paths: + - path: / + backend: + serviceName: {{ $fullname }} + servicePort: historyport + {{- end -}} + {{- if .Values.ingress.tls }} + tls: + {{ toYaml .Values.ingress.tls | indent 4 }} +{{- end -}} +{{- end -}} diff --git a/stable/spark-history-server/values.yaml b/stable/spark-history-server/values.yaml index 73f8364891..c603b0ca34 100644 --- a/stable/spark-history-server/values.yaml +++ b/stable/spark-history-server/values.yaml @@ -1,4 +1,6 @@ replicaCount: 1 +nameOverride: "" +fullnameOverride: "" rbac: create: true @@ -25,6 +27,36 @@ environment: # SPARK_DAEMON_CLASSPATH: ... # SPARK_PUBLIC_DNS: ... +podAnnotations: {} + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # + # To let the application start up quickly give it a big limit + # limits: + # cpu: 1000m + # memory: 1Gi + # requests: + # cpu: 100m + # memory: 512Mi + + +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + path: / + hosts: + - spark-history-server.example.com + tls: [] + # - secretName:spark-history-server.example.com + # hosts: + # - spark-history-server.example.com + pvc: # to use a file system path for Spark events dir, set 'enablePVC' to true and mention the # name of an already created persistent volume claim in existingClaimName.