fix(docker-registry): configmap suffix wasn't being applied because of namespace shennanigans

This commit is contained in:
David Landry 2024-10-16 16:09:59 -04:00
parent 2d33f4b575
commit c9a2ebe213
3 changed files with 23 additions and 41 deletions

View file

@ -4,7 +4,6 @@ apiVersion: batch/v1
kind: CronJob kind: CronJob
metadata: metadata:
name: docker-registry-garbage-collector name: docker-registry-garbage-collector
namespace: gitops
labels: labels:
app: docker-registry app: docker-registry
chart: docker-registry-2.2.3 chart: docker-registry-2.2.3
@ -23,7 +22,7 @@ spec:
spec: spec:
template: template:
spec: spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
runAsUser: 1000 runAsUser: 1000
containers: containers:
@ -31,11 +30,11 @@ spec:
image: "registry:2.8.1" image: "registry:2.8.1"
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: command:
- /bin/registry - /bin/registry
- garbage-collect - garbage-collect
- --delete-untagged=true - --delete-untagged=true
- /etc/docker/registry/config.yml - /etc/docker/registry/config.yml
env: env:
- name: REGISTRY_HTTP_SECRET - name: REGISTRY_HTTP_SECRET
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
@ -61,7 +60,7 @@ spec:
secretKeyRef: secretKeyRef:
name: docker-registry-secret name: docker-registry-secret
key: proxyPassword key: proxyPassword
volumeMounts: volumeMounts:
- name: config - name: config
mountPath: "/etc/docker/registry" mountPath: "/etc/docker/registry"
- name: auth - name: auth
@ -70,7 +69,7 @@ spec:
- name: data - name: data
mountPath: /var/lib/registry/ mountPath: /var/lib/registry/
restartPolicy: OnFailure restartPolicy: OnFailure
volumes: volumes:
- name: config - name: config
configMap: configMap:
name: docker-registry-config name: docker-registry-config
@ -78,8 +77,7 @@ spec:
secret: secret:
secretName: docker-registry-secret secretName: docker-registry-secret
items: items:
- key: htpasswd - key: htpasswd
path: htpasswd path: htpasswd
- name: data - name: data
emptyDir: {} emptyDir: {}

View file

@ -4,33 +4,23 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: docker-registry name: docker-registry
namespace: gitops
labels: labels:
app: docker-registry app.kubernetes.io/name: docker-registry
chart: docker-registry-2.2.3
release: docker-registry
heritage: Helm
spec: spec:
selector: selector:
matchLabels: matchLabels:
app: docker-registry app.kubernetes.io/name: docker-registry
release: docker-registry
replicas: 1 replicas: 1
strategy: revisionHistoryLimit: 3
rollingUpdate: strategy:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate type: RollingUpdate
minReadySeconds: 5
template: template:
metadata: metadata:
labels: labels:
app: docker-registry app.kubernetes.io/name: docker-registry
release: docker-registry
annotations: annotations:
updated-at/secret: 2024-10-16T14:38:25-04:00
spec: spec:
securityContext: securityContext:
fsGroup: 1000 fsGroup: 1000
runAsUser: 1000 runAsUser: 1000
containers: containers:
@ -38,9 +28,9 @@ spec:
image: "registry:2.8.1" image: "registry:2.8.1"
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: command:
- /bin/registry - /bin/registry
- serve - serve
- /etc/docker/registry/config.yml - /etc/docker/registry/config.yml
ports: ports:
- containerPort: 5000 - containerPort: 5000
livenessProbe: livenessProbe:
@ -51,8 +41,7 @@ spec:
httpGet: httpGet:
path: / path: /
port: 5000 port: 5000
resources: resources: {}
{}
env: env:
- name: REGISTRY_HTTP_SECRET - name: REGISTRY_HTTP_SECRET
valueFrom: valueFrom:
@ -81,7 +70,7 @@ spec:
key: proxyPassword key: proxyPassword
volumeMounts: volumeMounts:
- name: config - name: config
mountPath: "/etc/docker/registry" mountPath: /etc/docker/registry
readOnly: true readOnly: true
- name: auth - name: auth
mountPath: /auth mountPath: /auth
@ -92,15 +81,12 @@ spec:
- name: config - name: config
configMap: configMap:
name: docker-registry-config name: docker-registry-config
items:
- key: "config.yml"
path: "config.yml"
- name: auth - name: auth
secret: secret:
secretName: docker-registry-secret secretName: docker-registry-secret
items: items:
- key: htpasswd - key: htpasswd
path: htpasswd path: htpasswd
- name: data - name: data
persistentVolumeClaim: persistentVolumeClaim:
claimName: docker-registry claimName: docker-registry

View file

@ -2,7 +2,6 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: docker-registry name: docker-registry
namespace: gitops
labels: labels:
app: docker-registry app: docker-registry
chart: docker-registry-2.2.3 chart: docker-registry-2.2.3
@ -13,4 +12,3 @@ spec:
metadata: metadata:
annotations: annotations:
updated-at/secret: 2024-10-16T15:23-04:00 updated-at/secret: 2024-10-16T15:23-04:00