Files
project-infra/k8s/base/plugins/docker-registry/deployment.yaml
T

95 lines
2.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: docker-registry
spec:
replicas: 1
revisionHistoryLimit: 5
progressDeadlineSeconds: 600
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 0
selector:
matchLabels:
app.kubernetes.io/name: docker-registry
app.kubernetes.io/instance: docker-registry
template:
metadata:
labels:
app.kubernetes.io/name: docker-registry
app.kubernetes.io/instance: docker-registry
spec:
serviceAccountName: docker-registry
automountServiceAccountToken: false
terminationGracePeriodSeconds: 45
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
fsGroup: 10001
fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
containers:
- name: registry
image: registry:2.8.3
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 5000
protocol: TCP
envFrom:
- configMapRef:
name: docker-registry-config
- secretRef:
name: docker-registry-minio
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
memory: 512Mi
startupProbe:
httpGet:
path: /v2/
port: http
periodSeconds: 5
failureThreshold: 12
timeoutSeconds: 3
readinessProbe:
httpGet:
path: /v2/
port: http
periodSeconds: 10
failureThreshold: 3
timeoutSeconds: 3
livenessProbe:
httpGet:
path: /v2/
port: http
periodSeconds: 30
failureThreshold: 3
timeoutSeconds: 3
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: tmp
mountPath: /tmp
volumes:
- name: tmp
emptyDir:
medium: Memory
sizeLimit: 64Mi