Skip to content

Commit

Permalink
Zeppelin: add Ingress and nodeSelector (helm#9851)
Browse files Browse the repository at this point in the history
* Zeppelin: add Ingress and nodeSelector

Signed-off-by: mcapuccini <[email protected]>

* Values linting

Signed-off-by: mcapuccini <[email protected]>

* Bump up chart

Signed-off-by: Marco Capuccini <[email protected]>

* Ingress values refactory

Signed-off-by: mcapuccini <[email protected]>
  • Loading branch information
Marco Capuccini authored and k8s-ci-robot committed Dec 12, 2018
1 parent b7314f6 commit 8ad6380
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/zeppelin/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Web-based notebook that enables data-driven, interactive data analytics and collaborative documents with SQL, Scala and more.
name: zeppelin
version: 1.0.1
version: 1.1.0
appVersion: 0.7.2
home: https://zeppelin.apache.org/
sources:
Expand Down
6 changes: 6 additions & 0 deletions stable/zeppelin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ The following table lists the configurable parameters of the Zeppelin chart and
| `hadoop.useConfigMap` | Use external Hadoop configuration for Spark executors | `false` |
| `hadoop.configMapName` | Name of the hadoop config map to use (must be in same namespace) | `hadoop-config` |
| `hadoop.configPath` | Path in the Zeppelin image where the Hadoop config is mounted | `/usr/hadoop-2.7.3/etc/hadoop` |
| `ingress.enabled` | Enable ingress | `false` |
| `ingress.annotations` | Ingress annotations | `{}` |
| `ingress.hosts` | Ingress Hostnames | `["zeppelin.local"]` |
| `ingress.path` | Path within the URL structure | `/` |
| `ingress.tls` | Ingress TLS configuration | `[]` |
| `nodeSelecor` | Node selector for the Zeppelin deployment | `{}` |

## Related charts

Expand Down
6 changes: 5 additions & 1 deletion stable/zeppelin/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,8 @@ spec:
- name: hadoop-config
configMap:
name: {{ .Values.hadoop.configMapName }}
{{- end }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
38 changes: 38 additions & 0 deletions stable/zeppelin/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{{- if .Values.ingress.enabled }}
{{- $ingressPath := .Values.ingress.path -}}
{{- $fullName := printf "%s-zeppelin" .Release.Name -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "zeppelin.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: 8080
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
{{- end }}
15 changes: 15 additions & 0 deletions stable/zeppelin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,18 @@ spark:
driverMemory: 1g
executorMemory: 1g
numExecutors: 2

ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
# nginx.ingress.kubernetes.io/auth-secret: zeppelin-tls-secret
path: /
hosts:
- zeppelin.local
tls: []
# - secretName: zeppelin-tls-secret
# hosts: zeppelin.local

nodeSelector: {}

0 comments on commit 8ad6380

Please sign in to comment.