Add inline chart values
Adds inline chart values, as discussed in gitlab-org/gitlab#372024 (closed)
-
Add tests?
Manual testing
I set up an agent with the following configuration:
# .gitlab/agents/test/config.yaml
gitops:
charts:
- release_name: test
source:
project:
id: agent-playground/test # the agent config project
path: chart
values:
- inline:
body: the world is gonna
And a minimal chart with the following default values:
# chart/values.yaml
hello: world
body: once told me
and the following config map template:
# chart/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.hello | quote }}
data:
some: {{ .Values.body | quote }}
Then, in my cluster, the rendered configmap was:
apiVersion: v1
data:
some: the world is gonna
kind: ConfigMap
metadata:
annotations:
meta.helm.sh/release-name: test
meta.helm.sh/release-namespace: default
creationTimestamp: "2022-10-28T15:22:41Z"
labels:
app.kubernetes.io/managed-by: Helm
name: world
namespace: default
resourceVersion: "1485"
uid: 8af001df-555e-453b-871c-a72fb47eab20
Edited by Hordur Freyr Yngvason