update osbuilder chart to support console token secret ref

This commit is contained in:
Sebastian Florek 2025-02-07 14:01:51 +01:00
parent 22e4ea1eb7
commit 27ca05b9d4
No known key found for this signature in database
GPG Key ID: DBC7C083B0200A0F
3 changed files with 26 additions and 4 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: osbuilder
description: A Helm chart for osbuilder
appVersion: 0.6.0
version: 0.1.17
version: 0.2.0
dependencies:
- name: cert-manager
version: v1.16.3

View File

@ -1,3 +1,21 @@
{{ $token := .Values.builder.consoleToken }}
{{- if not $token }}
{{ $tokenSecret := lookup "v1" "Secret" .Release.Namespace .Values.builder.consoleTokenSecret.name }}
{{- if not $tokenSecret.data }}
{{- fail "Could not find secret provided via .Values.builder.consoleTokenSecret.name" }}
{{- end }}
{{ $token := index $tokenSecret.data .Values.builder.consoleTokenSecret.key | b64dec }}
{{- if not $token }}
{{- fail "Could not find token key value in the provided secret" }}
{{- end }}
{{- end }}
apiVersion: apps/v1
kind: Deployment
metadata:
@ -29,7 +47,7 @@ spec:
command: [ '/manager' ]
args:
- --console-url={{ .Values.builder.consoleUrl }}
- --console-token={{ .Values.builder.consoleToken }}
- --console-token={{ $token }}
- --pvc-storage-size={{ .Values.builder.pvcStorageSize }}
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080

View File

@ -16,8 +16,12 @@ builder:
tag: ~
replicas: 1
consoleUrl: ""
consoleToken: ""
consoleUrl: ~
consoleToken: ~
consoleTokenSecret:
name: ~
key: token
# The PVC storage size for the build process