Skip to content

Commit

Permalink
[bitnami/harbor] Fix REGISTRY_HTTP_SECRET encoding when declared on a…
Browse files Browse the repository at this point in the history
…n existing secret (#29494)

* fixed REGISTRY_HTTP_SECRET not beings base64 encoded when taken from existingSecret

Signed-off-by: Davide Giacomini <davide.giacomini2@studio.unibo.it>

* bumped harbor chart version

Signed-off-by: Davide Giacomini <davide.giacomini2@studio.unibo.it>

* removed old code

Signed-off-by: Davide Giacomini <davide.giacomini2@studio.unibo.it>

* removing leading newline

Signed-off-by: Davide Giacomini <davide.giacomini2@studio.unibo.it>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Fix linter error

Signed-off-by: Juan José Martos <jotamartos@gmail.com>

---------

Signed-off-by: Davide Giacomini <davide.giacomini2@studio.unibo.it>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Juan José Martos <jotamartos@gmail.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Juan José Martos <jotamartos@gmail.com>
  • Loading branch information
3 people authored Sep 19, 2024
1 parent fb64b3a commit 1691323
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
11 changes: 9 additions & 2 deletions bitnami/harbor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## 23.0.3 (2024-09-11)
## 23.0.4 (2024-09-19)

* [bitnami/harbor] Release 23.0.3 ([#29349](https://github.com/bitnami/charts/pull/29349))
* [bitnami/harbor] Fix REGISTRY_HTTP_SECRET encoding when declared on an existing secret ([#29494](https://github.com/bitnami/charts/pull/29494))

## <small>23.0.3 (2024-09-11)</small>

* [bitnami/harbor] Release 23.0.3 (#29349) ([1f523e4](https://github.com/bitnami/charts/commit/1f523e4fcd930b31748457de8ee95289e72064da)), closes [#29349](https://github.com/bitnami/charts/issues/29349)

## <small>23.0.2 (2024-09-03)</small>

Expand All @@ -11,6 +15,9 @@
## <small>23.0.1 (2024-08-24)</small>

* [bitnami/harbor] Release 23.0.1 (#29012) ([e8508d7](https://github.com/bitnami/charts/commit/e8508d7e47f9d7f88ae3081067451df61320792c)), closes [#29012](https://github.com/bitnami/charts/issues/29012)

## 23.0.0 (2024-08-13)

* [bitnami/harbor] Update dependencies (#28853) ([52607e4](https://github.com/bitnami/charts/commit/52607e4c3580532b172089da96302513014af1f4)), closes [#28853](https://github.com/bitnami/charts/issues/28853)

## <small>22.0.12 (2024-08-08)</small>
Expand Down
2 changes: 1 addition & 1 deletion bitnami/harbor/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ maintainers:
name: harbor
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/harbor
version: 23.0.3
version: 23.0.4
7 changes: 6 additions & 1 deletion bitnami/harbor/templates/registry/registry-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ metadata:
type: Opaque
data:
REGISTRY_HTPASSWD: {{ $existingEnvVarsSecretRegistry.REGISTRY_HTPASSWD | default .Values.registry.credentials.htpasswd | b64enc | quote }}
REGISTRY_HTTP_SECRET: {{ $existingEnvVarsSecretRegistry.REGISTRY_HTTP_SECRET | default (include "common.secrets.passwords.manage" (dict "secret" (include "harbor.registry" .) "key" "REGISTRY_HTTP_SECRET" "length" 16 "providedValues" (list "registry.secret") "context" $)) }}
{{- $registryHttpSecret := $existingEnvVarsSecretRegistry.REGISTRY_HTTP_SECRET }}
{{- if eq $registryHttpSecret "" }}
REGISTRY_HTTP_SECRET: {{ include "common.secrets.passwords.manage" ( dict "secret" (include "harbor.registry" .) "key" "REGISTRY_HTTP_SECRET" "length" 16 "providedValues" (list "registry.secret") "context" $ ) }}
{{- else }}
REGISTRY_HTTP_SECRET: {{ print $registryHttpSecret | b64enc | quote }}
{{- end }}
REGISTRY_REDIS_PASSWORD: {{ $existingEnvVarsSecretRegistry.REGISTRY_REDIS_PASSWORD | default (include "harbor.redis.rawPassword" .) | b64enc | quote }}
{{- if eq .Values.persistence.imageChartStorage.type "azure" }}
REGISTRY_STORAGE_AZURE_ACCOUNTKEY: {{ $existingEnvVarsSecretRegistry.REGISTRY_STORAGE_AZURE_ACCOUNTKEY | default .Values.persistence.imageChartStorage.azure.accountkey | b64enc | quote }}
Expand Down

0 comments on commit 1691323

Please sign in to comment.