| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: {{ include "registry.fullname" . }}
- labels:
- app.kubernetes.io/name: {{ include "registry.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
- spec:
- replicas: {{ .Values.replicaCount }}
- selector:
- matchLabels:
- app.kubernetes.io/name: {{ include "registry.name" . }}
- template:
- metadata:
- labels:
- app.kubernetes.io/name: {{ include "registry.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
- spec:
- containers:
- - name: registry
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
- imagePullPolicy: {{ .Values.image.pullPolicy }}
- ports:
- - containerPort: {{ .Values.service.port }}
- name: http
- env:
- - name: REGISTRY_AUTH
- value: htpasswd
- - name: REGISTRY_AUTH_HTPASSWD_PATH
- value: /auth/htpasswd
- - name: REGISTRY_AUTH_HTPASSWD_REALM
- value: Registry Realm
- volumeMounts:
- - name: registry-storage
- mountPath: /var/lib/registry
- - name: auth
- mountPath: /auth
- volumes:
- - name: registry-storage
- persistentVolumeClaim:
- claimName: {{ include "registry.fullname" . }}-pvc
- - name: auth
- secret:
- secretName: {{ include "registry.fullname" . }}-auth
- items:
- - key: htpasswd
- path: htpasswd
|