flux2
flux2 copied to clipboard
published crd schema helmrelease-helm-v2beta1.json incorrectly shows spec/chart as required
Describe the bug
The published standalone schema for helmrelease-helm-v2beta1.json will flag a release using a chartRef instead of a chart as invalid.
Steps to reproduce
- Create Helmrelease using OCI repository as a chartref
- Run https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/scripts/validate.sh on cluster
- validation will fail on helmrelease stating that chart is a required property of spec
Example helmrelease
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: external-dns
namespace: external-dns
spec:
chartRef:
kind: OCIRepository
name: external-dns
namespace: flux-system
interval: 15m
timeout: 5m
releaseName: external-dns
values:
...
Expected behavior
validation json should allow either chart or chartref
So
"spec": {
...
"required": [
"chart",
"interval"
],
}
becomes
"spec": {
...
"required": [
"interval"
],
"oneOf": [
{
"required": [
"chart"
]
},
{
"required":[
"chartRef"
]
}
],
}
Screenshots and recordings
No response
OS / Distro
N/A
Flux version
v2.4.0
Flux check
N/A
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
The chartRef is only supposed in v2