diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index d8a7f0587..f6249b399 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -579,10 +579,3 @@ app: "{{ template "harbor.name" . }}" {{- define "harbor.ingress.kubeVersion" -}} {{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}} {{- end -}} - -{{/* -Allow the release namespace to be overridden for multi-namespace resources in combined charts. -*/}} -{{- define "harbor.namespace" -}} -{{- default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/templates/core/core-cm.yaml b/templates/core/core-cm.yaml index b3d09f750..f27bdaaaf 100644 --- a/templates/core/core-cm.yaml +++ b/templates/core/core-cm.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ template "harbor.core" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} data: diff --git a/templates/core/core-dpl.yaml b/templates/core/core-dpl.yaml index f2ad39ce3..4705c5f6e 100644 --- a/templates/core/core-dpl.yaml +++ b/templates/core/core-dpl.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "harbor.core" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} component: core diff --git a/templates/core/core-pre-upgrade-job.yaml b/templates/core/core-pre-upgrade-job.yaml index cda15f2e1..872715694 100644 --- a/templates/core/core-pre-upgrade-job.yaml +++ b/templates/core/core-pre-upgrade-job.yaml @@ -3,7 +3,7 @@ apiVersion: batch/v1 kind: Job metadata: name: migration-job - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} component: migrator diff --git a/templates/core/core-secret.yaml b/templates/core/core-secret.yaml index 4546021de..ea9d4cfab 100644 --- a/templates/core/core-secret.yaml +++ b/templates/core/core-secret.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ template "harbor.core" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: Opaque diff --git a/templates/core/core-svc.yaml b/templates/core/core-svc.yaml index 0399ee1b4..f918eb388 100644 --- a/templates/core/core-svc.yaml +++ b/templates/core/core-svc.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "harbor.core" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} {{- with .Values.core.serviceAnnotations }} diff --git a/templates/core/core-tls.yaml b/templates/core/core-tls.yaml index b11ed3803..d90d30c8f 100644 --- a/templates/core/core-tls.yaml +++ b/templates/core/core-tls.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.internalTLS.core.secretName" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: kubernetes.io/tls diff --git a/templates/database/database-secret.yaml b/templates/database/database-secret.yaml index d9eba5da7..0d07ec26f 100644 --- a/templates/database/database-secret.yaml +++ b/templates/database/database-secret.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.database" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: Opaque diff --git a/templates/database/database-ss.yaml b/templates/database/database-ss.yaml index 9916f5664..9bd5c096c 100644 --- a/templates/database/database-ss.yaml +++ b/templates/database/database-ss.yaml @@ -4,7 +4,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: "{{ template "harbor.database" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} component: database diff --git a/templates/database/database-svc.yaml b/templates/database/database-svc.yaml index 9fea0ab85..e2085a058 100644 --- a/templates/database/database-svc.yaml +++ b/templates/database/database-svc.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Service metadata: name: "{{ template "harbor.database" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} spec: diff --git a/templates/exporter/exporter-cm-env.yaml b/templates/exporter/exporter-cm-env.yaml index 23ebdd6ae..3f911032b 100644 --- a/templates/exporter/exporter-cm-env.yaml +++ b/templates/exporter/exporter-cm-env.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: "{{ template "harbor.exporter" . }}-env" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} data: diff --git a/templates/exporter/exporter-dpl.yaml b/templates/exporter/exporter-dpl.yaml index 736ebc9a3..32fac20ac 100644 --- a/templates/exporter/exporter-dpl.yaml +++ b/templates/exporter/exporter-dpl.yaml @@ -3,7 +3,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "harbor.exporter" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} component: exporter diff --git a/templates/exporter/exporter-secret.yaml b/templates/exporter/exporter-secret.yaml index 035cada38..02c74d03c 100644 --- a/templates/exporter/exporter-secret.yaml +++ b/templates/exporter/exporter-secret.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ template "harbor.exporter" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: Opaque diff --git a/templates/exporter/exporter-svc.yaml b/templates/exporter/exporter-svc.yaml index ffbcda13a..6d0d83193 100644 --- a/templates/exporter/exporter-svc.yaml +++ b/templates/exporter/exporter-svc.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Service metadata: name: "{{ template "harbor.exporter" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} spec: diff --git a/templates/ingress/ingress.yaml b/templates/ingress/ingress.yaml index cd33f3c83..06096b86f 100644 --- a/templates/ingress/ingress.yaml +++ b/templates/ingress/ingress.yaml @@ -35,7 +35,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: "{{ template "harbor.ingress" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} {{- if $ingress.labels }} diff --git a/templates/ingress/secret.yaml b/templates/ingress/secret.yaml index fa473e1d8..90ba27511 100644 --- a/templates/ingress/secret.yaml +++ b/templates/ingress/secret.yaml @@ -5,7 +5,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.ingress" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: kubernetes.io/tls diff --git a/templates/internal/auto-tls.yaml b/templates/internal/auto-tls.yaml index b45fb8a0a..32807cfd1 100644 --- a/templates/internal/auto-tls.yaml +++ b/templates/internal/auto-tls.yaml @@ -14,7 +14,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.internalTLS.core.secretName" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: kubernetes.io/tls @@ -28,7 +28,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: kubernetes.io/tls @@ -42,7 +42,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: kubernetes.io/tls @@ -56,7 +56,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: kubernetes.io/tls @@ -73,7 +73,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: kubernetes.io/tls diff --git a/templates/jobservice/jobservice-cm-env.yaml b/templates/jobservice/jobservice-cm-env.yaml index bc6669f4d..2b9307455 100644 --- a/templates/jobservice/jobservice-cm-env.yaml +++ b/templates/jobservice/jobservice-cm-env.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: "{{ template "harbor.jobservice" . }}-env" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} data: diff --git a/templates/jobservice/jobservice-cm.yaml b/templates/jobservice/jobservice-cm.yaml index 30d2847d7..c950e6787 100644 --- a/templates/jobservice/jobservice-cm.yaml +++ b/templates/jobservice/jobservice-cm.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: "{{ template "harbor.jobservice" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} data: diff --git a/templates/jobservice/jobservice-dpl.yaml b/templates/jobservice/jobservice-dpl.yaml index 7a42277f2..3e426694b 100644 --- a/templates/jobservice/jobservice-dpl.yaml +++ b/templates/jobservice/jobservice-dpl.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: "{{ template "harbor.jobservice" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} component: jobservice diff --git a/templates/jobservice/jobservice-pvc.yaml b/templates/jobservice/jobservice-pvc.yaml index 8f102ee7b..eb781eed1 100644 --- a/templates/jobservice/jobservice-pvc.yaml +++ b/templates/jobservice/jobservice-pvc.yaml @@ -4,7 +4,7 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: name: {{ template "harbor.jobservice" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} annotations: {{- range $key, $value := $jobLog.annotations }} {{ $key }}: {{ $value | quote }} diff --git a/templates/jobservice/jobservice-secrets.yaml b/templates/jobservice/jobservice-secrets.yaml index eacf7eb91..7706c3513 100644 --- a/templates/jobservice/jobservice-secrets.yaml +++ b/templates/jobservice/jobservice-secrets.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.jobservice" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: Opaque diff --git a/templates/jobservice/jobservice-svc.yaml b/templates/jobservice/jobservice-svc.yaml index fab5b4908..483b40ed5 100644 --- a/templates/jobservice/jobservice-svc.yaml +++ b/templates/jobservice/jobservice-svc.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: "{{ template "harbor.jobservice" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} spec: diff --git a/templates/jobservice/jobservice-tls.yaml b/templates/jobservice/jobservice-tls.yaml index b2c61d212..58809ec46 100644 --- a/templates/jobservice/jobservice-tls.yaml +++ b/templates/jobservice/jobservice-tls.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: kubernetes.io/tls diff --git a/templates/metrics/metrics-svcmon.yaml b/templates/metrics/metrics-svcmon.yaml index f3a6f7c99..d566285ed 100644 --- a/templates/metrics/metrics-svcmon.yaml +++ b/templates/metrics/metrics-svcmon.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "harbor.fullname" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | nindent 4 }} {{- if .Values.metrics.serviceMonitor.additionalLabels }} {{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }} diff --git a/templates/nginx/configmap-http.yaml b/templates/nginx/configmap-http.yaml index 61aae5ea1..93ef76e8b 100644 --- a/templates/nginx/configmap-http.yaml +++ b/templates/nginx/configmap-http.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ template "harbor.nginx" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} data: diff --git a/templates/nginx/configmap-https.yaml b/templates/nginx/configmap-https.yaml index ca163cbb6..390caf216 100644 --- a/templates/nginx/configmap-https.yaml +++ b/templates/nginx/configmap-https.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ template "harbor.nginx" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} data: diff --git a/templates/nginx/deployment.yaml b/templates/nginx/deployment.yaml index 90f38df81..04faa3735 100644 --- a/templates/nginx/deployment.yaml +++ b/templates/nginx/deployment.yaml @@ -3,7 +3,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "harbor.nginx" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} component: nginx diff --git a/templates/nginx/secret.yaml b/templates/nginx/secret.yaml index e5dd2ed3a..369bd65d6 100644 --- a/templates/nginx/secret.yaml +++ b/templates/nginx/secret.yaml @@ -5,7 +5,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ template "harbor.nginx" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: Opaque diff --git a/templates/nginx/service.yaml b/templates/nginx/service.yaml index ae9205f21..7eac84ee1 100644 --- a/templates/nginx/service.yaml +++ b/templates/nginx/service.yaml @@ -5,7 +5,7 @@ metadata: {{- if eq .Values.expose.type "clusterIP" }} {{- $clusterIP := .Values.expose.clusterIP }} name: {{ $clusterIP.name }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} {{- if .Values.expose.clusterIP.labels }} diff --git a/templates/portal/configmap.yaml b/templates/portal/configmap.yaml index 963aa735c..af56783a8 100644 --- a/templates/portal/configmap.yaml +++ b/templates/portal/configmap.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: "{{ template "harbor.portal" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} data: diff --git a/templates/portal/deployment.yaml b/templates/portal/deployment.yaml index ddfbc8530..88bcd4979 100644 --- a/templates/portal/deployment.yaml +++ b/templates/portal/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: "{{ template "harbor.portal" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} component: portal diff --git a/templates/portal/service.yaml b/templates/portal/service.yaml index a9c094bb4..c1273f072 100644 --- a/templates/portal/service.yaml +++ b/templates/portal/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: "{{ template "harbor.portal" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} {{- with .Values.portal.serviceAnnotations }} diff --git a/templates/portal/tls.yaml b/templates/portal/tls.yaml index 5b7d3e020..e61a7d3a4 100644 --- a/templates/portal/tls.yaml +++ b/templates/portal/tls.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: kubernetes.io/tls diff --git a/templates/redis/service.yaml b/templates/redis/service.yaml index 81794e53c..61c21d13e 100644 --- a/templates/redis/service.yaml +++ b/templates/redis/service.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "harbor.redis" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} spec: diff --git a/templates/redis/statefulset.yaml b/templates/redis/statefulset.yaml index 9149f0af1..fa5dd22d2 100644 --- a/templates/redis/statefulset.yaml +++ b/templates/redis/statefulset.yaml @@ -4,7 +4,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ template "harbor.redis" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} component: redis diff --git a/templates/registry/registry-cm.yaml b/templates/registry/registry-cm.yaml index 0bbfa4451..26e3fc915 100644 --- a/templates/registry/registry-cm.yaml +++ b/templates/registry/registry-cm.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: "{{ template "harbor.registry" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} data: diff --git a/templates/registry/registry-dpl.yaml b/templates/registry/registry-dpl.yaml index 203cddf2c..a86e2eee0 100644 --- a/templates/registry/registry-dpl.yaml +++ b/templates/registry/registry-dpl.yaml @@ -4,7 +4,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: "{{ template "harbor.registry" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} component: registry diff --git a/templates/registry/registry-pvc.yaml b/templates/registry/registry-pvc.yaml index f66015786..712c21175 100644 --- a/templates/registry/registry-pvc.yaml +++ b/templates/registry/registry-pvc.yaml @@ -5,7 +5,7 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: name: {{ template "harbor.registry" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} annotations: {{- range $key, $value := $registry.annotations }} {{ $key }}: {{ $value | quote }} diff --git a/templates/registry/registry-secret.yaml b/templates/registry/registry-secret.yaml index 82e468354..11ada3b70 100644 --- a/templates/registry/registry-secret.yaml +++ b/templates/registry/registry-secret.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.registry" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: Opaque @@ -44,7 +44,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.registry" . }}-htpasswd" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: Opaque diff --git a/templates/registry/registry-svc.yaml b/templates/registry/registry-svc.yaml index 8b198d90e..d89ae7dca 100644 --- a/templates/registry/registry-svc.yaml +++ b/templates/registry/registry-svc.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: "{{ template "harbor.registry" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} spec: diff --git a/templates/registry/registry-tls.yaml b/templates/registry/registry-tls.yaml index 28c140563..ec4540c2e 100644 --- a/templates/registry/registry-tls.yaml +++ b/templates/registry/registry-tls.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: kubernetes.io/tls diff --git a/templates/registry/registryctl-cm.yaml b/templates/registry/registryctl-cm.yaml index 1928fe994..61b2c5e13 100644 --- a/templates/registry/registryctl-cm.yaml +++ b/templates/registry/registryctl-cm.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: "{{ template "harbor.registryCtl" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} data: diff --git a/templates/registry/registryctl-secret.yaml b/templates/registry/registryctl-secret.yaml index 8bffe843b..324a2e03b 100644 --- a/templates/registry/registryctl-secret.yaml +++ b/templates/registry/registryctl-secret.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.registryCtl" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: Opaque diff --git a/templates/trivy/trivy-secret.yaml b/templates/trivy/trivy-secret.yaml index 9fa11bf03..b13f88000 100644 --- a/templates/trivy/trivy-secret.yaml +++ b/templates/trivy/trivy-secret.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ template "harbor.trivy" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: Opaque diff --git a/templates/trivy/trivy-sts.yaml b/templates/trivy/trivy-sts.yaml index 532ff8192..7e34ee9c7 100644 --- a/templates/trivy/trivy-sts.yaml +++ b/templates/trivy/trivy-sts.yaml @@ -4,7 +4,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ template "harbor.trivy" . }} - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} component: trivy diff --git a/templates/trivy/trivy-svc.yaml b/templates/trivy/trivy-svc.yaml index 07ba0d02a..e0ae32070 100644 --- a/templates/trivy/trivy-svc.yaml +++ b/templates/trivy/trivy-svc.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Service metadata: name: "{{ template "harbor.trivy" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} spec: diff --git a/templates/trivy/trivy-tls.yaml b/templates/trivy/trivy-tls.yaml index 5f9a16ee8..58bce4ec5 100644 --- a/templates/trivy/trivy-tls.yaml +++ b/templates/trivy/trivy-tls.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: Secret metadata: name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - namespace: {{ include "harbor.namespace" . | quote }} + namespace: {{ .Release.Namespace | quote }} labels: {{ include "harbor.labels" . | indent 4 }} type: kubernetes.io/tls diff --git a/values.yaml b/values.yaml index 8679a56d2..c862337d0 100644 --- a/values.yaml +++ b/values.yaml @@ -111,12 +111,6 @@ expose: # If Harbor is deployed behind the proxy, set it as the URL of proxy externalURL: https://core.harbor.domain -# Overrides namespace for helm templates explicitly -# Optional, if you don't specified, will use "default" when running "helm templates" -# Also No need to specifiy this while you install directly and changing the namespace like "helm install ... -n " -# helm known issue: https://github.com/helm/helm/issues/3553 -namespaceOverride: "mynamespaces" - # The persistence is enabled by default and a default StorageClass # is needed in the k8s cluster to provision volumes dynamically. # Specify another StorageClass in the "storageClass" or set "existingClaim"