chartmuseum: phase in SSL support
This commit is contained in:
parent
da95831382
commit
88d7f27247
2 changed files with 77 additions and 8 deletions
|
@ -2,7 +2,7 @@ apiVersion: v2
|
||||||
name: ungleich-chartmuseum
|
name: ungleich-chartmuseum
|
||||||
description: Chartmuseum for the ungleich infrastructure
|
description: Chartmuseum for the ungleich infrastructure
|
||||||
|
|
||||||
version: 0.1.0
|
version: 0.1.1
|
||||||
|
|
||||||
# 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
|
||||||
|
|
|
@ -14,14 +14,44 @@ spec:
|
||||||
app: {{ .Release.Name }}-chartmuseum
|
app: {{ .Release.Name }}-chartmuseum
|
||||||
use-as-service: {{ .Release.Name }}
|
use-as-service: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
|
# Wait before trying to start any container
|
||||||
|
initcontainers:
|
||||||
|
- name: wait-for-cert
|
||||||
|
image: busybox
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- until ls /etc/letsencrypt/live/{{ tpl .Values.fqdn . }}/fullchain.pem; do sleep 5; done
|
||||||
|
volumeMounts:
|
||||||
|
- name: etcletsencrypt
|
||||||
|
mountPath: "/etc/letsencrypt"
|
||||||
containers:
|
containers:
|
||||||
- name: chartmuseum
|
- name: certbot
|
||||||
image: ghcr.io/helm/chartmuseum:v0.13.1
|
image: ungleich/ungleich-certbot
|
||||||
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 80
|
||||||
# args:
|
env:
|
||||||
# - --tls-cert=/etc/letsencrypt/live/{{ tpl .Values.fqdn . }}/fullchain.pem
|
- name: ONLYRENEWCERTS
|
||||||
# - --tls-key=/etc/letsencrypt/live/{{ tpl .Values.fqdn . }}/privkey.pem
|
value: "yes"
|
||||||
|
- name: DOMAIN
|
||||||
|
value: "{{ tpl .Values.fqdn . }}"
|
||||||
|
- name: EMAIL
|
||||||
|
value: "{{ .Values.email }}"
|
||||||
|
{{ if eq .Values.letsencryptStaging "no" }}
|
||||||
|
- name: STAGING
|
||||||
|
value: "no"
|
||||||
|
{{ end }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: etcletsencrypt
|
||||||
|
mountPath: "/etc/letsencrypt"
|
||||||
|
- name: chartmuseum
|
||||||
|
image: ghcr.io/helm/chartmuseum:v{{ .Chart.AppVersion }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 443
|
||||||
|
args:
|
||||||
|
- --tls-cert=/etc/letsencrypt/live/{{ tpl .Values.fqdn . }}/fullchain.pem
|
||||||
|
- --tls-key=/etc/letsencrypt/live/{{ tpl .Values.fqdn . }}/privkey.pem
|
||||||
env:
|
env:
|
||||||
- name: STORAGE
|
- name: STORAGE
|
||||||
value: "local"
|
value: "local"
|
||||||
|
@ -49,7 +79,7 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
ports:
|
ports:
|
||||||
- port: 8080
|
- port: 80
|
||||||
name: http
|
name: http
|
||||||
- port: 443
|
- port: 443
|
||||||
name: https
|
name: https
|
||||||
|
@ -101,3 +131,42 @@ spec:
|
||||||
# proxy_pass http://localhost:3000;
|
# proxy_pass http://localhost:3000;
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: {{ tpl .Values.identifier . }}-getcert
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: certbot-letsencrypt-getcert
|
||||||
|
use-as-service: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
restartPolicy: Never
|
||||||
|
containers:
|
||||||
|
- name: certbot
|
||||||
|
image: ungleich/ungleich-certbot
|
||||||
|
imagePullPolicy: Always
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
env:
|
||||||
|
- name: ONLYGETCERT
|
||||||
|
value: "yes"
|
||||||
|
- name: DOMAIN
|
||||||
|
value: "{{ tpl .Values.fqdn . }}"
|
||||||
|
- name: EMAIL
|
||||||
|
value: "{{ .Values.email }}"
|
||||||
|
{{ if eq .Values.letsencryptStaging "no" }}
|
||||||
|
- name: STAGING
|
||||||
|
value: "no"
|
||||||
|
{{ end }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: etcletsencrypt
|
||||||
|
mountPath: "/etc/letsencrypt"
|
||||||
|
volumes:
|
||||||
|
- name: etcletsencrypt
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ tpl .Values.identifier . }}-letsencrypt-certs
|
||||||
|
backoffLimit: 3
|
||||||
|
|
Loading…
Reference in a new issue