37 Commits

Author SHA1 Message Date
Devin Canterberry
e224a31190 🏁 v1.16.0 Release 2021-12-11 14:20:24 -08:00
Devin Canterberry
a36de54d0c Merge pull request #44 from MrSimonEmms/main
Conditionally create service account and add to deployment
2021-12-11 14:19:18 -08:00
Simon Emms
2b24174cea Conditionally create service account and add to deployment
Signed-off-by: Simon Emms <simon@simonemms.com>
2021-12-07 11:54:11 +00:00
Devin Canterberry
2fd6d8fbf0 🏁 v1.15.0 Release 2021-12-05 22:28:32 -08:00
Devin Canterberry
6305476063 Merge pull request #37 from SimonRupar/main
Enable metrics via Prometheus Operator
2021-12-05 22:25:32 -08:00
Devin Canterberry
cfb7daa4e4 Merge pull request #42 from MrSimonEmms/main
Support deployment to a namespace
2021-12-05 15:50:35 -08:00
Simon Emms
851575797a Support deployment to a namespace
Signed-off-by: Simon Emms <simon@simonemms.com>
2021-12-05 15:21:31 +00:00
SimonRupar
489a0cfe5e Updated typo to enable(d) 2021-11-22 11:25:20 +01:00
Devin Canterberry
f9fbd04f6f 🏁 v1.14.0 Release 2021-10-19 23:56:15 -07:00
SimonRupar
f38b9b4a58 Enable metrics via Prometheus Operator 2021-10-14 17:11:09 +02:00
Devin Canterberry
935935622c Merge pull request #35 from vvanouytsel/main
Support additional env variables
2021-10-13 08:44:22 -07:00
Vincent Van Ouytsel
4c49800452 Support additional env variables 2021-10-13 09:32:25 +02:00
Devin Canterberry
b321438d4e 🏁 v1.13.2 Release 2021-09-30 19:59:16 -07:00
Devin Canterberry
84535c1d96 Merge pull request #29 from SimonRupar/main
Add support for S3 bucket data prefix
2021-09-30 12:38:05 -07:00
SimonRupar
7076faea33 Add support for S3 bucket to prefix all data 2021-09-30 20:20:14 +02:00
Devin Canterberry
dfcd91722c 🏁 v1.13.1 Release 2021-09-26 23:50:41 -07:00
Devin Canterberry
932a31b2fa Merge pull request #25 from pavankumar-go/patch-1
Add keys proxyUsername and proxyPassword with empty string to docker-registry-secret if values are not set
2021-09-26 23:48:24 -07:00
pavankumar-go
88528289cf uses default function instead of if-else condition 2021-09-27 11:30:06 +05:30
Devin Canterberry
35c1365b5c 🐞 Replace broken icon URL with a pattern under the control of this chart repo 2021-09-03 16:16:36 -07:00
Devin Canterberry
a713a3d91c 🏁 Increment chart version for v1.13.0 release 2021-09-03 15:47:40 -07:00
Devin Canterberry
9697305e39 Merge pull request #23 from joaosa/main
Add support for having external s3 secrets
2021-09-03 15:27:28 -07:00
Pavan Kumar
d412af5f95 Add keys proxyUsername and proxyPassword with empty string
Setting up docker-registry proxy with no password & username created the secret to be created without `proxyUsername` and `proxyPassword` fields, causing pod to fail if `proxy.enabled = true` with error 
```
error: "couldn't find key proxyUsername in Secret <namespace>/docker-registry-secret"
```
2021-08-26 18:44:03 +05:30
Joao Andrade
45daca1981 Add support for external s3 secrets 2021-08-09 12:13:07 +01:00
Devin Canterberry
47c07072ff 🏁 Increment version for v1.12.0 release 2021-08-07 18:03:44 -07:00
Devin Canterberry
a599059936 Merge pull request #20 from joaosa/main
Add support for having external proxy secrets
2021-08-04 06:50:32 -07:00
Joao Andrade
5a68bb595a Add support for external proxy secrets 2021-08-04 11:13:58 +01:00
Devin Canterberry
e6bf1b7833 v1.11.0 Release 2021-06-11 21:40:25 -07:00
Devin Canterberry
c3dd512501 Merge pull request #18 from jrhorner1/main
Add support for registry proxy/mirror
2021-06-11 19:32:22 -07:00
Jesse Horner
51c6e55ddb add support for registry proxy 2021-06-11 12:07:48 -04:00
Devin Canterberry
b3677863c7 🏁 Increment chart version for v1.10.1 release 2021-02-14 19:58:55 -08:00
Devin Canterberry
89760bc72c Merge pull request #8 from nightscape/patch-1
Rename port to match Istio naming conventions
2021-02-14 13:40:49 -08:00
Martin Mauch
cbb527450d Port name is http or https plus port 2021-02-03 23:24:16 +01:00
Martin Mauch
829c10f509 Rename port to match Istio naming conventions
Istio requires the service port to be named like `<protocol>[-<suffix>]`.
If possible, it would be good to rename it here to match this requirement.
2021-01-27 00:24:19 +01:00
Devin Canterberry
38715871da Merge pull request #5 from Skaronator/main
Support for Session Affinity option in service template
2020-12-01 19:18:31 -08:00
Niklas Wagner
a830d2eb17 Support for Session Affinity option in service template 2020-12-01 15:47:20 +01:00
Devin Canterberry
5c19fdbee8 Merge pull request #3 from rkevin-arch/main
Fix typo in README
2020-11-29 00:16:32 -08:00
rkevin
c8718f203e Fix typo 2020-11-28 21:26:26 -08:00
13 changed files with 181 additions and 7 deletions

View File

@@ -1,10 +1,10 @@
apiVersion: v1
description: A Helm chart for Docker Registry
name: docker-registry
version: 1.9.7
version: 1.16.0
appVersion: 2.7.1
home: https://hub.docker.com/_/registry/
icon: https://hub.docker.com/public/images/logos/mini-logo.svg
icon: https://helm.twun.io/docker-registry.png
maintainers:
- email: devin@canterberry.cc
name: Devin Canterberry

View File

@@ -43,12 +43,17 @@ their default values.
| `persistence.size` | Amount of space to claim for PVC | `10Gi` |
| `persistence.storageClass` | Storage Class to use for PVC | `-` |
| `persistence.existingClaim` | Name of an existing PVC to use for config | `nil` |
| `serviceAccount.create` | Create ServiceAccount | `false` |
| `serviceAccount.name` | ServiceAccount name | `nil` |
| `serviceAccount.annotations` | Annotations to add to the ServiceAccount | `{}` |
| `service.port` | TCP port on which the service is exposed | `5000` |
| `service.type` | service type | `ClusterIP` |
| `service.clusterIP` | if `service.type` is `ClusterIP` and this is non-empty, sets the cluster IP of the service | `nil` |
| `service.nodePort` | if `service.type` is `NodePort` and this is non-empty, sets the node port of the service | `nil` |
| `service.loadBalancerIP | if `service.type` is `LoadBalancer` and this is non-empty, sets the loadBalancerIP of the service | `nil` |
| `service.loadBalancerIP` | if `service.type` is `LoadBalancer` and this is non-empty, sets the loadBalancerIP of the service | `nil` |
| `service.loadBalancerSourceRanges`| if `service.type` is `LoadBalancer` and this is non-empty, sets the loadBalancerSourceRanges of the service | `nil` |
| `service.sessionAffinity` | service session affinity | `nil` |
| `service.sessionAffinityConfig` | service session affinity config | `nil` |
| `replicaCount` | k8s replicas | `1` |
| `updateStrategy` | update strategy for deployment | `{}` |
| `podAnnotations` | Annotations for pod | `{}` |
@@ -62,6 +67,7 @@ their default values.
| `secrets.htpasswd` | Htpasswd authentication | `nil` |
| `secrets.s3.accessKey` | Access Key for S3 configuration | `nil` |
| `secrets.s3.secretKey` | Secret Key for S3 configuration | `nil` |
| `secrets.s3.secretRef` | The ref for an external secret containing the accessKey and secretKey keys | `""` |
| `secrets.swift.username` | Username for Swift configuration | `nil` |
| `secrets.swift.password` | Password for Swift configuration | `nil` |
| `haSharedSecret` | Shared secret for Registry | `nil` |
@@ -69,10 +75,17 @@ their default values.
| `s3.region` | S3 region | `nil` |
| `s3.regionEndpoint` | S3 region endpoint | `nil` |
| `s3.bucket` | S3 bucket name | `nil` |
| `s3.rootdirectory` | S3 prefix that is applied to allow you to segment data | `nil` |
| `s3.encrypt` | Store images in encrypted format | `nil` |
| `s3.secure` | Use HTTPS | `nil` |
| `swift.authurl` | Swift authurl | `nil` |
| `swift.container` | Swift container | `nil` |
| `proxy.enabled` | If true, registry will function as a proxy/mirror | `false` |
| `proxy.remoteurl` | Remote registry URL to proxy requests to | `https://registry-1.docker.io` |
| `proxy.username` | Remote registry login username | `nil` |
| `proxy.password` | Remote registry login password | `nil` |
| `proxy.secretRef` | The ref for an external secret containing the proxyUsername and proxyPassword keys | `""` |
| `namespace` | specify a namespace to install the chart to - defaults to `.Release.Namespace` | `{{ .Release.Namespace }}` |
| `nodeSelector` | node labels for pod assignment | `{}` |
| `affinity` | affinity settings | `{}` |
| `tolerations` | pod tolerations | `[]` |
@@ -82,8 +95,18 @@ their default values.
| `ingress.path` | Ingress service path | `/` |
| `ingress.hosts` | Ingress hostnames | `[]` |
| `ingress.tls` | Ingress TLS configuration (YAML) | `[]` |
| `metrics.enabled` | Enable metrics on Service | `false` |
| `metrics.port` | TCP port on which the service metrics is exposed | `5001` |
| `metrics.serviceMonitor.annotations` | Prometheus Operator ServiceMonitor annotations | `{}` |
| `metrics.serviceMonitor.enable` | If true, Prometheus Operator ServiceMonitor will be created | `false` |
| `metrics.serviceMonitor.labels` | Prometheus Operator ServiceMonitor labels | `{}` |
| `metrics.prometheusRule.annotations` | Prometheus Operator PrometheusRule annotations | `{}` |
| `metrics.prometheusRule.enable` | If true, Prometheus Operator prometheusRule will be created | `false` |
| `metrics.prometheusRule.labels` | Prometheus Operator prometheusRule labels | `{}` |
| `metrics.prometheusRule.rules` | PrometheusRule defining alerting rules for a Prometheus instance | `{}` |
| `extraVolumeMounts` | Additional volumeMounts to the registry container | `[]` |
| `extraVolumes` | Additional volumes to the pod | `[]` |
| `extraEnvVars` | Additional environment variables to the pod | `[]` |
Specify each parameter using the `--set key=value[,key=value]` argument to
`helm install`.

View File

@@ -2,6 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "docker-registry.fullname" . }}-config
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}

View File

@@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "docker-registry.fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
@@ -32,6 +33,9 @@ spec:
{{ toYaml $.Values.podAnnotations | indent 8 }}
{{- end }}
spec:
{{- if or (eq .Values.serviceAccount.create true) (ne .Values.serviceAccount.name "") }}
serviceAccountName: {{ .Values.serviceAccount.name | default (include "docker-registry.fullname" .) }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
@@ -54,6 +58,11 @@ spec:
- /etc/docker/registry/config.yml
ports:
- containerPort: 5000
{{- if .Values.metrics.enabled }}
- containerPort: {{ (split ":" .Values.configData.http.debug.addr)._1 }}
name: metrics
protocol: TCP
{{- end }}
livenessProbe:
httpGet:
{{- if .Values.tlsSecretName }}
@@ -110,16 +119,16 @@ spec:
name: {{ template "docker-registry.fullname" . }}-secret
key: azureContainer
{{- else if eq .Values.storage "s3" }}
{{- if and .Values.secrets.s3.secretKey .Values.secrets.s3.accessKey }}
{{- if or (and .Values.secrets.s3.secretKey .Values.secrets.s3.accessKey) .Values.secrets.s3.secretRef }}
- name: REGISTRY_STORAGE_S3_ACCESSKEY
valueFrom:
secretKeyRef:
name: {{ template "docker-registry.fullname" . }}-secret
name: {{ if .Values.secrets.s3.secretRef }}{{ .Values.secrets.s3.secretRef }}{{ else }}{{ template "docker-registry.fullname" . }}-secret{{ end }}
key: s3AccessKey
- name: REGISTRY_STORAGE_S3_SECRETKEY
valueFrom:
secretKeyRef:
name: {{ template "docker-registry.fullname" . }}-secret
name: {{ if .Values.secrets.s3.secretRef }}{{ .Values.secrets.s3.secretRef }}{{ else }}{{ template "docker-registry.fullname" . }}-secret{{ end }}
key: s3SecretKey
{{- end }}
- name: REGISTRY_STORAGE_S3_REGION
@@ -130,6 +139,10 @@ spec:
{{- end }}
- name: REGISTRY_STORAGE_S3_BUCKET
value: {{ required ".Values.s3.bucket is required" .Values.s3.bucket }}
{{- if .Values.s3.rootdirectory }}
- name: REGISTRY_STORAGE_S3_ROOTDIRECTORY
value: {{ .Values.s3.rootdirectory | quote }}
{{- end }}
{{- if .Values.s3.encrypt }}
- name: REGISTRY_STORAGE_S3_ENCRYPT
value: {{ .Values.s3.encrypt | quote }}
@@ -154,9 +167,26 @@ spec:
- name: REGISTRY_STORAGE_SWIFT_CONTAINER
value: {{ required ".Values.swift.container is required" .Values.swift.container }}
{{- end }}
{{- if .Values.proxy.enabled }}
- name: REGISTRY_PROXY_REMOTEURL
value: {{ required ".Values.proxy.remoteurl is required" .Values.proxy.remoteurl }}
- name: REGISTRY_PROXY_USERNAME
valueFrom:
secretKeyRef:
name: {{ if .Values.proxy.secretRef }}{{ .Values.proxy.secretRef }}{{ else }}{{ template "docker-registry.fullname" . }}-secret{{ end }}
key: proxyUsername
- name: REGISTRY_PROXY_PASSWORD
valueFrom:
secretKeyRef:
name: {{ if .Values.proxy.secretRef }}{{ .Values.proxy.secretRef }}{{ else }}{{ template "docker-registry.fullname" . }}-secret{{ end }}
key: proxyPassword
{{- end }}
{{- if .Values.persistence.deleteEnabled }}
- name: REGISTRY_STORAGE_DELETE_ENABLED
value: "true"
{{- end }}
{{- with .Values.extraEnvVars }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.secrets.htpasswd }}

