From 9bafa366e19fb0493a5f71e09937ed2078ee8eaa Mon Sep 17 00:00:00 2001 From: JeremiSavard Date: Wed, 24 Nov 2021 10:58:09 -0500 Subject: [PATCH 1/4] fix host name --- chart/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/values.yaml b/chart/values.yaml index f16599a..ce328c4 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -86,7 +86,7 @@ ingress: # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" hosts: - - host: user.dev.ubivius.tk + - host: user.player.dev.ubivius.tk paths: - path: / tls: [] From 58f15b4a2d4c4cd0aea1390bdcc07936d2981eb2 Mon Sep 17 00:00:00 2001 From: ysma500 Date: Wed, 24 Nov 2021 12:54:58 -0500 Subject: [PATCH 2/4] Change to ingressRoute to standerdize and use crt-manager secrets --- chart/templates/ingressroute.yaml | 27 +++++++++++++++++++++++++++ chart/values.yaml | 8 +++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 chart/templates/ingressroute.yaml diff --git a/chart/templates/ingressroute.yaml b/chart/templates/ingressroute.yaml new file mode 100644 index 0000000..6ea3e88 --- /dev/null +++ b/chart/templates/ingressroute.yaml @@ -0,0 +1,27 @@ +{{- if .Values.ingressRoute.enabled -}} +{{- $fullName := include "microservice-user.fullname" . -}} +apiVersion: traefik.containo.us/v1alpha1 +kind: IngressRoute +metadata: + name: {{ $fullName }}-ingressroute +spec: + entryPoints: + - web + routes: + - match: {{ .Values.ingressRoute.match }} + kind: Rule + services: + - name: {{ $fullName }} + kind: Service + port: {{ .Values.service.port }} + namespace: {{ .Release.Namespace }} + {{- if .Values.ingressRoute.middlewares }} + middlewares: + {{- range .Values.ingressRoute.middlewares }} + - name: {{ .name }} + namespace: default + {{- end }} + {{- end }} + tls: + secretName: {{ .Values.ingressRoute.tls.secretName }} +{{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index ce328c4..215b17f 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -81,7 +81,7 @@ service: port: 9090 ingress: - enabled: true + enabled: false annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" @@ -94,6 +94,12 @@ ingress: # hosts: # - chart-example.local +ingressRoute: + enabled: true + match: Host(`user.player.dev.ubivius.tk`) && PathPrefix(`/`) + tls: + secretName: user.player.dev.ubivius.tk + resources: requests: cpu: 10m From e3cebf78f7a1e6ce3211d7d75689fdc6c034c67e Mon Sep 17 00:00:00 2001 From: JeremiSavard Date: Wed, 24 Nov 2021 15:37:59 -0500 Subject: [PATCH 3/4] add websecure --- chart/templates/ingressroute.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/chart/templates/ingressroute.yaml b/chart/templates/ingressroute.yaml index 6ea3e88..64eab3a 100644 --- a/chart/templates/ingressroute.yaml +++ b/chart/templates/ingressroute.yaml @@ -7,6 +7,7 @@ metadata: spec: entryPoints: - web + - websecure routes: - match: {{ .Values.ingressRoute.match }} kind: Rule From d3ea30c72cabbd5ded7cbbb39457f1c442565f1f Mon Sep 17 00:00:00 2001 From: ysma500 Date: Wed, 24 Nov 2021 23:42:18 -0500 Subject: [PATCH 4/4] Revert to Ingress STD but with tls --- chart/templates/ingressroute.yaml | 27 --------------------------- chart/values.yaml | 20 +++++++------------- 2 files changed, 7 insertions(+), 40 deletions(-) delete mode 100644 chart/templates/ingressroute.yaml diff --git a/chart/templates/ingressroute.yaml b/chart/templates/ingressroute.yaml deleted file mode 100644 index 6ea3e88..0000000 --- a/chart/templates/ingressroute.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.ingressRoute.enabled -}} -{{- $fullName := include "microservice-user.fullname" . -}} -apiVersion: traefik.containo.us/v1alpha1 -kind: IngressRoute -metadata: - name: {{ $fullName }}-ingressroute -spec: - entryPoints: - - web - routes: - - match: {{ .Values.ingressRoute.match }} - kind: Rule - services: - - name: {{ $fullName }} - kind: Service - port: {{ .Values.service.port }} - namespace: {{ .Release.Namespace }} - {{- if .Values.ingressRoute.middlewares }} - middlewares: - {{- range .Values.ingressRoute.middlewares }} - - name: {{ .name }} - namespace: default - {{- end }} - {{- end }} - tls: - secretName: {{ .Values.ingressRoute.tls.secretName }} -{{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index 215b17f..5ddd57f 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -81,24 +81,18 @@ service: port: 9090 ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" + enabled: true + annotations: + kubernetes.io/ingress.class: traefik + cert-manager.io/cluster-issuer: letsencrypt-prod hosts: - host: user.player.dev.ubivius.tk paths: - path: / - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -ingressRoute: - enabled: true - match: Host(`user.player.dev.ubivius.tk`) && PathPrefix(`/`) tls: - secretName: user.player.dev.ubivius.tk + - secretName: user.player.dev.ubivius.tk + hosts: + - user.player.dev.ubivius.tk resources: requests: