92 lines
2.7 KiB
YAML
92 lines
2.7 KiB
YAML
---
|
|
kind: Deployment
|
|
apiVersion: apps/v1
|
|
metadata:
|
|
namespace: docker-registry
|
|
name: docker-registry
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: docker-registry
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: docker-registry
|
|
spec:
|
|
volumes:
|
|
- name: htpasswd
|
|
secret:
|
|
secretName: docker-registry-htpasswd
|
|
containers:
|
|
- name: registry
|
|
image: "registry:2"
|
|
resources: {}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 5000
|
|
scheme: HTTP
|
|
failureThreshold: 1
|
|
initialDelaySeconds: 2
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
timeoutSeconds: 2
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 5000
|
|
scheme: HTTP
|
|
failureThreshold: 3
|
|
initialDelaySeconds: 2
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
timeoutSeconds: 2
|
|
env:
|
|
- name: REGISTRY_AUTH
|
|
value: htpasswd
|
|
- name: REGISTRY_AUTH_HTPASSWD_REALM
|
|
value: "Registry Realm"
|
|
- name: REGISTRY_AUTH_HTPASSWD_PATH
|
|
value: /var/run/registry/htpasswd/htpasswd
|
|
- name: REGISTRY_HTTP_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: docker-registry-http-secret
|
|
key: http-secret
|
|
- name: REGISTRY_STORAGE
|
|
value: s3
|
|
- name: REGISTRY_STORAGE_S3_REGIONENDPOINT
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: docker-registry-s3-config
|
|
key: endpoint
|
|
- name: REGISTRY_STORAGE_S3_REGION
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: docker-registry-s3-config
|
|
key: region
|
|
- name: REGISTRY_STORAGE_S3_BUCKET
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: docker-registry-s3-config
|
|
key: bucket
|
|
- name: REGISTRY_STORAGE_S3_ACCESSKEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: docker-registry-s3-auth
|
|
key: access-key
|
|
- name: REGISTRY_STORAGE_S3_SECRETKEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: docker-registry-s3-auth
|
|
key: secret-key
|
|
- name: REGISTRY_STORAGE_S3_SECURE
|
|
value: "true"
|
|
ports:
|
|
- name: api
|
|
containerPort: 5000
|
|
volumeMounts:
|
|
- name: htpasswd
|
|
mountPath: /var/run/registry/htpasswd
|