View File

@@ -6,6 +6,7 @@ apiVersion: {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
kind: Ingress
metadata:
name: {{ template "docker-registry.fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}

View File

@@ -3,6 +3,7 @@ apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "docker-registry.fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}

View File

@@ -0,0 +1,17 @@
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled -}}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ template "docker-registry.fullname" . }}
labels:
app.kubernetes.io/component: controller
{{- if .Values.metrics.prometheusRule.labels }}
{{- toYaml .Values.metrics.prometheusRule.labels | nindent 4 }}
{{- end }}
spec:
{{- if .Values.metrics.prometheusRule.rules }}
groups:
- name: {{ template "docker-registry.fullname" . }}
rules: {{- toYaml .Values.metrics.prometheusRule.rules | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -4,6 +4,7 @@ kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "docker-registry.fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
app: {{ template "docker-registry.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"

View File

@@ -2,6 +2,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ template "docker-registry.fullname" . }}-secret
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
@@ -35,3 +36,5 @@ data:
swiftPassword: {{ .Values.secrets.swift.password | b64enc | quote }}
{{- end }}
{{- end }}
proxyUsername: {{ .Values.proxy.username | default "" | b64enc | quote }}
proxyPassword: {{ .Values.proxy.password | default "" | b64enc | quote }}

View File

@@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ template "docker-registry.fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
@@ -21,14 +22,27 @@ spec:
{{- end }}
{{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerSourceRanges))) }}
loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }}
{{- end }}
{{- if .Values.service.sessionAffinity }}
sessionAffinity: {{ .Values.service.sessionAffinity }}
{{- if .Values.service.sessionAffinityConfig }}
sessionAffinityConfig:
{{ toYaml .Values.service.sessionAffinityConfig | nindent 4 }}
{{- end -}}
{{- end }}
ports:
- port: {{ .Values.service.port }}
protocol: TCP
name: {{ .Values.service.name }}
name: {{ if .Values.tlsSecretName }}https{{ else }}http{{ end }}-{{ .Values.service.port }}
targetPort: 5000
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
{{- if .Values.metrics.enabled }}
- port: {{ .Values.metrics.port }}
protocol: TCP
name: metrics
targetPort: {{ (split ":" .Values.configData.http.debug.addr)._1 }}
{{- end }}
selector:
app: {{ template "docker-registry.name" . }}

