From 8dc07e6df63484b6aa851f5bdc1c08bc3a185b35 Mon Sep 17 00:00:00 2001 From: Jesse Sanford <108698+jessesanford@users.noreply.github.com> Date: Fri, 1 Mar 2024 00:18:52 -0500 Subject: [PATCH] Docker registry fixes (#162) Signed-off-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com> --- examples/docker-registry/kind.yaml | 22 +++++++++++++++++++ .../docker-registry/manifests/registry.yaml | 17 ++++++++------ 2 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 examples/docker-registry/kind.yaml diff --git a/examples/docker-registry/kind.yaml b/examples/docker-registry/kind.yaml new file mode 100644 index 00000000..5a38f5e6 --- /dev/null +++ b/examples/docker-registry/kind.yaml @@ -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 diff --git a/examples/docker-registry/manifests/registry.yaml b/examples/docker-registry/manifests/registry.yaml index 863115c7..de79fc56 100644 --- a/examples/docker-registry/manifests/registry.yaml +++ b/examples/docker-registry/manifests/registry.yaml @@ -5,6 +5,7 @@ metadata: namespace: docker-registry type: Opaque data: + # Username: idpbuilder Password: idpbuilder htpasswd: aWRwYnVpbGRlcjokMnkkMTEkVkVoa09aRE90SFZFbDJUMnFobGVwZXBGc3NMOTMvZlhoRzNaTHFyN1QvblpjajJKeXFoNWU= --- apiVersion: v1 @@ -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: @@ -44,6 +46,7 @@ metadata: name: docker-registry namespace: docker-registry spec: + type: NodePort selector: app: registry ports: