From 6c04a312d7a730c602bc0f32d6d16c0cad3168fa Mon Sep 17 00:00:00 2001 From: "Waylon S. Walker" Date: Sat, 21 Oct 2023 11:12:41 -0500 Subject: [PATCH] create registry --- .../registry-auth-persistentvolumeclaim.yaml | 14 ++++ .../registry-persistentvolumeclaim.yaml | 14 ++++ registry-ui/registry-server-deployment.yaml | 68 +++++++++++++++++++ registry-ui/registry-server-service.yaml | 21 ++++++ registry-ui/registry-ui-deployment.yaml | 59 ++++++++++++++++ registry-ui/registry-ui-service.yaml | 21 ++++++ 6 files changed, 197 insertions(+) create mode 100644 registry-ui/registry-auth-persistentvolumeclaim.yaml create mode 100644 registry-ui/registry-persistentvolumeclaim.yaml create mode 100644 registry-ui/registry-server-deployment.yaml create mode 100644 registry-ui/registry-server-service.yaml create mode 100644 registry-ui/registry-ui-deployment.yaml create mode 100644 registry-ui/registry-ui-service.yaml diff --git a/registry-ui/registry-auth-persistentvolumeclaim.yaml b/registry-ui/registry-auth-persistentvolumeclaim.yaml new file mode 100644 index 0000000..ae16ca8 --- /dev/null +++ b/registry-ui/registry-auth-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: registry-auth + name: registry-auth +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/registry-ui/registry-persistentvolumeclaim.yaml b/registry-ui/registry-persistentvolumeclaim.yaml new file mode 100644 index 0000000..d1efbe7 --- /dev/null +++ b/registry-ui/registry-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: registry + name: registry +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/registry-ui/registry-server-deployment.yaml b/registry-ui/registry-server-deployment.yaml new file mode 100644 index 0000000..7909a6f --- /dev/null +++ b/registry-ui/registry-server-deployment.yaml @@ -0,0 +1,68 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: ./kompose convert + kompose.version: 1.31.2 (a92241f79) + creationTimestamp: null + labels: + io.kompose.service: registry-server + name: registry-server +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: registry-server + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: ./kompose convert + kompose.version: 1.31.2 (a92241f79) + creationTimestamp: null + labels: + io.kompose.network/registry-ui-default: "true" + io.kompose.service: registry-server + spec: + containers: + - env: + - name: REGISTRY_AUTH + value: htpasswd + - name: REGISTRY_AUTH_HTPASSWD_PATH + value: /auth/registry.password + - name: REGISTRY_AUTH_HTPASSWD_REALM + value: Registry + - name: REGISTRY_HTTP_HEADERS_Access-Control-Allow-Credentials + value: "[true]" + - name: REGISTRY_HTTP_HEADERS_Access-Control-Allow-Headers + value: "[Authorization,Accept,Cache-Control]" + - name: REGISTRY_HTTP_HEADERS_Access-Control-Allow-Methods + value: "[HEAD,GET,OPTIONS,DELETE]" + - name: REGISTRY_HTTP_HEADERS_Access-Control-Allow-Origin + value: "[http://registry-ui.wayl.one]" + - name: REGISTRY_HTTP_HEADERS_Access-Control-Expose-Headers + value: "[Docker-Content-Digest]" + - name: REGISTRY_STORAGE_DELETE_ENABLED + value: "true" + image: registry:2.8.2 + name: registry-server + ports: + - containerPort: 5000 + hostPort: 5000 + protocol: TCP + resources: {} + volumeMounts: + - mountPath: /var/lib/registry + name: registry + - mountPath: /auth + name: registry-auth + restartPolicy: Always + volumes: + - name: registry + persistentVolumeClaim: + claimName: registry + - name: registry-auth + persistentVolumeClaim: + claimName: registry-auth +status: {} diff --git a/registry-ui/registry-server-service.yaml b/registry-ui/registry-server-service.yaml new file mode 100644 index 0000000..30dcb72 --- /dev/null +++ b/registry-ui/registry-server-service.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: ./kompose convert + kompose.version: 1.31.2 (a92241f79) + creationTimestamp: null + labels: + io.kompose.service: registry-server + name: registry-server +spec: + type: NodePort + ports: + - name: "5000" + port: 5000 + targetPort: 5000 + nodePort: 30006 + selector: + io.kompose.service: registry-server +status: + loadBalancer: {} diff --git a/registry-ui/registry-ui-deployment.yaml b/registry-ui/registry-ui-deployment.yaml new file mode 100644 index 0000000..0683864 --- /dev/null +++ b/registry-ui/registry-ui-deployment.yaml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: ./kompose convert + kompose.version: 1.31.2 (a92241f79) + creationTimestamp: null + labels: + io.kompose.service: registry-ui + name: registry-ui +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: registry-ui + strategy: {} + template: + metadata: + annotations: + kompose.cmd: ./kompose convert + kompose.version: 1.31.2 (a92241f79) + creationTimestamp: null + labels: + io.kompose.network/registry-ui-default: "true" + io.kompose.service: registry-ui + spec: + containers: + - env: + - name: CATALOG_ELEMENTS_LIMIT + value: "1000" + - name: CATALOG_MAX_BRANCHES + value: "1" + - name: CATALOG_MIN_BRANCHES + value: "1" + - name: DELETE_IMAGES + value: "true" + - name: NGINX_PROXY_PASS_URL + value: http://registry-ui.wayl.one + - name: REGISTRY_SECURED + value: "false" + - name: REGISTRY_TITLE + value: Docker Registry UI + - name: SHOW_CATALOG_NB_TAGS + value: "true" + - name: SHOW_CONTENT_DIGEST + value: "true" + - name: SINGLE_REGISTRY + value: "true" + - name: TAGLIST_PAGE_SIZE + value: "100" + image: joxit/docker-registry-ui:main + name: registry-ui + ports: + - containerPort: 80 + hostPort: 5001 + protocol: TCP + resources: {} + restartPolicy: Always +status: {} diff --git a/registry-ui/registry-ui-service.yaml b/registry-ui/registry-ui-service.yaml new file mode 100644 index 0000000..e449d95 --- /dev/null +++ b/registry-ui/registry-ui-service.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: ./kompose convert + kompose.version: 1.31.2 (a92241f79) + creationTimestamp: null + labels: + io.kompose.service: registry-ui + name: registry-ui +spec: + type: NodePort + ports: + - name: "5001" + port: 5001 + targetPort: 80 + nodePort: 30007 + selector: + io.kompose.service: registry-ui +status: + loadBalancer: {}