-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Allow reading Helm values from custom resources #5167
Comments
We'll need a diffrent field if we want to do this, as we can't break the current API. You can't refer to a custom resource by My proposal would be to add a dedicated section apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
...
spec:
valuesFromResource:
- apiVersion: network.foo.bar/v1
kind: NetworkProvider
name: my-network
sourcePath: "/status/networkID" # JSONPath for querying the custom resource
targetPath: "network.id" # YAML dot notation to the Helm values field
optional: false I'm not sure if JSONPath is the best query language, maybe CEL would be better. |
That's a way better proposal, thanks! Would be really cool if this is possible. |
The counter-proposal API is very close to the one we have today. If reusing
This would not break the current API and is much closer. I feel like introducing a new field only for CRs would make the overall API more confusing :/ |
We can't do that in v2, this would require a v3.
Can CEL be used to extract random structs from YAML? as in |
Can we support
Looks like there's nothing built-in for YAML/base64, but in the worst case we can load custom libraries like this: This wouldn't require a fork, just loading the library into the CEL environment. Edit: For base64 there is, |
Hmm I see what you mean about the YAML return type now, yeah this needs more investigation. |
Can |
This would integrate pretty seamlessly with https://github.com/fluxcd/pkg/compare/cel-bytes?expand=1 And CEL provides |
I would like to get helm values from other sources than ConfigMap or Secrets.
I think it would be really useful to allow every kind of kubernetes resource and specify a path where the value should be read from.
Example:
I have a CRD called
MyProviderNetwork
. The controller for this crd creates a new cloud provider network in the background and writes the id to.status.networkId
. It would be really cool to read this value as a flux value.Example Configuration for Flux:
The text was updated successfully, but these errors were encountered: