diff --git a/registry-ui/config.yml b/registry-ui/config.yml index 6507b15..2523b5e 100644 --- a/registry-ui/config.yml +++ b/registry-ui/config.yml @@ -11,7 +11,7 @@ http: addr: :5000 headers: X-Content-Type-Options: [nosniff] - Access-Control-Allow-Origin: ["http://registry-ui.wayl.one"] + Access-Control-Allow-Origin: ["https://registry-ui.wayl.one"] Access-Control-Allow-Methods: ["HEAD", "GET", "OPTIONS", "DELETE"] Access-Control-Expose-Headers: ["Docker-Content-Digest"] Access-Control-Allow-Credentials: [true] diff --git a/registry-ui/deployment.yaml b/registry-ui/deployment.yaml index da2fa03..e87debf 100644 --- a/registry-ui/deployment.yaml +++ b/registry-ui/deployment.yaml @@ -97,18 +97,6 @@ spec: 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: "['Accept', 'Authorization', 'Content-Type', 'Access-Control-Allow-Headers', 'X-Requested-With']" - - name: REGISTRY_HTTP_HEADERS_Access-Control-Allow-Methods - value: "[HEAD,GET,OPTIONS,DELETE]" - - name: REGISTRY_HTTP_HEADERS_Access-Control-Allow-Origin - value: "[https://registry-ui.wayl.one]" - - name: REGISTRY_HTTP_HEADERS_Access-Control-Expose-Headers - value: "[Docker-Content-Digest]" - - name: REGISTRY_HTTP_HEADERS_Access-Control-Max-Age - value: "[17280000]" - name: REGISTRY_STORAGE_DELETE_ENABLED value: "true" - name: REGISTRY_TITLE @@ -126,6 +114,8 @@ spec: name: registry - mountPath: /auth name: registry-auth + - mountPath: /etc/docker/registry + name: registry-config restartPolicy: Always volumes: - name: registry @@ -134,6 +124,9 @@ spec: - name: registry-auth persistentVolumeClaim: claimName: registry-auth + - name: registry-config + persistentVolumeClaim: + claimName: registry-config status: {} --- @@ -170,6 +163,23 @@ spec: storage: 100Mi status: {} +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: registry-config + name: registry-config + namespace: registry +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} + --- apiVersion: apps/v1 kind: Deployment @@ -185,7 +195,7 @@ metadata: name: registry-ui namespace: registry spec: - replicas: 4 + replicas: 1 selector: matchLabels: io.kompose.service: registry-ui diff --git a/registry-ui/docker-compose.yml b/registry-ui/docker-compose.yml index 5808fb1..14c9aac 100644 --- a/registry-ui/docker-compose.yml +++ b/registry-ui/docker-compose.yml @@ -23,10 +23,6 @@ services: labels: kompose.service.expose: registry-ui.wayl.one kompose.image-pull-secret: regcred - # kompose.service.expose.ingress-class-name: "nginx" - # nginx.ingress.kubernetes.io/auth-type: basic - # nginx.ingress.kubernetes.io/auth-secret: basic-auth - # nginx.ingress.kubernetes.io/auth-realm: "Authentication Required - registry-ui" registry-server: image: registry:2.8.2 @@ -36,39 +32,18 @@ services: environment: REGISTRY_TITLE: Waylon Walker's Docker Registry REGISTRY_URL: https://registry.wayl.one - REGISTRY_HTTP_HEADERS_Access-Control-Allow-Origin: "[https://registry-ui.wayl.one]" - REGISTRY_HTTP_HEADERS_Access-Control-Allow-Methods: "[HEAD,GET,OPTIONS,DELETE]" - REGISTRY_HTTP_HEADERS_Access-Control-Allow-Credentials: "[true]" - REGISTRY_HTTP_HEADERS_Access-Control-Allow-Headers: "['Accept', 'Authorization', 'Content-Type', 'Access-Control-Allow-Headers', 'X-Requested-With']" - REGISTRY_HTTP_HEADERS_Access-Control-Expose-Headers: "[Docker-Content-Digest]" - REGISTRY_HTTP_HEADERS_Access-Control-Max-Age: "[17280000]" REGISTRY_STORAGE_DELETE_ENABLED: "true" - REGISTRY_AUTH: htpasswd REGISTRY_AUTH_HTPASSWD_REALM: Registry REGISTRY_AUTH_HTPASSWD_PATH: /auth/registry.password volumes: - registry:/var/lib/registry - registry-auth:/auth - # - registry-config:/etc/docker/registry + - registry-config:/etc/docker/registry container_name: registry-server labels: kompose.service.expose: registry.wayl.one kompose.service.type: loadbalancer - # kompose.image-pull-secret: regcred - # kompose.service.expose.ingress-class-name: "nginx" - # kompose.service.type: nodeport - - # kompose.service.nodeport.port: 30001 - # nginx.ingress.kubernetes.io/auth-type: basic - # nginx.ingress.kubernetes.io/auth-secret: basic-auth - # nginx.ingress.kubernetes.io/auth-realm: "Authentication Required - registry-server" - # traefik.ingress.kubernetes.io/router.tls: "true" - # traefik.ingress.kubernetes.io/buffering: | - # maxrequestbodybytes: 20000000000 - # memrequestbodybytes: 20000000000 - # maxresponsebodybytes: 20000000000 - # memresponsebodybytes: 20000000000 volumes: registry: diff --git a/registry-ui/registry-k8s.png b/registry-ui/registry-k8s.png index 6556d1e..50a5dc9 100644 Binary files a/registry-ui/registry-k8s.png and b/registry-ui/registry-k8s.png differ