Skip to content

Commit

Permalink
control-service: builder base image in helm (#1359)
Browse files Browse the repository at this point in the history
Why
Within this PR we add support in a builder image for using extra info from k8s through secrets in the namespace.
In this PR we create the actual secret in the namespace if the info required to create it is present.

How was this tested.
Basic linting and looking at a printed out chart.

Signed-off-by: murphp15 [email protected]

Signed-off-by: murphp15 <[email protected]>
  • Loading branch information
murphp15 authored Nov 29, 2022
1 parent f4cfc10 commit 50fbbb3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,7 @@ Image Pull Secret in json format
{{- define "builderPullSecretJson" }}
{{ include "buildImagePullSecretJson" (list .Values.deploymentBuilderImage.registry .Values.deploymentBuilderImage.username .Values.deploymentBuilderImage.password) }}
{{- end }}

{{- define "basePullSecretJson" }}
{{ include "buildImagePullSecretJson" (list .Values.deploymentDataJobBaseImage.registry .Values.deploymentDataJobBaseImage.username .Values.deploymentDataJobBaseImage.password) }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if .Values.deploymentDataJobBaseImage.password }}
apiVersion: v1
kind: Secret
metadata:
name: builder-secrets
namespace: {{ .Values.controlK8sNamespace }}
labels: {{- include "pipelines-control-service.labels" . | nindent 4 }}
type: kubernetes.io/dockerconfigjson
data:
{{/* Within this section any set of properties can be set and then used in a job builder image
at the moment the only one set is extra_auth: Within this property docker config should be included to connect to the registry used to pull the image from. */}}
extra_auth: {{- printf ", \"%s\": {\"auth\": \"%s\"}" .Values.deploymentDataJobBaseImage.registry (printf "%s:%s" .Values.deploymentDataJobBaseImage.username .Values.deploymentDataJobBaseImage.password | b64enc) | b64enc }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ deploymentDataJobBaseImage:
registry: registry.hub.docker.com/versatiledatakit
repository: data-job-base-python-3.7
tag: "latest"
username:
password:

## ini formatted options that provides default and per-job VDK options.
## Allows to provide VDK configuration via environment variables.
Expand Down

0 comments on commit 50fbbb3

Please sign in to comment.