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

View File

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