View File

@@ -0,0 +1,19 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- if .Values.serviceAccount.name }}
name: {{ .Values.serviceAccount.name }}
{{- else }}
name: {{ include "docker-registry.fullname" . }}
{{- end }}
{{- if .Values.serviceAccount.annotations }}
annotations:
{{ toYaml .Values.serviceAccount.annotations | indent 4 }}
{{- end }}
{{- end -}}

View File

@@ -0,0 +1,21 @@
{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "docker-registry.fullname" . }}-servicemonitor
labels:
app: {{ template "docker-registry.name" . }}-metrics
release: {{ .Release.Name }}
{{- if .Values.metrics.serviceMonitor.labels }}
{{ toYaml .Values.metrics.serviceMonitor.labels | indent 4 }}
{{- end }}
spec:
selector:
matchLabels:
app: {{ template "docker-registry.name" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
endpoints:
- port: metrics
interval: 15s
{{- end }}

View File

@@ -12,6 +12,11 @@ updateStrategy: {}
podAnnotations: {}
podLabels: {}
serviceAccount:
create: false
name: ""
annotations: {}
image:
repository: registry
tag: 2.7.1
@@ -21,6 +26,8 @@ image:
service:
name: registry
type: ClusterIP
# sessionAffinity: None
# sessionAffinityConfig: {}
# clusterIP:
port: 5000
# nodePort:
@@ -74,7 +81,9 @@ secrets:
# accountKey: ""
# container: ""
# Secrets for S3 access and secret keys
# Use a secretRef with keys (accessKey, secretKey) for secrets stored outside the chart
# s3:
# secretRef: ""
# accessKey: ""
# secretKey: ""
# Secrets for Swift username and password
@@ -87,6 +96,7 @@ secrets:
# region: us-east-1
# regionEndpoint: s3.us-east-1.amazonaws.com
# bucket: my-bucket
# rootdirectory: /object/prefix
# encrypt: false
# secure: true
@@ -95,6 +105,29 @@ secrets:
# authurl: http://swift.example.com/
# container: my-container
# https://docs.docker.com/registry/recipes/mirror/
proxy:
enabled: false
remoteurl: https://registry-1.docker.io
username: ""
password: ""
# the ref for a secret stored outside of this chart
# Keys: proxyUsername, proxyPassword
secretRef: ""
metrics:
enabled: false
port: 5001
# Create a prometheus-operator servicemonitor
serviceMonitor:
enabled: false
labels: {}
# prometheus-operator PrometheusRule defining alerting rules for a Prometheus instance
prometheusRule:
enabled: false
labels: {}
rules: {}
configData:
version: 0.1
log:
@@ -107,6 +140,11 @@ configData:
addr: :5000
headers:
X-Content-Type-Options: [nosniff]
debug:
addr: :5001
prometheus:
enabled: false
path: /metrics
health:
storagedriver:
enabled: true
@@ -145,3 +183,8 @@ extraVolumes: []
# - key: cloudfront.pem
# path: cloudfront.pem
# mode: 511
extraEnvVars: []
## Additional ENV variables to set
# - name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
# value: "/var/lib/example"