Comments (4)
Some additional testing seems to have it pinpointed to the use of sprig
's merge
function within the library chart that is used by the mentioned Jackett chart. While trying to isolate the issue, i noticed the following:
Given the following simple configmap template:
apiVersion: v1
kind: ConfigMap
metadata:
name: test
data:
# WORKS
userValues: |-
{{- $userValues := omit .Values "common" -}}
{{- $userValues | toYaml | nindent 4 }}
# WORKS
defaultValues: |-
{{- $defaultValues := get .Values "common" -}}
{{- $defaultValues | toYaml | nindent 4 }}
# ?EMPTY STRING?:
mergedValues: |-
{{- $mergedValues := merge $userValues $defaultValues -}}
{{- $mergedValues | toYaml | nindent 4 }}
Renders the following output in flux v2 (notice how mergedValues
is an empty string):
apiVersion: v1
data:
defaultValues: |-
service:
additionalPorts: []
additionalServices: []
annotations: {}
enabled: true
labels: {}
port:
name: http
port: ""
protocol: TCP
targetPort: http
type: ClusterIP
strategy:
type: RollingUpdate
mergedValues: ""
userValues: |-
service:
port:
port: 9117
strategy:
type: Recreate
When running helm template
or helm install
(and also in flux v1) this output is rendered as expected (notice how mergedValues
is filled):
apiVersion: v1
data:
defaultValues: |-
service:
additionalPorts: []
additionalServices: []
annotations: {}
enabled: true
labels: {}
port:
name: http
port: ""
protocol: TCP
targetPort: http
type: ClusterIP
strategy:
type: RollingUpdate
userValues: |-
service:
port:
port: 9117
strategy:
type: Recreate
mergedValues: |-
service:
additionalPorts: []
additionalServices: []
annotations: {}
enabled: true
labels: {}
port:
name: http
port: 9117
protocol: TCP
targetPort: http
type: ClusterIP
strategy:
type: Recreate
kind: ConfigMap
from helm-controller.
Seems to be that the type validation in Flux v2 is somehow stricter than before (and in helm template
). There was a value set as string in one of the values.yaml, whereas the value override in the chart was an int. That caused the following error:
{"level":"debug","ts":"2020-11-12T16:03:46.534Z","logger":"controller-runtime.manager.events","msg":"Normal","object":{"kind":"HelmRelease","namespace":"test","name":"test","uid":"df207251-c73f-4d61-befb-7d596cdb0ed3","apiVersion":"helm.toolkit.fluxcd.io/v2beta1","resourceVersion":"138550"},"reason":"error","message":"Helm install failed: template: test/templates/configmap.yaml:19:25: executing "test/templates/configmap.yaml" at <mustMerge $userValues $defaultValues>: error calling mustMerge: cannot append two different types (string, float64)"}
from helm-controller.
This was an issue with our chart that we corrected, but flux2 is the only one that has an issue.
I'll close the issue unless other people report in having a similar issue.
from helm-controller.
Likely the same root cause as #152
from helm-controller.
Related Issues (20)
- HelmRelease does redundant validation on chart name HOT 1
- Missing some crucial events HOT 2
- HelmRelease verify provider gpg HOT 1
- Drift mode should detect extra properties HOT 1
- Chart version only includes git SHA at root chart HOT 2
- Only deploy prerelease versions HOT 1
- Feature Request: Replace reconciliation interval with cron schedule in HelmRelease CRD HOT 1
- [BUG] Drift Detection can not be disabled for specific resources using annotations or labels
- [BUG] memory usage grows exponentially when there are lots of CRDs HOT 2
- [BUG] Helm drift detection on configmap patching '*** (after)' instead of the actual template from the helm chart HOT 13
- Backward compatibility of helm-controller HOT 6
- FEATURE: First-class support for secret decryption HOT 1
- Unable to detect server capabilities HOT 16
- HelmRelease: CRDs of disabled subcharts get installed anyway HOT 8
- Failed to reconcile HelmRelease field immutable HOT 1
- DependsOn readiness check should only rely on Ready condition HOT 10
- (site) DependsOn does not document cross-namespace dependencies HOT 2
- Changes in postRenderers are ingored HOT 6
- v0.37.4 has CVE-2024-26147 high vulnerability HOT 1
- Flux Helm Not Removing HPA objects on upgrade HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helm-controller.