Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ their default values.
| `serviceAccount.name` | ServiceAccount name | `nil` |
| `serviceAccount.annotations` | Annotations to add to the ServiceAccount | `{}` |
| `deployment.annotations` | Annotations to add to the Deployment | `{}` |
| `service.create` | Create Service | `false` |
| `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` |
Expand Down
11 changes: 11 additions & 0 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Allow the release namespace to be overridden for multi-namespace deployments in combined charts
*/}}
{{- define "docker-registry.namespace" -}}
{{- if .Values.namespace -}}
{{- .Values.namespace -}}
{{- else -}}
{{- .Release.Namespace -}}
{{- end -}}
{{- end -}}

{{/*
Expand the name of the chart.
*/}}
Expand Down
2 changes: 1 addition & 1 deletion templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "docker-registry.fullname" . }}-config
namespace: {{ .Values.namespace | default .Release.Namespace }}
namespace: {{ include "docker-registry.namespace" . }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
Expand Down
2 changes: 1 addition & 1 deletion templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ template "docker-registry.fullname" . }}-garbage-collector
namespace: {{ .Values.namespace | default .Release.Namespace }}
namespace: {{ include "docker-registry.namespace" . }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Expand Down
2 changes: 1 addition & 1 deletion templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "docker-registry.fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
namespace: {{ include "docker-registry.namespace" . }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Expand Down
2 changes: 1 addition & 1 deletion templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ apiVersion: {{- if $apiVersions.Has "networking.k8s.io/v1" }} networking.k8s.io/
kind: Ingress
metadata:
name: {{ template "docker-registry.fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
namespace: {{ include "docker-registry.namespace" . }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Expand Down
2 changes: 1 addition & 1 deletion templates/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "docker-registry.fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
namespace: {{ include "docker-registry.namespace" . }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Expand Down
2 changes: 1 addition & 1 deletion templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "docker-registry.fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
namespace: {{ include "docker-registry.namespace" . }}
labels:
app: {{ template "docker-registry.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
Expand Down
2 changes: 1 addition & 1 deletion templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ template "docker-registry.fullname" . }}-secret
namespace: {{ .Values.namespace | default .Release.Namespace }}
namespace: {{ include "docker-registry.namespace" . }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
Expand Down
4 changes: 3 additions & 1 deletion templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{{- if .Values.service.create -}}
apiVersion: v1
kind: Service
metadata:
name: {{ template "docker-registry.fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
namespace: {{ include "docker-registry.namespace" . }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Expand Down Expand Up @@ -50,3 +51,4 @@ spec:
selector:
app: {{ template "docker-registry.name" . }}
release: {{ .Release.Name }}
{{- end -}}
2 changes: 1 addition & 1 deletion templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
namespace: {{ include "docker-registry.namespace" . }}
{{- if .Values.serviceAccount.name }}
name: {{ .Values.serviceAccount.name }}
{{- else }}
Expand Down
1 change: 1 addition & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ image:
deployment: {}
# annotations:
service:
create: false
name: registry
type: ClusterIP
# sessionAffinity: None
Expand Down