-
The Helm Operator supports values from sources, for example via a The current design in the Helm Operator could be ported as it has proven to be useful, but there also have been feature requests to extend the current functionalities:
The goal of this discussion is to:
|
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 28 replies
-
There is also: |
Beta Was this translation helpful? Give feedback.
-
I have an objection against two of the proposals.
While I do think it would be useful to support HTTP/S credentials (provided using a secret, and not embedded in the If the question arises again, we can always reconsider including it based on the use-cases provided by users.
I feel nothing for including this, it goes against the default Helm merging behaviour and will hurt more people (by not being able to overwrite a complete list) than help them, while making it a configurable option would be cumbersome. |
Beta Was this translation helpful? Give feedback.
-
I propose a simpler approche to values: spec:
valuesFrom:
- kind: ConfigMap
name: config-values
- kind: Secret
name: secret-values
|
Beta Was this translation helpful? Give feedback.
-
As long as |
Beta Was this translation helpful? Give feedback.
-
To combine #100 (reply in thread) and #100 (reply in thread), and settle on an answer. Proposed spec changesdiff --git a/docs/spec/v2alpha1/helmreleases.md b/docs/spec/v2alpha1/helmreleases.md
index 5c13e45..086f624 100644
--- a/docs/spec/v2alpha1/helmreleases.md
+++ b/docs/spec/v2alpha1/helmreleases.md
@@ -70,6 +70,10 @@ type HelmReleaseSpec struct {
// +optional
Uninstall Uninstall `json:"uninstall,omitempty"`
+ // ValuesFrom holds references to values in Secrets and ConfigMaps.
+ // +optional
+ ValuesFrom []ValuesReference `json:"valuesFrom,omitempty"`
+
// Values holds the values for this Helm release.
// +optional
Values apiextensionsv1.JSON `json:"values,omitempty"`
@@ -96,6 +100,30 @@ type HelmChartTemplate struct {
Interval *metav1.Duration `json:"interval,omitempty"`
}
+// ValuesReference contains enough information to let you locate the
+// values reference at namespace level, and where the (sub)set of
+// values should be merged at.
+type ValuesReference struct {
+ // Kind of the values referent.
+ // +kubebuilder:validation:Enum=Secret,ConfigMap
+ // +required
+ Kind string `json:"kind"`
+
+ // Name of the values referent.
+ // +required
+ Name string `json:"name"`
+
+ // ValuesKey is the key in the referent the values can be found at.
+ // Defaults to 'values.yaml'.
+ // +optional
+ ValuesKey string `json:"valuesKey,omitempty"`
+
+ // TargetPath is the YAML dot notation path the values should be merged at.
+ // Defaults to 'None', which results in the values getting merged at the root.
+ // +optional
+ TargetPath string `json:"targetPath,omitempty"`
+}
+
// Install holds the configuration for Helm install actions.
type Install struct {
// Timeout is the time to wait for any individual Kubernetes operation (like Jobs |
Beta Was this translation helpful? Give feedback.
-
What keeps biting my team is the fact we can't inject Is this possible? |
Beta Was this translation helpful? Give feedback.
-
Coming in a bit late here, but removing the namespace support in configmap/secrets will be a bad breakage in our setup. We had this discussion of information disclosure back when namespace support was added (helm-operator #120), and at the time Kubernetes RBAC was considered sufficient. I don't really understand how this changed with the new design? |
Beta Was this translation helpful? Give feedback.
-
Supplying values from flux sources would be useful too. We are currently using Flux v1 with Helm Operator. We use git repo as chart source and that git repo stores the umbrella charts which refer to the charts that are located in our chart museum and each chart has its own values file. This allows us to separate helm values files from helm release files. We use this approach because we want helm values to remain its original form, moreover having helm values in helm-release files seems bulky (in case your configuration is very descriptive), the same goes with configMaps and secrets. In addition, with helm values stored in clusters as configMaps and secrets, the namespaces look cluttered and busy. |
Beta Was this translation helpful? Give feedback.
-
It would be nice to be able to provide more than one values file if the chart is sourced from a GitRepository. For example: apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: example
namespace: default
spec:
releaseName: example
chart:
spec:
chart: charts/example
sourceRef:
kind: GitRepository
name: example-repo
namespace: flux-system
valuesFile:
- charts/example/values.yaml
- charts/example/values-extend.yaml
- charts/example/values-production.yaml
interval: 5m The HelmRelease create function in the CLI has a many-values-files mapper: flux2/cmd/flux/create_helmrelease.go Lines 182 to 203 in 24fe74f Any reason why we couldn't encourage merging from multiple files from the same GitRepository (as Helm Release/Chart source)? If I understand correctly the alternatives are:
Anything I'm missing? Thanks! |
Beta Was this translation helpful? Give feedback.
To combine #100 (reply in thread) and #100 (reply in thread), and settle on an answer.
Proposed spec changes