From 3ac8deb798f5929bff85fcc113b37d41f407885e Mon Sep 17 00:00:00 2001 From: Saturn-V Date: Tue, 21 Nov 2023 14:36:47 -0800 Subject: [PATCH] add tls --- helm/service/templates/cert.yaml | 12 ++++++++++++ helm/service/templates/issuer.yaml | 4 ++-- helm/service/templates/sammwise.yaml | 12 ++++++------ helm/service/values.yaml | 18 ++++++++++-------- 4 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 helm/service/templates/cert.yaml diff --git a/helm/service/templates/cert.yaml b/helm/service/templates/cert.yaml new file mode 100644 index 0000000..7c11352 --- /dev/null +++ b/helm/service/templates/cert.yaml @@ -0,0 +1,12 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: {{ .Values.issuer.secretName }} + namespace: sammwise +spec: + secretName: {{ .Values.issuer.secretName }} + issuerRef: + name: sammwise-issuer + commonName: {{ .Values.ingress.ingressDomain }} + dnsNames: + - {{ .Values.ingress.ingressDomain }} \ No newline at end of file diff --git a/helm/service/templates/issuer.yaml b/helm/service/templates/issuer.yaml index fa09f0c..02cc224 100644 --- a/helm/service/templates/issuer.yaml +++ b/helm/service/templates/issuer.yaml @@ -6,10 +6,10 @@ metadata: namespace: sammwise spec: acme: - server: https://acme-staging-v02.api.letsencrypt.org/directory + server: https://acme-v02.api.letsencrypt.org/directory email: {{ .Values.issuer.issuerEmail }} privateKeySecretRef: - name: {{ .Values.issuer.secretName }} + name: {{ .Values.issuer.privateKeyName }} solvers: - http01: ingress: diff --git a/helm/service/templates/sammwise.yaml b/helm/service/templates/sammwise.yaml index 6215518..c103636 100644 --- a/helm/service/templates/sammwise.yaml +++ b/helm/service/templates/sammwise.yaml @@ -14,13 +14,13 @@ spec: spec: containers: - name: sammwise - image: {{ .Values.sammwise.image | quote }} + image: "{{ .Values.sammwise.image }}:{{ .Values.sammwise.tag }}" # {{- if .Values.sammwise.NEXT_PUBLIC_BASE_PATH }} - env: - - name: NEXT_PUBLIC_BASE_PATH - value: {{ .Values.sammwise.NEXT_PUBLIC_BASE_PATH | quote }} - - name: RANCHER_SERVER - value: {{ .Values.sammwise.RANCHER_SERVER | quote }} + # env: + # - name: NEXT_PUBLIC_BASE_PATH + # value: {{ .Values.sammwise.NEXT_PUBLIC_BASE_PATH | quote }} + # - name: RANCHER_SERVER + # value: {{ .Values.sammwise.RANCHER_SERVER | quote }} # {{- end }} --- diff --git a/helm/service/values.yaml b/helm/service/values.yaml index 2da7292..8869bc2 100644 --- a/helm/service/values.yaml +++ b/helm/service/values.yaml @@ -3,14 +3,16 @@ ingressHost: https://kubernetes.default.svc sammwise: - image: sjultra/sammwise:latest + image: sjultra/sammwise + tag: latest # port: 80 - NEXT_PUBLIC_BASE_PATH: "/k8s/clusters/c-m-26nk9h9f/api/v1/namespaces/sammwise/services/http:sammwise:80/proxy" - RANCHER_SERVER: "https://rancher.vzxy.net" + # NEXT_PUBLIC_BASE_PATH: "/k8s/clusters/c-m-26nk9h9f/api/v1/namespaces/sammwise/services/http:sammwise:80/proxy" + # RANCHER_SERVER: "https://rancher.vzxy.net" -# issuer: -# issuerEmail: ops@sjultra.com -# secretName: sammwise-tls-prod +issuer: + issuerEmail: ops@sjultra.com + secretName: sammwise-tls-prod + privateKeyName: sammwise-tls-pkey-prod -# ingress: -# ingressDomain: sammwise.vzxy.net \ No newline at end of file +ingress: + ingressDomain: sammwise.vzxy.net \ No newline at end of file