97 lines
2.5 KiB
YAML
97 lines
2.5 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ .Release.Name }}-registry
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: {{ .Release.Name }}-registry
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ .Release.Name }}-registry
|
|
use-as-service: {{ .Release.Name }}
|
|
annotations:
|
|
checksum/config: {{ include (print $.Template.BasePath "/nginxconf.yaml") . | sha256sum }}
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: ungleich/ungleich-certbot:0.3.2
|
|
ports:
|
|
- containerPort: 443
|
|
name: https
|
|
- containerPort: 80
|
|
name: http
|
|
env:
|
|
- name: DOMAIN
|
|
value: "{{ tpl .Values.fqdn . }}"
|
|
- name: EMAIL
|
|
value: "{{ .Values.email }}"
|
|
- name: NGINX
|
|
value: "yes"
|
|
{{ if eq .Values.letsencryptStaging "no" }}
|
|
- name: STAGING
|
|
value: "no"
|
|
{{ end }}
|
|
volumeMounts:
|
|
- name: nginx-config
|
|
mountPath: "/etc/nginx/conf.d/"
|
|
- name: etcletsencrypt
|
|
mountPath: "/etc/letsencrypt"
|
|
- name: registry
|
|
image: registry:{{ .Chart.AppVersion }}
|
|
ports:
|
|
- containerPort: 5000
|
|
env:
|
|
- name: REGISTRY_AUTH_HTPASSWD_PATH
|
|
value: "/auth/auth"
|
|
- name: REGISTRY_AUTH_HTPASSWD_REALM
|
|
value: "registry"
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: "/var/lib/registry"
|
|
- name: auth
|
|
mountPath: "/auth"
|
|
volumes:
|
|
- name: etcletsencrypt
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Release.Name }}-letsencrypt-certs
|
|
- name: nginx-config
|
|
configMap:
|
|
name: {{ .Release.Name }}-nginx-config
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Release.Name }}-data
|
|
- name: auth
|
|
secret:
|
|
secretName: {{ .Release.Name }}-auth
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ .Release.Name }}
|
|
labels:
|
|
app: {{ .Release.Name }}
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
# Required for letsencrypt
|
|
- port: 80
|
|
name: http
|
|
- port: 443
|
|
name: https
|
|
selector:
|
|
use-as-service: {{ .Release.Name }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ .Release.Name }}-auth
|
|
annotations:
|
|
secret-generator.v1.mittwald.de/type: basic-auth
|
|
data: {}
|