mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 18:49:50 +02:00
fix: inject global values in Chartify (#1805)
* fix: inject global values in Chartify Signed-off-by: Thomas Loubiou <thomas.loubiou@mirakl.com> * test: add integration tests for template --values Signed-off-by: Thomas Loubiou <thomas.loubiou@mirakl.com> --------- Signed-off-by: Thomas Loubiou <thomas.loubiou@mirakl.com>
This commit is contained in:
@@ -12,16 +12,18 @@ fi
|
||||
chartify_tmp=$(mktemp -d)
|
||||
chartify_template_reverse=${chartify_tmp}/chartify.template.log
|
||||
|
||||
|
||||
test_start "helmfile template with chartify"
|
||||
|
||||
info "Comparing template/chartify"
|
||||
${helmfile} -f ${chartify_case_input_dir}/${config_file} template > ${chartify_template_reverse} || fail "\"helmfile template\" shouldn't fail"
|
||||
${helmfile} -f ${chartify_case_input_dir}/${config_file} template >${chartify_template_reverse} || fail "\"helmfile template\" shouldn't fail"
|
||||
./dyff between -bs ${chartify_case_output_dir}/template ${chartify_template_reverse} || fail "\"helmfile template\" should be consistent"
|
||||
|
||||
info "Comparing template/chartify with set"
|
||||
${helmfile} -f ${chartify_case_input_dir}/${config_file} template --set image.tag=v2 > ${chartify_template_reverse} || fail "\"helmfile template\" shouldn't fail"
|
||||
${helmfile} -f ${chartify_case_input_dir}/${config_file} template --set image.tag=v2 >${chartify_template_reverse} || fail "\"helmfile template\" shouldn't fail"
|
||||
./dyff between -bs ${chartify_case_output_dir}/template-set ${chartify_template_reverse} || fail "\"helmfile template\" should be consistent"
|
||||
|
||||
info "Comparing template/chartify with values"
|
||||
${helmfile} -f ${chartify_case_input_dir}/${config_file} template --values "./extra-values.yaml" >${chartify_template_reverse} || fail "\"helmfile template\" shouldn't fail"
|
||||
./dyff between -bs ${chartify_case_output_dir}/template-values ${chartify_template_reverse} || fail "\"helmfile template\" should be consistent"
|
||||
|
||||
test_pass "helmfile template with chartify"
|
||||
test_pass "helmfile template with chartify"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
image:
|
||||
tag: v3
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
# Source: httpbin/templates/patched_resources.yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: httpbin
|
||||
chart: httpbin-0.1.0
|
||||
heritage: Helm
|
||||
release: httpbin
|
||||
name: httpbin-httpbin
|
||||
spec:
|
||||
ports:
|
||||
- name: httpbin
|
||||
port: 8000
|
||||
protocol: TCP
|
||||
targetPort: 8000
|
||||
selector:
|
||||
app: httpbin
|
||||
release: httpbin
|
||||
type: LoadBalancer
|
||||
---
|
||||
# Source: httpbin/templates/patched_resources.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: httpbin
|
||||
chart: httpbin-0.1.0
|
||||
heritage: Helm
|
||||
release: httpbin
|
||||
name: httpbin-httpbin
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: httpbin
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: httpbin
|
||||
release: httpbin
|
||||
spec:
|
||||
containers:
|
||||
- image: docker.io/citizenstig/httpbin:v3
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8000
|
||||
name: httpbin
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8000
|
||||
resources: {}
|
||||
status: {}
|
||||
Reference in New Issue
Block a user