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
HelmRelease valuesFrom broken for dotted annotations #542
Comments
This seems to be related to #520, although the regex introduced there allows both My gut feeling tells me it has something to do with the captured group (https://regex101.com/r/alhLe9/1) which makes the validator trip. |
Given the issue was just closed I guess this was a user input error, as the example works fine for me: apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: podinfo-helmrepository
spec:
interval: 5m
valuesFrom:
- kind: Secret
name: my-secret
valuesKey: my-value
targetPath: ingress.annotations.alb\.ingress\.kubernetes\.io/some-key
... $ kubectl apply -f test.yaml
helmrelease.helm.toolkit.fluxcd.io/podinfo-helmrepository created |
Hi, the problem still occurs. I only closed this one because i thought it is the flux1 repo. |
Can you please post an exact copy of your |
it is happening with any dotted annotation...
|
The validation rule in the chart is indeed incorrect and missing escapes, please open an issue there. |
ok thank you! |
Describe the bug
I just upgraded to the latest release and found out that it is not possible anymore to set dotted annotations with valuesFrom.
Example:
This used to work perfectly. With the latest version it says:
spec.valuesFrom.targetPath: Invalid value: "ingress.annotations.alb\\.ingress\\.kubernetes\\.io/some-key": spec.valuesFrom.targetPath in body should match '^([a-zA-Z0-9_\-.\/]|\[[0-9]{1,5}\])+$'
Steps to reproduce
Try valuesFrom with a annotation containing dots.
apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease .... valuesFrom: - kind: Secret name: my-secret valuesKey: my-value targetPath: ingress.annotations.alb\.ingress\.kubernetes\.io/some-key
Expected behavior
it should set the value for the annotation
Screenshots and recordings
No response
OS / Distro
N/A
Flux version
flux: v0.35.0
Flux check
✔ Kubernetes 1.23.10-eks-15b7512 >=1.20.6-0
► checking controllers
✔ helm-controller: deployment ready
► ghcr.io/fluxcd/helm-controller:v0.25.0
✔ image-automation-controller: deployment ready
► ghcr.io/fluxcd/image-automation-controller:v0.26.0
✔ image-reflector-controller: deployment ready
► ghcr.io/fluxcd/image-reflector-controller:v0.22.0
✔ kustomize-controller: deployment ready
► ghcr.io/fluxcd/kustomize-controller:v0.29.0
✔ notification-controller: deployment ready
► ghcr.io/fluxcd/notification-controller:v0.27.0
✔ source-controller: deployment ready
► ghcr.io/fluxcd/source-controller:v0.30.0
► checking crds
✔ alerts.notification.toolkit.fluxcd.io/v1beta1
✔ buckets.source.toolkit.fluxcd.io/v1beta2
✔ gitrepositories.source.toolkit.fluxcd.io/v1beta2
✔ helmcharts.source.toolkit.fluxcd.io/v1beta2
✔ helmreleases.helm.toolkit.fluxcd.io/v2beta1
✔ helmrepositories.source.toolkit.fluxcd.io/v1beta2
✔ imagepolicies.image.toolkit.fluxcd.io/v1beta1
✔ imagerepositories.image.toolkit.fluxcd.io/v1beta1
✔ imageupdateautomations.image.toolkit.fluxcd.io/v1beta1
✔ kustomizations.kustomize.toolkit.fluxcd.io/v1beta2
✔ ocirepositories.source.toolkit.fluxcd.io/v1beta2
✔ providers.notification.toolkit.fluxcd.io/v1beta1
✔ receivers.notification.toolkit.fluxcd.io/v1beta1
✔ all checks passed
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: