1
0
Fork 0

chore(httpd): updated templates

This commit is contained in:
sido 2018-06-22 22:11:11 +02:00
parent 9d3c3245e1
commit de6ffdc74e
3 changed files with 84 additions and 33 deletions

View File

@ -0,0 +1,50 @@
categories:
- MOLGENIS
questions:
- variable: molgenisUsername
default: "user"
description: "User of the application"
type: string
required: true
label: MOLGENIS username
group: "MOLGENIS Settings"
- variable: molgenisEmail
default: "admin@molgenis.org"
description: "Admin email"
type: string
required: true
label: MOLGENIS admin email
group: "MOLGENIS Settings"
- variable: persistence.enabled
default: "false"
description: "Enable persistent volume for MOLGENIS"
type: boolean
required: true
label: MOLGENIS Persistent Volume Enabled
show_subquestion_if: true
group: "MOLGENIS Settings"
subquestions:
- variable: persistence.size
default: "10Gi"
description: "MOLGENIS Persistent Volume Size"
type: string
label: Webhosting Volume Size
- variable: persistence.storageClass
default: ""
description: "If undefined or null, uses the default StorageClass. Default to null"
type: storageclass
label: Default StorageClass for Webhosting
- variable: ingress.enabled
default: "true"
description: "Expose app using Layer 7 Load Balancer - ingress"
type: boolean
label: Expose app using Layer 7 Load Balancer
show_subquestion_if: true
group: "Services and Load Balancing"
subquestions:
- variable: ingress.hosts[0].name
default: ""
description: "Hostname to your MOLGENIS installation"
type: hostname
required: true
label: Hostname

View File

@ -1,38 +1,36 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "httpd.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
name: "{{ $.Release.Name }}-ingress"
labels:
app: {{ template "httpd.name" . }}
chart: {{ template "httpd.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
app: {{ template "fullname" $ }}
chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}"
release: "{{ $.Release.Name }}"
heritage: "{{ $.Release.Service }}"
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
{{- if .tls }}
ingress.kubernetes.io/secure-backends: "true"
{{- end }}
{{- range $key, $value := .annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
backend:
serviceName: {{ template "fullname" $ }}
servicePort: 80
{{- if .tls }}
tls:
- hosts:
- {{ .name }}
secretName: {{ .tlsSecret }}
{{- end }}
---
{{- end }}
{{- end }}

View File

@ -1,4 +1,4 @@
# Default values for httpd.
# Default values for jenkins.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
@ -9,6 +9,9 @@ image:
tag: lts
pullPolicy: IfNotPresent
molgenisUsername: molgenis
molgenisEmail: admin@molgenis.org
service:
type: ClusterIP
port: 80
@ -20,7 +23,7 @@ ingress:
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- chart-example.local
- molgenis.local
tls: []
# - secretName: chart-example-tls
# hosts:
@ -42,4 +45,4 @@ nodeSelector: {}
tolerations: []
affinity: {}
affinity: {}