Skip to content
Snippets Groups Projects
Commit bfd470b0 authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

can disable ingress, and use its fragment elsewhere

parent 8bc77b77
No related branches found
No related tags found
No related merge requests found
Pipeline #131926 passed
...@@ -15,7 +15,7 @@ type: application ...@@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0 version: 0.2.0
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to
......
...@@ -51,12 +51,22 @@ app.kubernetes.io/instance: {{ .Release.Name }} ...@@ -51,12 +51,22 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }} {{- end }}
{{/* {{/*
Create the name of the service account to use Ingress Annotations
*/}} */}}
{{- define "easy-maintenance.serviceAccountName" -}} {{- define "easy-maintenance.ingressAnnotations" -}}
{{- if .Values.serviceAccount.create }} nginx.ingress.kubernetes.io/use-regex: "true"
{{- default (include "easy-maintenance.fullname" .) .Values.serviceAccount.name }} nginx.ingress.kubernetes.io/rewrite-target: /$2
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }} {{- end }}
{{/*
Ingress path
*/}}
{{- define "easy-maintenance.ingressPath" -}}
- path: /
pathType: ImplementationSpecific
backend:
service:
name: {{ include "easy-maintenance.fullname" . }}
port:
number: 8080
{{- end }} {{- end }}
{{- if .Values.ingressEnabled }}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
...@@ -5,18 +6,12 @@ metadata: ...@@ -5,18 +6,12 @@ metadata:
labels: labels:
{{- include "easy-maintenance.labels" . | nindent 4 }} {{- include "easy-maintenance.labels" . | nindent 4 }}
annotations: annotations:
nginx.ingress.kubernetes.io/use-regex: "true" {{- include "easy-maintenance.ingressAnnotations" . | nindent 4 }}
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec: spec:
ingressClassName: {{ .Values.ingressClassName | quote }} ingressClassName: {{ .Values.ingressClassName | quote }}
rules: rules:
- host: {{ .Values.host | quote }} - host: {{ .Values.host | quote }}
http: http:
paths: paths:
- path: / {{- include "easy-maintenance.ingressPath" . | nindent 10 }}
pathType: ImplementationSpecific {{- end }}
backend:
service:
name: {{ include "easy-maintenance.fullname" . }}
port:
number: 8080
\ No newline at end of file
host: easy-maintenance.dev.pasteur.cloud host: easy-maintenance.dev.pasteur.cloud
ingressEnabled: true
ingressClassName: external ingressClassName: external
teamName: "Bioinformatics and Biostatistics HUB" teamName: "Bioinformatics and Biostatistics HUB"
untilWhen: "" untilWhen: ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment