From c22a09852e2195c8494fc522393a1780bfda22a2 Mon Sep 17 00:00:00 2001 From: Shengwen Yu Date: Mon, 22 Apr 2024 18:46:23 +0800 Subject: [PATCH 1/2] feat: update images and tags for FC testing Signed-off-by: Shengwen Yu --- Chart.yaml | 4 ++-- values.yaml | 40 ++++++++++++++++++++-------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index 59edf1fcd..3daffb820 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: harbor -version: 1.4.0-dev -appVersion: dev +version: 1.15.0 +appVersion: 2.11.0-fc description: An open source trusted cloud native registry that stores, signs, and scans content keywords: - docker diff --git a/values.yaml b/values.yaml index 505d755aa..05fb7b151 100644 --- a/values.yaml +++ b/values.yaml @@ -482,8 +482,8 @@ containerSecurityContext: # If service exposed via "ingress", the Nginx will not be used nginx: image: - repository: goharbor/nginx-photon - tag: dev + repository: zigzag18/nginx-photon + tag: v2.11.0-build.2621 # set the service account to be used, default if left empty serviceAccountName: "" # mount the service account token @@ -513,8 +513,8 @@ nginx: portal: image: - repository: goharbor/harbor-portal - tag: dev + repository: zigzag18/harbor-portal + tag: v2.11.0-build.2621 # set the service account to be used, default if left empty serviceAccountName: "" # mount the service account token @@ -546,8 +546,8 @@ portal: core: image: - repository: goharbor/harbor-core - tag: dev + repository: zigzag18/harbor-core + tag: v2.11.0-build.2621 # set the service account to be used, default if left empty serviceAccountName: "" # mount the service account token @@ -626,8 +626,8 @@ core: jobservice: image: - repository: goharbor/harbor-jobservice - tag: dev + repository: zigzag18/harbor-jobservice + tag: v2.11.0-build.2621 # set the service account to be used, default if left empty serviceAccountName: "" # mount the service account token @@ -682,8 +682,8 @@ jobservice: registry: registry: image: - repository: goharbor/registry-photon - tag: dev + repository: zigzag18/registry-photon + tag: v2.11.0-build.2621 # resources: # requests: # memory: 256Mi @@ -691,8 +691,8 @@ registry: extraEnvVars: [] controller: image: - repository: goharbor/harbor-registryctl - tag: dev + repository: zigzag18/harbor-registryctl + tag: v2.11.0-build.2621 # resources: # requests: # memory: 256Mi @@ -764,9 +764,9 @@ trivy: enabled: true image: # repository the repository for Trivy adapter image - repository: goharbor/trivy-adapter-photon + repository: zigzag18/trivy-adapter-photon # tag the tag for Trivy adapter image - tag: dev + tag: v2.11.0-build.2621 # set the service account to be used, default if left empty serviceAccountName: "" # mount the service account token @@ -851,8 +851,8 @@ database: type: internal internal: image: - repository: goharbor/harbor-db - tag: dev + repository: zigzag18/harbor-db + tag: v2.11.0-build.2621 # set the service account to be used, default if left empty serviceAccountName: "" # mount the service account token @@ -924,8 +924,8 @@ redis: type: internal internal: image: - repository: goharbor/redis-photon - tag: dev + repository: zigzag18/redis-photon + tag: v2.11.0-build.2621 # set the service account to be used, default if left empty serviceAccountName: "" # mount the service account token @@ -979,8 +979,8 @@ redis: exporter: image: - repository: goharbor/harbor-exporter - tag: dev + repository: zigzag18/harbor-exporter + tag: v2.11.0-build.2621 serviceAccountName: "" # mount the service account token automountServiceAccountToken: false From 509eda8bfa57003c5588183841da269ddff85901 Mon Sep 17 00:00:00 2001 From: Shengwen Yu Date: Wed, 24 Apr 2024 08:51:14 +0000 Subject: [PATCH 2/2] fix: add "harbor.legacy.labels" to resolve the upgrade issue 1747 Signed-off-by: Shengwen Yu --- Chart.yaml | 4 +-- templates/_helpers.tpl | 11 ++++++-- templates/database/database-ss.yaml | 2 +- templates/redis/statefulset.yaml | 2 +- templates/trivy/trivy-sts.yaml | 2 +- values.yaml | 40 ++++++++++++++--------------- 6 files changed, 34 insertions(+), 27 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index 3daffb820..59edf1fcd 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: harbor -version: 1.15.0 -appVersion: 2.11.0-fc +version: 1.4.0-dev +appVersion: dev description: An open source trusted cloud native registry that stores, signs, and scans content keywords: - docker diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index 0914d5684..f6249b399 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -25,13 +25,20 @@ If release name contains chart name it will be used as a full name. {{- end }} {{- end }} +{{/* Helm required labels: legacy */}} +{{- define "harbor.legacy.labels" -}} +heritage: {{ .Release.Service }} +release: {{ .Release.Name }} +chart: {{ .Chart.Name }} +app: "{{ template "harbor.name" . }}" +{{- end -}} + {{/* Helm required labels */}} {{- define "harbor.labels" -}} heritage: {{ .Release.Service }} release: {{ .Release.Name }} chart: {{ .Chart.Name }} app: "{{ template "harbor.name" . }}" -{{ include "harbor.matchLabels" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/name: {{ include "harbor.name" . }} app.kubernetes.io/managed-by: {{ .Release.Service }} @@ -571,4 +578,4 @@ app: "{{ template "harbor.name" . }}" {{/* Allow KubeVersion to be overridden. */}} {{- define "harbor.ingress.kubeVersion" -}} {{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/templates/database/database-ss.yaml b/templates/database/database-ss.yaml index dc6f962e1..8cf9cd928 100644 --- a/templates/database/database-ss.yaml +++ b/templates/database/database-ss.yaml @@ -138,7 +138,7 @@ spec: - metadata: name: "database-data" labels: -{{ include "harbor.labels" . | indent 8 }} +{{ include "harbor.legacy.labels" . | indent 8 }} annotations: {{- range $key, $value := $database.annotations }} {{ $key }}: {{ $value | quote }} diff --git a/templates/redis/statefulset.yaml b/templates/redis/statefulset.yaml index 9573f9ad6..ed8f705a7 100644 --- a/templates/redis/statefulset.yaml +++ b/templates/redis/statefulset.yaml @@ -100,7 +100,7 @@ spec: - metadata: name: data labels: -{{ include "harbor.labels" . | indent 8 }} +{{ include "harbor.legacy.labels" . | indent 8 }} annotations: {{- range $key, $value := $redis.annotations }} {{ $key }}: {{ $value | quote }} diff --git a/templates/trivy/trivy-sts.yaml b/templates/trivy/trivy-sts.yaml index ddaa4c908..b554b5db8 100644 --- a/templates/trivy/trivy-sts.yaml +++ b/templates/trivy/trivy-sts.yaml @@ -205,7 +205,7 @@ spec: - metadata: name: data labels: -{{ include "harbor.labels" . | indent 8 }} +{{ include "harbor.legacy.labels" . | indent 8 }} annotations: {{- range $key, $value := $trivy.annotations }} {{ $key }}: {{ $value | quote }} diff --git a/values.yaml b/values.yaml index 05fb7b151..505d755aa 100644 --- a/values.yaml +++ b/values.yaml @@ -482,8 +482,8 @@ containerSecurityContext: # If service exposed via "ingress", the Nginx will not be used nginx: image: - repository: zigzag18/nginx-photon - tag: v2.11.0-build.2621 + repository: goharbor/nginx-photon + tag: dev # set the service account to be used, default if left empty serviceAccountName: "" # mount the service account token @@ -513,8 +513,8 @@ nginx: portal: image: - repository: zigzag18/harbor-portal - tag: v2.11.0-build.2621 + repository: goharbor/harbor-portal + tag: dev # set the service account to be used, default if left empty serviceAccountName: "" # mount the service account token @@ -546,8 +546,8 @@ portal: core: image: - repository: zigzag18/harbor-core - tag: v2.11.0-build.2621 + repository: goharbor/harbor-core + tag: dev # set the service account to be used, default if left empty serviceAccountName: "" # mount the service account token @@ -626,8 +626,8 @@ core: jobservice: image: - repository: zigzag18/harbor-jobservice - tag: v2.11.0-build.2621 + repository: goharbor/harbor-jobservice + tag: dev # set the service account to be used, default if left empty serviceAccountName: "" # mount the service account token @@ -682,8 +682,8 @@ jobservice: registry: registry: image: - repository: zigzag18/registry-photon - tag: v2.11.0-build.2621 + repository: goharbor/registry-photon + tag: dev # resources: # requests: # memory: 256Mi @@ -691,8 +691,8 @@ registry: extraEnvVars: [] controller: image: - repository: zigzag18/harbor-registryctl - tag: v2.11.0-build.2621 + repository: goharbor/harbor-registryctl + tag: dev # resources: # requests: # memory: 256Mi @@ -764,9 +764,9 @@ trivy: enabled: true image: # repository the repository for Trivy adapter image - repository: zigzag18/trivy-adapter-photon + repository: goharbor/trivy-adapter-photon # tag the tag for Trivy adapter image - tag: v2.11.0-build.2621 + tag: dev # set the service account to be used, default if left empty serviceAccountName: "" # mount the service account token @@ -851,8 +851,8 @@ database: type: internal internal: image: - repository: zigzag18/harbor-db - tag: v2.11.0-build.2621 + repository: goharbor/harbor-db + tag: dev # set the service account to be used, default if left empty serviceAccountName: "" # mount the service account token @@ -924,8 +924,8 @@ redis: type: internal internal: image: - repository: zigzag18/redis-photon - tag: v2.11.0-build.2621 + repository: goharbor/redis-photon + tag: dev # set the service account to be used, default if left empty serviceAccountName: "" # mount the service account token @@ -979,8 +979,8 @@ redis: exporter: image: - repository: zigzag18/harbor-exporter - tag: v2.11.0-build.2621 + repository: goharbor/harbor-exporter + tag: dev serviceAccountName: "" # mount the service account token automountServiceAccountToken: false