diff --git a/httpd/v1.0.0/questions.yml b/httpd/v1.0.0/questions.yml new file mode 100644 index 0000000..73ba9dd --- /dev/null +++ b/httpd/v1.0.0/questions.yml @@ -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 \ No newline at end of file diff --git a/httpd/v1.0.0/templates/ingress.yaml b/httpd/v1.0.0/templates/ingress.yaml index f8c7623..8d25d0c 100644 --- a/httpd/v1.0.0/templates/ingress.yaml +++ b/httpd/v1.0.0/templates/ingress.yaml @@ -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 }} \ No newline at end of file diff --git a/httpd/v1.0.0/values.yaml b/httpd/v1.0.0/values.yaml index 1a2b223..2428542 100644 --- a/httpd/v1.0.0/values.yaml +++ b/httpd/v1.0.0/values.yaml @@ -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: {} \ No newline at end of file