44 lines
1005 B
YAML
44 lines
1005 B
YAML
# RegistryDeployment.yaml
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
run: registry
|
|
name: registry
|
|
namespace: distribution
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
run: registry
|
|
template:
|
|
metadata:
|
|
labels:
|
|
run: registry
|
|
spec:
|
|
nodeSelector:
|
|
node-type: worker
|
|
containers:
|
|
- name: registry
|
|
image: registry:2
|
|
ports:
|
|
- containerPort: 5000
|
|
env:
|
|
- name: REGISTRY_HTTP_TLS_CERTIFICATE
|
|
value: "/certs/tls.crt"
|
|
- name: REGISTRY_HTTP_TLS_KEY
|
|
value: "/certs/tls.key"
|
|
volumeMounts:
|
|
- name: registry-certs
|
|
mountPath: "/certs"
|
|
readOnly: true
|
|
- name: registry-data
|
|
mountPath: /var/lib/registry
|
|
subPath: registry
|
|
volumes:
|
|
- name: registry-certs
|
|
secret:
|
|
secretName: registry-cert
|
|
- name: registry-data
|
|
persistentVolumeClaim:
|
|
claimName: distribution-pvc |