Skip to content

Commit

Permalink
Docker registry fixes (#162)
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Sanford <[email protected]>
  • Loading branch information
jessesanford authored Mar 1, 2024
1 parent 817bfce commit 8dc07e6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
22 changes: 22 additions & 0 deletions examples/docker-registry/kind.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: "kindest/node:v1.27.3"
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
system-reserved: memory=4Gi
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 443
hostPort: 8443
protocol: TCP
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.cnoe.localtest.me:8443"]
endpoint = ["https://registry.cnoe.localtest.me"]
[plugins."io.containerd.grpc.v1.cri".registry.configs."registry.cnoe.localtest.me".tls]
insecure_skip_verify = true
17 changes: 10 additions & 7 deletions examples/docker-registry/manifests/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: docker-registry
type: Opaque
data:
# Username: idpbuilder Password: idpbuilder
htpasswd: aWRwYnVpbGRlcjokMnkkMTEkVkVoa09aRE90SFZFbDJUMnFobGVwZXBGc3NMOTMvZlhoRzNaTHFyN1QvblpjajJKeXFoNWU=
---
apiVersion: v1
Expand All @@ -23,13 +24,14 @@ spec:
mountPath: "/var/lib/registry"
- name: auth-vol
mountPath: "/auth/"
env:
- name: REGISTRY_AUTH
value: "htpasswd"
- name: REGISTRY_AUTH_HTPASSWD_REALM
value: "Registry Realm"
- name: REGISTRY_AUTH_HTPASSWD_PATH
value: "/auth/htpasswd"
# Uncomment the following to enable registry basic auth
# env:
# - name: REGISTRY_AUTH
# value: "htpasswd"
# - name: REGISTRY_AUTH_HTPASSWD_REALM
# value: "Registry Realm"
# - name: REGISTRY_AUTH_HTPASSWD_PATH
# value: "/auth/htpasswd"
volumes:
- name: registry-vol
persistentVolumeClaim:
Expand All @@ -44,6 +46,7 @@ metadata:
name: docker-registry
namespace: docker-registry
spec:
type: NodePort
selector:
app: registry
ports:
Expand Down

0 comments on commit 8dc07e6

Please sign in to comment.