Skip to content

Commit 75fc895

Browse files
svcAPLBotAni1357j-zimnowoda
authored
chore(chart-deps): update harbor to version 1.16.1 (#1892)
Co-authored-by: Ani Argjiri <[email protected]> Co-authored-by: jeho <[email protected]>
1 parent bfeb0a0 commit 75fc895

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1397
-1800
lines changed

chart/chart-index/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dependencies:
2020
version: 5.0.0
2121
repository: https://dl.gitea.io/charts
2222
- name: harbor
23-
version: 1.10.4
23+
version: 1.16.1
2424
repository: https://helm.goharbor.io
2525
- name: ingress-nginx
2626
version: 4.6.1
@@ -51,4 +51,4 @@ dependencies:
5151
repository: https://vmware-tanzu.github.io/helm-charts/
5252
- name: trivy-operator
5353
version: 0.25.0
54-
repository: https://github.com/aquasecurity/trivy-operator/
54+
repository: https://github.com/aquasecurity/trivy-operator/

charts/harbor/Chart.yaml

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
apiVersion: v1
2-
appVersion: 2.6.4
3-
description: An open source trusted cloud native registry that stores, signs, and scans content
2+
appVersion: 2.12.1
3+
description: An open source trusted cloud native registry that stores, signs, and
4+
scans content
45
home: https://goharbor.io
5-
icon: https://raw.githubusercontent.com/goharbor/website/master/static/img/logos/harbor-icon-color.png
6+
icon: https://raw.githubusercontent.com/goharbor/website/main/static/img/logos/harbor-icon-color.png
67
keywords:
78
- docker
89
- registry
910
- harbor
1011
maintainers:
11-
- email: yinw@vmware.com
12-
name: Wenkai Yin
13-
- email: hweiwei@vmware.com
14-
name: Weiwei He
15-
- email: yshengwen@vmware.com
16-
name: Shengwen Yu
12+
- email: yan-yw.wang@broadcom.com
13+
name: Yan Wang
14+
- email: stone.zhang@broadcom.com
15+
name: Stone Zhang
16+
- email: miner.yang@broadcom.com
17+
name: Miner Yang
1718
name: harbor
1819
sources:
1920
- https://github.com/goharbor/harbor
2021
- https://github.com/goharbor/harbor-helm
21-
version: 1.10.4
22+
version: 1.16.1

charts/harbor/README.md

+342-353
Large diffs are not rendered by default.

charts/harbor/conf/notary-server.json

-28
This file was deleted.

charts/harbor/conf/notary-signer.json

-15
This file was deleted.

charts/harbor/templates/_helpers.tpl

+65-90
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,27 @@ If release name contains chart name it will be used as a full name.
2525
{{- end }}
2626
{{- end }}
2727

28+
{{/* Helm required labels: legacy */}}
29+
{{- define "harbor.legacy.labels" -}}
30+
heritage: {{ .Release.Service }}
31+
release: {{ .Release.Name }}
32+
chart: {{ .Chart.Name }}
33+
app: "{{ template "harbor.name" . }}"
34+
{{- end -}}
35+
2836
{{/* Helm required labels */}}
2937
{{- define "harbor.labels" -}}
3038
heritage: {{ .Release.Service }}
3139
release: {{ .Release.Name }}
3240
chart: {{ .Chart.Name }}
3341
app: "{{ template "harbor.name" . }}"
42+
app.kubernetes.io/instance: {{ .Release.Name }}
43+
app.kubernetes.io/name: {{ include "harbor.name" . }}
44+
app.kubernetes.io/managed-by: {{ .Release.Service }}
45+
app.kubernetes.io/part-of: {{ include "harbor.name" . }}
46+
{{- if .Chart.AppVersion }}
47+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
48+
{{- end }}
3449
{{- end -}}
3550

3651
{{/* matchLabels */}}
@@ -39,6 +54,13 @@ release: {{ .Release.Name }}
3954
app: "{{ template "harbor.name" . }}"
4055
{{- end -}}
4156

57+
{{/* Helper for printing values from existing secrets*/}}
58+
{{- define "harbor.secretKeyHelper" -}}
59+
{{- if and (not (empty .data)) (hasKey .data .key) }}
60+
{{- index .data .key | b64dec -}}
61+
{{- end -}}
62+
{{- end -}}
63+
4264
{{- define "harbor.autoGenCert" -}}
4365
{{- if and .Values.expose.tls.enabled (eq .Values.expose.tls.certSource "auto") -}}
4466
{{- printf "true" -}}
@@ -89,7 +111,12 @@ app: "{{ template "harbor.name" . }}"
89111

90112
{{- define "harbor.database.rawPassword" -}}
91113
{{- if eq .Values.database.type "internal" -}}
92-
{{- .Values.database.internal.password -}}
114+
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.database" .) -}}
115+
{{- if and (not (empty $existingSecret)) (hasKey $existingSecret.data "POSTGRES_PASSWORD") -}}
116+
{{- .Values.database.internal.password | default (index $existingSecret.data "POSTGRES_PASSWORD" | b64dec) -}}
117+
{{- else -}}
118+
{{- .Values.database.internal.password -}}
119+
{{- end -}}
93120
{{- else -}}
94121
{{- .Values.database.external.password -}}
95122
{{- end -}}
@@ -111,22 +138,6 @@ app: "{{ template "harbor.name" . }}"
111138
{{- end -}}
112139
{{- end -}}
113140

114-
{{- define "harbor.database.notaryServerDatabase" -}}
115-
{{- if eq .Values.database.type "internal" -}}
116-
{{- printf "%s" "notaryserver" -}}
117-
{{- else -}}
118-
{{- .Values.database.external.notaryServerDatabase -}}
119-
{{- end -}}
120-
{{- end -}}
121-
122-
{{- define "harbor.database.notarySignerDatabase" -}}
123-
{{- if eq .Values.database.type "internal" -}}
124-
{{- printf "%s" "notarysigner" -}}
125-
{{- else -}}
126-
{{- .Values.database.external.notarySignerDatabase -}}
127-
{{- end -}}
128-
{{- end -}}
129-
130141
{{- define "harbor.database.sslmode" -}}
131142
{{- if eq .Values.database.type "internal" -}}
132143
{{- printf "%s" "disable" -}}
@@ -135,14 +146,6 @@ app: "{{ template "harbor.name" . }}"
135146
{{- end -}}
136147
{{- end -}}
137148

138-
{{- define "harbor.database.notaryServer" -}}
139-
postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.database.escapedRawPassword" . }}@{{ template "harbor.database.host" . }}:{{ template "harbor.database.port" . }}/{{ template "harbor.database.notaryServerDatabase" . }}?sslmode={{ template "harbor.database.sslmode" . }}
140-
{{- end -}}
141-
142-
{{- define "harbor.database.notarySigner" -}}
143-
postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.database.escapedRawPassword" . }}@{{ template "harbor.database.host" . }}:{{ template "harbor.database.port" . }}/{{ template "harbor.database.notarySignerDatabase" . }}?sslmode={{ template "harbor.database.sslmode" . }}
144-
{{- end -}}
145-
146149
{{- define "harbor.redis.scheme" -}}
147150
{{- with .Values.redis }}
148151
{{- ternary "redis+sentinel" "redis" (and (eq .type "external" ) (not (not .external.sentinelMasterSet))) }}
@@ -168,12 +171,26 @@ postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.datab
168171
{{- end }}
169172
{{- end -}}
170173

174+
175+
{{- define "harbor.redis.pwdfromsecret" -}}
176+
{{- (lookup "v1" "Secret" .Release.Namespace (.Values.redis.external.existingSecret)).data.REDIS_PASSWORD | b64dec }}
177+
{{- end -}}
178+
179+
{{- define "harbor.redis.cred" -}}
180+
{{- with .Values.redis }}
181+
{{- if (and (eq .type "external" ) (.external.existingSecret)) }}
182+
{{- printf ":%s@" (include "harbor.redis.pwdfromsecret" $) }}
183+
{{- else }}
184+
{{- ternary (printf "%s:%s@" (.external.username | urlquery) (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }}
185+
{{- end }}
186+
{{- end }}
187+
{{- end -}}
188+
171189
/*scheme://[:password@]host:port[/master_set]*/
172190
{{- define "harbor.redis.url" -}}
173191
{{- with .Values.redis }}
174192
{{- $path := ternary "" (printf "/%s" (include "harbor.redis.masterSet" $)) (not (include "harbor.redis.masterSet" $)) }}
175-
{{- $cred := ternary (printf ":%s@" (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }}
176-
{{- printf "%s://%s%s%s" (include "harbor.redis.scheme" $) $cred (include "harbor.redis.addr" $) $path -}}
193+
{{- printf "%s://%s%s%s" (include "harbor.redis.scheme" $) (include "harbor.redis.cred" $) (include "harbor.redis.addr" $) $path -}}
177194
{{- end }}
178195
{{- end -}}
179196

@@ -188,36 +205,46 @@ postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.datab
188205
/*scheme://[:password@]addr/db_index*/
189206
{{- define "harbor.redis.urlForJobservice" -}}
190207
{{- with .Values.redis }}
191-
{{- $index := ternary "1" .external.jobserviceDatabaseIndex (eq .type "internal") }}
208+
{{- $index := ternary .internal.jobserviceDatabaseIndex .external.jobserviceDatabaseIndex (eq .type "internal") }}
192209
{{- printf "%s/%s" (include "harbor.redis.url" $) $index -}}
193210
{{- end }}
194211
{{- end -}}
195212

196213
/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/
197214
{{- define "harbor.redis.urlForRegistry" -}}
198215
{{- with .Values.redis }}
199-
{{- $index := ternary "2" .external.registryDatabaseIndex (eq .type "internal") }}
216+
{{- $index := ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }}
200217
{{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}}
201218
{{- end }}
202219
{{- end -}}
203220

204221
/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/
205222
{{- define "harbor.redis.urlForTrivy" -}}
206223
{{- with .Values.redis }}
207-
{{- $index := ternary "5" .external.trivyAdapterIndex (eq .type "internal") }}
224+
{{- $index := ternary .internal.trivyAdapterIndex .external.trivyAdapterIndex (eq .type "internal") }}
208225
{{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}}
209226
{{- end }}
210227
{{- end -}}
211228

212-
{{- define "harbor.redis.dbForRegistry" -}}
229+
/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/
230+
{{- define "harbor.redis.urlForHarbor" -}}
213231
{{- with .Values.redis }}
214-
{{- ternary "2" .external.registryDatabaseIndex (eq .type "internal") }}
232+
{{- $index := ternary .internal.harborDatabaseIndex .external.harborDatabaseIndex (eq .type "internal") }}
233+
{{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}}
215234
{{- end }}
216235
{{- end -}}
217236

218-
{{- define "harbor.redis.dbForChartmuseum" -}}
237+
/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/
238+
{{- define "harbor.redis.urlForCache" -}}
219239
{{- with .Values.redis }}
220-
{{- ternary "3" .external.chartmuseumDatabaseIndex (eq .type "internal") }}
240+
{{- $index := ternary .internal.cacheLayerDatabaseIndex .external.cacheLayerDatabaseIndex (eq .type "internal") }}
241+
{{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}}
242+
{{- end }}
243+
{{- end -}}
244+
245+
{{- define "harbor.redis.dbForRegistry" -}}
246+
{{- with .Values.redis }}
247+
{{- ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }}
221248
{{- end }}
222249
{{- end -}}
223250

@@ -245,10 +272,6 @@ postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.datab
245272
{{- printf "%s-registryctl" (include "harbor.fullname" .) -}}
246273
{{- end -}}
247274

248-
{{- define "harbor.chartmuseum" -}}
249-
{{- printf "%s-chartmuseum" (include "harbor.fullname" .) -}}
250-
{{- end -}}
251-
252275
{{- define "harbor.database" -}}
253276
{{- printf "%s-database" (include "harbor.fullname" .) -}}
254277
{{- end -}}
@@ -257,14 +280,6 @@ postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.datab
257280
{{- printf "%s-trivy" (include "harbor.fullname" .) -}}
258281
{{- end -}}
259282

260-
{{- define "harbor.notary-server" -}}
261-
{{- printf "%s-notary-server" (include "harbor.fullname" .) -}}
262-
{{- end -}}
263-
264-
{{- define "harbor.notary-signer" -}}
265-
{{- printf "%s-notary-signer" (include "harbor.fullname" .) -}}
266-
{{- end -}}
267-
268283
{{- define "harbor.nginx" -}}
269284
{{- printf "%s-nginx" (include "harbor.fullname" .) -}}
270285
{{- end -}}
@@ -277,12 +292,8 @@ postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.datab
277292
{{- printf "%s-ingress" (include "harbor.fullname" .) -}}
278293
{{- end -}}
279294

280-
{{- define "harbor.ingress-notary" -}}
281-
{{- printf "%s-ingress-notary" (include "harbor.fullname" .) -}}
282-
{{- end -}}
283-
284295
{{- define "harbor.noProxy" -}}
285-
{{- printf "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s" (include "harbor.core" .) (include "harbor.jobservice" .) (include "harbor.database" .) (include "harbor.chartmuseum" .) (include "harbor.notary-server" .) (include "harbor.notary-signer" .) (include "harbor.registry" .) (include "harbor.portal" .) (include "harbor.trivy" .) (include "harbor.exporter" .) .Values.proxy.noProxy -}}
296+
{{- printf "%s,%s,%s,%s,%s,%s,%s,%s" (include "harbor.core" .) (include "harbor.jobservice" .) (include "harbor.database" .) (include "harbor.registry" .) (include "harbor.portal" .) (include "harbor.trivy" .) (include "harbor.exporter" .) .Values.proxy.noProxy -}}
286297
{{- end -}}
287298

288299
{{- define "harbor.caBundleVolume" -}}
@@ -297,7 +308,7 @@ postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.datab
297308
subPath: ca.crt
298309
{{- end -}}
299310

300-
{{/* scheme for all components except notary because it only support http mode */}}
311+
{{/* scheme for all components because it only support http mode */}}
301312
{{- define "harbor.component.scheme" -}}
302313
{{- if .Values.internalTLS.enabled -}}
303314
{{- printf "https" -}}
@@ -306,24 +317,6 @@ postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.datab
306317
{{- end -}}
307318
{{- end -}}
308319

309-
{{/* chartmuseum component container port */}}
310-
{{- define "harbor.chartmuseum.containerPort" -}}
311-
{{- if .Values.internalTLS.enabled -}}
312-
{{- printf "9443" -}}
313-
{{- else -}}
314-
{{- printf "9999" -}}
315-
{{- end -}}
316-
{{- end -}}
317-
318-
{{/* chartmuseum component service port */}}
319-
{{- define "harbor.chartmuseum.servicePort" -}}
320-
{{- if .Values.internalTLS.enabled -}}
321-
{{- printf "443" -}}
322-
{{- else -}}
323-
{{- printf "80" -}}
324-
{{- end -}}
325-
{{- end -}}
326-
327320
{{/* core component container port */}}
328321
{{- define "harbor.core.containerPort" -}}
329322
{{- if .Values.internalTLS.enabled -}}
@@ -468,14 +461,6 @@ postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.datab
468461
{{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.trivy" .) (include "harbor.trivy.servicePort" .) -}}
469462
{{- end -}}
470463

471-
{{- define "harbor.internalTLS.chartmuseum.secretName" -}}
472-
{{- if eq .Values.internalTLS.certSource "secret" -}}
473-
{{- .Values.internalTLS.chartmuseum.secretName -}}
474-
{{- else -}}
475-
{{- printf "%s-chartmuseum-internal-tls" (include "harbor.fullname" .) -}}
476-
{{- end -}}
477-
{{- end -}}
478-
479464
{{- define "harbor.internalTLS.core.secretName" -}}
480465
{{- if eq .Values.internalTLS.certSource "secret" -}}
481466
{{- .Values.internalTLS.core.secretName -}}
@@ -526,16 +511,6 @@ postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.datab
526511
{{- end -}}
527512
{{- end -}}
528513

529-
{{- define "harbor.tlsNotarySecretForIngress" -}}
530-
{{- if eq .Values.expose.tls.certSource "none" -}}
531-
{{- printf "" -}}
532-
{{- else if eq .Values.expose.tls.certSource "secret" -}}
533-
{{- .Values.expose.tls.secret.notarySecretName -}}
534-
{{- else -}}
535-
{{- include "harbor.ingress" . -}}
536-
{{- end -}}
537-
{{- end -}}
538-
539514
{{- define "harbor.tlsSecretForNginx" -}}
540515
{{- if eq .Values.expose.tls.certSource "secret" -}}
541516
{{- .Values.expose.tls.secret.secretName -}}
@@ -557,7 +532,7 @@ postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.datab
557532
TRACE_SAMPLE_RATE: "{{ .Values.trace.sample_rate }}"
558533
TRACE_NAMESPACE: "{{ .Values.trace.namespace }}"
559534
{{- if .Values.trace.attributes }}
560-
TRACE_ATTRIBUTES: "{{ .Values.trace.attributes | toJson }}"
535+
TRACE_ATTRIBUTES: {{ .Values.trace.attributes | toJson | squote }}
561536
{{- end }}
562537
{{- if eq .Values.trace.provider "jaeger" }}
563538
TRACE_JAEGER_ENDPOINT: "{{ .Values.trace.jaeger.endpoint }}"
@@ -603,4 +578,4 @@ postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.datab
603578
{{/* Allow KubeVersion to be overridden. */}}
604579
{{- define "harbor.ingress.kubeVersion" -}}
605580
{{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}}
606-
{{- end -}}
581+
{{- end -}}

0 commit comments

Comments
 (0)