Skip to content

Commit

Permalink
use create to handle registry secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
mms-gianni committed Oct 4, 2024
1 parent 8b3eee8 commit 11fff9e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.5-rc.8-debug
0.1.5-rc.9-debug
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ metadata:
categories: Integration & Delivery
certified: "false"
containerImage: ghcr.io/kubero-dev/kubero-operator/kuberoapp:v0.1.5-rc.8-debug
createdAt: "2024-10-04T11:44:08Z"
createdAt: "2024-10-04T12:17:00Z"
description: Kubero is a GitOps continuous delivery tool for Kubernetes.
operators.operatorframework.io/builder: operator-sdk-v1.34.1
operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1
Expand Down
3 changes: 2 additions & 1 deletion helm-charts/kuberopipeline/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@

{{- define "kubero.dockerconfigjson" -}}
{{- if eq .Values.registry.createSecret "create" }}
{{- $dockerconfigjson := .Values.registry.dockerconfigjson | b64enc }}
{{- $dockerAuth := (printf "%s:%s" .Values.registry.username .Values.registry.password) | b64enc -}}
{{- $dockerconfigjson := (printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"auth\":\"%s\"}}}" .Values.registry.host .Values.registry.username .Values.registry.password $dockerAuth) | b64enc -}}
{{- $dockerconfigjson }}
{{- end }}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- $name := .Values.name -}}
{{- $deploymentstrategy := .Values.deploymentstrategy -}}
{{- $createSecret := .Values.registry.createSecret | default "copy" -}}
{{- $createSecret := .Values.registry.createSecret | default "create" -}}
{{- $dockerconfigjson := include "kubero.dockerconfigjson" . -}}
{{- $registryUsername := include "kubero.registryUsername" . -}}
{{- $registryPassword := include "kubero.registryPassword" . -}}
Expand Down
9 changes: 5 additions & 4 deletions helm-charts/kuberopipeline/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ deploymentstrategy: git
buildstrategy: plain
mainnamespace: kubero
registry:
createSecret: copy
secretName: registry-login
# Possible values: copy, create, none (default: copy)
# copy: Copy the secret from the main namespace
# create: Create a new secret in the pipeline namespace
# none: Do not create a secret
createSecret: create
host: missingregistry.mydomain.com/example
username: admin
password: admin
auth: YWRtaW46YWRtaW4=
dockerconfigjson: eyJhdXRocy
git:
keys:
created_at: "2022-09-21T20:51:57Z"
Expand Down

0 comments on commit 11fff9e

Please sign in to comment.