Skip to content

Commit

Permalink
feat: add configurable namespace to values.yaml file (#49)
Browse files Browse the repository at this point in the history
Signed-off-by: Andreea-Lupu <[email protected]>
  • Loading branch information
Andreea-Lupu authored Nov 5, 2024
1 parent 4ff9153 commit 670a745
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/zot/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ appVersion: v2.1.2-rc3
description: A Helm chart for Kubernetes
name: zot
type: application
version: 0.1.64
version: 0.1.65
1 change: 1 addition & 0 deletions charts/zot/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-config
namespace: {{ .Values.namespace | default .Release.Namespace }}
data:
{{- range $key, $val := .Values.configFiles }}
{{ $key }}: {{ $val | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/zot/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "zot.fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
{{- include "zot.labels" . | nindent 4 }}
{{- with .Values.deploymentAnnotations }}
Expand Down
1 change: 1 addition & 0 deletions charts/zot/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
app: {{ .Chart.Name }}
release: {{ .Release.Name }}
Expand Down
1 change: 1 addition & 0 deletions charts/zot/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Values.pvc.name | default (printf "%s-pvc" .Release.Name) }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
spec:
accessModes:
- {{ .Values.pvc.accessMode | default "ReadWriteOnce" }}
Expand Down
1 change: 1 addition & 0 deletions charts/zot/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-secret
namespace: {{ .Values.namespace | default .Release.Namespace }}
type: Opaque
data:
{{- range $key, $val := .Values.secretFiles }}
Expand Down
1 change: 1 addition & 0 deletions charts/zot/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "zot.fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
{{- include "zot.labels" . | nindent 4 }}
{{- with .Values.service.annotations }}
Expand Down
1 change: 1 addition & 0 deletions charts/zot/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "zot.serviceAccountName" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
{{- include "zot.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
Expand Down
1 change: 1 addition & 0 deletions charts/zot/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "zot.fullname" . }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
app.kubernetes.io/component: metrics
spec:
Expand Down
1 change: 1 addition & 0 deletions charts/zot/templates/tests/test-connection-fails.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: Pod
metadata:
name: "{{ include "zot.fullname" . }}-test-connection-fails"
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
{{- include "zot.labels" . | nindent 4 }}
annotations:
Expand Down
1 change: 1 addition & 0 deletions charts/zot/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: Pod
metadata:
name: "{{ include "zot.fullname" . }}-test-connection"
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
{{- include "zot.labels" . | nindent 4 }}
annotations:
Expand Down
1 change: 1 addition & 0 deletions charts/zot/unittests/__snapshot__/ingress_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ should match snapshot of default values:
app: zot
release: RELEASE-NAME
name: RELEASE-NAME-zot
namespace: NAMESPACE
spec:
ingressClassName: nginx-test
rules:
Expand Down
2 changes: 2 additions & 0 deletions charts/zot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ image:
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "v2.1.2-rc3"
# Defaults to the release namespace if not specified
namespace: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down

0 comments on commit 670a745

Please sign in to comment.