From abef1d9c38acd8c6419c809b2923b4a967758561 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Jun 2021 20:11:19 +0200 Subject: [PATCH] Add release name into domain --- apps/nginx-certbot-helm/Chart.yaml | 2 +- apps/nginx-certbot-helm/templates/certbot-job.yaml | 2 +- apps/nginx-certbot-helm/templates/configmap.yaml | 6 +++--- apps/nginx-certbot-helm/templates/deployment.yaml | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/nginx-certbot-helm/Chart.yaml b/apps/nginx-certbot-helm/Chart.yaml index b1431d8..83c0a27 100644 --- a/apps/nginx-certbot-helm/Chart.yaml +++ b/apps/nginx-certbot-helm/Chart.yaml @@ -15,7 +15,7 @@ type: application # 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. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.1 +version: 0.1.2 # 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 diff --git a/apps/nginx-certbot-helm/templates/certbot-job.yaml b/apps/nginx-certbot-helm/templates/certbot-job.yaml index 76e2057..2dce24b 100644 --- a/apps/nginx-certbot-helm/templates/certbot-job.yaml +++ b/apps/nginx-certbot-helm/templates/certbot-job.yaml @@ -17,7 +17,7 @@ spec: - containerPort: 80 env: - name: DOMAIN - value: "{{ .Values.serviceName }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}" + value: "{{ .Release.Name }}-{{ .Values.serviceName }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}" - name: EMAIL value: "{{ .Values.email }}" volumeMounts: diff --git a/apps/nginx-certbot-helm/templates/configmap.yaml b/apps/nginx-certbot-helm/templates/configmap.yaml index b569a9d..0609142 100644 --- a/apps/nginx-certbot-helm/templates/configmap.yaml +++ b/apps/nginx-certbot-helm/templates/configmap.yaml @@ -9,10 +9,10 @@ data: listen 443 ssl; listen [::]:443 ssl; - server_name {{ .Values.serviceName }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}; + server_name {{ .Release.Name }}-{{ .Values.serviceName }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}; - ssl_certificate /etc/letsencrypt/live/{{ .Values.serviceName }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/{{ .Values.serviceName }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}/privkey.pem; + ssl_certificate /etc/letsencrypt/live/{{ .Release.Name }}-{{ .Values.serviceName }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/{{ .Release.Name }}-{{ .Values.serviceName }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}/privkey.pem; client_max_body_size 256m; diff --git a/apps/nginx-certbot-helm/templates/deployment.yaml b/apps/nginx-certbot-helm/templates/deployment.yaml index e16d2e8..bb16394 100644 --- a/apps/nginx-certbot-helm/templates/deployment.yaml +++ b/apps/nginx-certbot-helm/templates/deployment.yaml @@ -20,7 +20,7 @@ spec: - containerPort: 80 - containerPort: 443 volumeMounts: - - name: nginx-config-443 + - name: nginx-config mountPath: "/etc/nginx/conf.d/" - name: etcletsencrypt mountPath: "/etc/letsencrypt" @@ -40,9 +40,9 @@ spec: apiVersion: v1 kind: Service metadata: - name: {{ .Release.Name }}-tls1 + name: {{ .Release.Name }}-{{ .Values.serviceName }} labels: - app: {{ .Release.Name }}-tls1 + app: {{ .Release.Name }}-{{ .Values.serviceName }} spec: type: ClusterIP ports: