diff --git a/README.md b/README.md index b7c8e265..a74ecdab 100644 --- a/README.md +++ b/README.md @@ -280,7 +280,7 @@ You can of course use as many insecure registries or root certificate authoritie ### Registry UI -For debugging reasons, it may be useful to be able to access the registry through an UI. This can be achieved by enabling the registry UI with the value `registryUI.enabled=true`. The UI will not be publicly available through an ingress, you will need to open a port-forward from port `80`. You can set a custom username and password with values `registryUI.auth.username` (default is `admin`) and `registryUI.auth.password` (empty by default). +For debugging reasons, it may be useful to be able to access the registry through an UI. This can be achieved by enabling the registry UI with the value `docker-registry-ui.enabled=true`. The UI will not be publicly available through an ingress, you will need to open a port-forward from port `80`. For more information about the UI and how to configure it, please see https://artifacthub.io/packages/helm/joxit/docker-registry-ui. ## Garbage collection and limitations diff --git a/helm/kube-image-keeper/Chart.lock b/helm/kube-image-keeper/Chart.lock index 4a055a61..59eeee8b 100644 --- a/helm/kube-image-keeper/Chart.lock +++ b/helm/kube-image-keeper/Chart.lock @@ -2,5 +2,8 @@ dependencies: - name: minio repository: https://charts.bitnami.com/bitnami version: 13.2.0 -digest: sha256:deb5af1d98c80ea52289c771f4cae41c7ef73fbb231c86f8eda553a9d4d53cc8 -generated: "2024-01-23T16:17:31.822508041+01:00" +- name: docker-registry-ui + repository: https://helm.joxit.dev + version: 1.1.3 +digest: sha256:6388d25ea6877863eeb3e1ac5e85f4da8c5b1032e8eebedde87779d1f1737f55 +generated: "2024-08-07T14:48:17.51529339+02:00" diff --git a/helm/kube-image-keeper/Chart.yaml b/helm/kube-image-keeper/Chart.yaml index 202ddd4a..6d8f9fde 100644 --- a/helm/kube-image-keeper/Chart.yaml +++ b/helm/kube-image-keeper/Chart.yaml @@ -32,3 +32,7 @@ dependencies: version: "13.2.0" repository: "https://charts.bitnami.com/bitnami" condition: minio.enabled + - name: docker-registry-ui + version: "1.1.3" + repository: "https://helm.joxit.dev" + condition: docker-registry-ui.enabled diff --git a/helm/kube-image-keeper/templates/registry-ui-deployment.yaml b/helm/kube-image-keeper/templates/registry-ui-deployment.yaml deleted file mode 100644 index b425a276..00000000 --- a/helm/kube-image-keeper/templates/registry-ui-deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -{{- if .Values.registryUI.enabled -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "kube-image-keeper.fullname" . }}-registry-ui - labels: - {{- include "kube-image-keeper.registry-ui-labels" . | nindent 4 }} -spec: - replicas: 1 - selector: - matchLabels: - {{- include "kube-image-keeper.registry-ui-selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.registryUI.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "kube-image-keeper.registry-ui-selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.registryUI.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - securityContext: - {{- toYaml .Values.registryUI.podSecurityContext | nindent 8 }} - containers: - - name: registry-ui - securityContext: - {{- toYaml .Values.registryUI.securityContext | nindent 12 }} - image: {{ .Values.registryUI.image.repository }}:{{ .Values.registryUI.image.tag }} - imagePullPolicy: {{ .Values.registryUI.image.pullPolicy }} - ports: - - containerPort: 80 - resources: - {{- toYaml .Values.registryUI.resources | nindent 12 }} - env: - - name: REGISTRY_HOST - value: {{ include "kube-image-keeper.fullname" . }}-registry - - name: REGISTRY_PORT - value: "5000" - - name: REGISTRY_PROTOCOL - value: "http" - - name: SSL_VERIFY - value: "false" - - name: USERNAME - valueFrom: - secretKeyRef: - name: {{ include "kube-image-keeper.fullname" . }}-registry-ui-basic-auth - key: username - - name: PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "kube-image-keeper.fullname" . }}-registry-ui-basic-auth - key: password - {{- with .Values.registryUI.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.registryUI.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.registryUI.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end -}} diff --git a/helm/kube-image-keeper/templates/registry-ui-secret.yaml b/helm/kube-image-keeper/templates/registry-ui-secret.yaml deleted file mode 100644 index de4b3cd1..00000000 --- a/helm/kube-image-keeper/templates/registry-ui-secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.registryUI.enabled -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "kube-image-keeper.fullname" . }}-registry-ui-basic-auth - annotations: - "helm.sh/resource-policy": "keep" -type: kubernetes.io/basic-auth -stringData: - {{- $secretName := printf "%s-%s" (include "kube-image-keeper.fullname" .) "registry-ui-basic-auth" }} - {{- $secretData := (get (lookup "v1" "Secret" .Release.Namespace $secretName) "data") | default dict }} - # set $password to existing secret data or generate a random one when it does not exists - {{- $password := (get $secretData "password" | b64dec) | default (randAlphaNum 32) }} - username: {{ .Values.registryUI.auth.username }} - password: {{ .Values.registryUI.auth.password | default $password }} -{{- end }} diff --git a/helm/kube-image-keeper/values.yaml b/helm/kube-image-keeper/values.yaml index 939cde73..70673ad0 100644 --- a/helm/kube-image-keeper/values.yaml +++ b/helm/kube-image-keeper/values.yaml @@ -303,37 +303,12 @@ registry: # -- Annotations to add to the servicateAccount annotations: {} -registryUI: +docker-registry-ui: # -- If true, enable the registry user interface enabled: false - image: - # -- Registry UI image repository - repository: parabuzzle/craneoperator - # -- Registry UI image pull policy - pullPolicy: IfNotPresent - # -- Registry UI image tag - tag: "2.2.5" - auth: - # -- Registry UI username - username: "admin" - # -- Registry UI password - password: "" - # -- CPU / Memory resources requests / limits for the registry UI pod - resources: {} - # -- Specify secrets to be used when pulling registry UI image - imagePullSecrets: [] - # -- Annotations to add to the registry UI pod - podAnnotations: {} - # -- Security context for the registry UI pod - podSecurityContext: {} - # -- Security context for containers of the registry UI pod - securityContext: {} - # -- Node selector for the registry UI pod - nodeSelector: {} - # -- Toleration for the registry UI pod - tolerations: [] - # -- Affinity for the registry UI pod - affinity: {} + ui: + proxy: true + dockerRegistryUrl: http://kube-image-keeper-registry:5000 minio: # -- If true, install minio as a local storage backend for the registry