forked from spring-projects/spring-petclinic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yaml
65 lines (65 loc) · 1.82 KB
/
deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: docker-registry-deployment
labels:
{{- include "docker-registry.labels" . | nindent 4 }}
spec:
replicas: 2
selector:
matchLabels:
{{- include "docker-registry.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "docker-registry.selectorLabels" . | nindent 8 }}
spec:
{{- if .Values.nodeSelector }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
containers:
- name: docker-registry
image: registry:2
volumeMounts:
- name: certs-vol
mountPath: "/certs"
readOnly: true
- name: auth-vol
mountPath: "/auth"
readOnly: true
- name: sa-vol
mountPath: "/sa"
readOnly: true
env:
- name: REGISTRY_HTTP_HOST
value: https://{{ .Values.domain }}
- name: REGISTRY_HTTP_SECRET
value: {{ randAlphaNum 8 | quote }}
- name: REGISTRY_AUTH
value: "htpasswd"
- name: REGISTRY_AUTH_HTPASSWD_REALM
value: "Registry Realm"
- name: REGISTRY_AUTH_HTPASSWD_PATH
value: "/auth/htpasswd"
- name: REGISTRY_HTTP_TLS_CERTIFICATE
value: "/certs/tls.crt"
- name: REGISTRY_HTTP_TLS_KEY
value: "/certs/tls.key"
- name: REGISTRY_STORAGE
value: "gcs"
- name: REGISTRY_STORAGE_GCS_BUCKET
value: {{ .Values.storageBucketName }}
- name: REGISTRY_STORAGE_GCS_KEYFILE
value: "/sa/service-account.json"
volumes:
- name: certs-vol
secret:
secretName: certs-secret
- name: auth-vol
secret:
secretName: auth-secret
- name: sa-vol
secret:
secretName: sa-secret