You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for the amazing work on flux v2!
When testing migration from v1, I've noticed an issue with kustomization generation: Given a directory, which does not contain kustomization.yaml, but containing other yaml files not related to kubernetes objects kustomization creation fails with:
kustomize create failed: failed to decode Kubernetes YAML from /tmp/flux-system630708581/.sops.yaml: error unmarshaling JSON: while decoding JSON: Object 'Kind' is missing in '{"creation_rules":[{"XXX":"projects/XXX/locations/global/keyRings/XXX/cryptoKeys/XXX","path_regex":"\\.secret\\.yaml$"}]}'
This can be triggered by having YAML files like .sops.yaml or ci workflows definitions e.g. .gitlab-ci.yml in root directory and not having kustomization.yaml
Flux v1 ignored non-k8 yaml files thanks to this func , whereas v2 and the kustomization flow requires all of yaml files to be k8 by using SliceForBytes for validation.
Possible workaround: simply adding kustomization.yaml in the affected directories, but this requires action and makes migration a bit more demanding for new users.
I'd be happy to contribute a fix or to document the workaround in case this gets considered as working as intended.
The text was updated successfully, but these errors were encountered:
First of all, thanks for the amazing work on flux v2!
When testing migration from v1, I've noticed an issue with kustomization generation: Given a directory, which does not contain kustomization.yaml, but containing other yaml files not related to kubernetes objects kustomization creation fails with:
kustomize create failed: failed to decode Kubernetes YAML from /tmp/flux-system630708581/.sops.yaml: error unmarshaling JSON: while decoding JSON: Object 'Kind' is missing in '{"creation_rules":[{"XXX":"projects/XXX/locations/global/keyRings/XXX/cryptoKeys/XXX","path_regex":"\\.secret\\.yaml$"}]}'
This can be triggered by having YAML files like
.sops.yaml
or ci workflows definitions e.g..gitlab-ci.yml
in root directory and not havingkustomization.yaml
Flux v1 ignored non-k8 yaml files thanks to this func , whereas v2 and the kustomization flow requires all of yaml files to be k8 by using SliceForBytes for validation.
Possible workaround: simply adding kustomization.yaml in the affected directories, but this requires action and makes migration a bit more demanding for new users.
I'd be happy to contribute a fix or to document the workaround in case this gets considered as working as intended.
The text was updated successfully, but these errors were encountered: