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
kustomize v4 high-impact breaking changes #918
Comments
There's an issue with Work Around
There will be a file named something like
Confirm
|
Starting with flux v0.9, the Kustomize overlays under manifests/bases are compatible with v4. Generating the Flux install manifests with the latest kustomize CLI is working again: kustomize build https://github.com/fluxcd/flux2/manifests/install?ref=v0.9.1 |
One major blocker has been fixed, kyaml/v0.10.14 no longer panics on duplicate keys, with this we should be able to upgrade kustomize-controller to sigs.k8s.io/kustomize/api v0.8.5. The only outstanding issue left is kubernetes-sigs/kustomize#3446 |
In other news, |
Hi @stefanprodan , I require your guidance on an issue i am facing with using kustomize and flux. if i use kubectl apply -k or kustomize build i see the expected output
Kubectl version 1.19.7 Any help is appreciated , thanks in advance |
@aashrit93 Please re-read the same issue that you've commented on asking for help. Kustomize v4 cannot be used with Flux. Downgrade your Kustomize CLI to match the 3.x major series requirement explained here. The last release in the 3.x series (for now?) is 3.10.0. This is the version that Flux's Kustomize controller uses, to get the same behavior from your Kustomize CLI, you should read and follow the other advice in the FAQ: https://fluxcd.io/docs/faq/#what-is-the-behavior-of-kustomize-used-by-flux |
We've published an image of kustomize-controller compatible with kustomize v4, please give it try and report all issues to this PR fluxcd/kustomize-controller#343 To test this please use the following image:
To upgrade kustomize-controller on an cluster bootstrapped with apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- gotk-components.yaml
- gotk-sync.yaml
images:
- name: ghcr.io/fluxcd/kustomize-controller
newName: ghcr.io/fluxcd/kustomize-controller
newTag: kustomize-v4-rc-de0310e7 |
thanks @yebyen and @stefanprodan for taking the time to look into this , much appreciated. Will try the above config , this helps a lot ! |
With the upgrade to flux2 v0.13.4 started seeing errors about, ``` kustomize build failed: accumulating resources: 2 errors occurred: * accumulateFile error: "accumulating resources from './monitoring/kube-prometheus-stack/crds': read /tmp/flux-system151583849/monitoring/kube-prometheus-stack/crds: is a directory" * accumulateDirector error: "recursed accumulation of path '/tmp/flux-system151583849/monitoring/kube-prometheus-stack/crds': accumulating resources: 2 errors occurred:\n\t* accumulateFile error: "accumulating resources from 'https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml': YAML file [https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml] encounters a format error.\nerror converting YAML to JSON: yaml: line 13: mapping values are not allowed in this context\n"\n\t* accumulateDirector error: "couldn't make target for path '/tmp/kustomize-228370023/repo': unable to find one of 'kustomization.yaml', 'kustomization.yml' or 'Kustomization' in directory '/tmp/kustomize-228370023/repo'"\n\n" ``` see [this issue](fluxcd/flux2#918) for context Signed-off-by: Jeff Billimek <jeff@billimek.com>
@stefanprodan With the latest flux version 0.15.3 installed via terraform i am still getting this error when helmrelease are trying to render |
The latest release of kustomize comes with breaking changes that have a high impact on Flux users.
❗ TLDR: Do not upgrade to v4, stay on v3.9.3 until we figure out a way forward.
Removal of
go-getter
The hashicorp/go-getter package has been dropped from kustomize due to go-getter's license not being on the CNCF approved LICENSE list.
Ref: kubernetes-sigs/kustomize#3578
Impact
The set of URLs accepted by kustomize in the
resources
filed is reduced to only file system paths or values compatible with git clone. This means you can no longer use resources from archives (zip, tgz, etc) nor S3, GCS, Minio, Mercurial, etc.💥 This means you can no longer install Flux with
kustomize build github.com/fluxcd/flux2/manifests/install?ref=v0.8.0
unless you use kustomize v3.9.3.✔️ Flux users should use
flux install --export
instead ofkustomize build
.💥 Once we upgrade kustomize-controller to
kustomize/api
v0.8, Flux users can no longer make use of GitHub releases URLs as remoteresources
due tozip
andtar.gz
not being supported.💡 The Flux team is considering offering a solution for defining sources from GitHub releases and remote archives.
Removal of
k8s.io/apimachinery
The dependencies on
k8s.io
packages have been dropped to update the kustomize functionality built into kubectl.Ref: kubernetes-sigs/kustomize#2506
Impact
Once we upgrade kustomize-controller to
kustomize/api
v0.8, Flux users will be affected by critical bugs present inkustomize/kyaml
library:💡 The Flux team will withhold from upgrading
kustomize/api
to v0.8 for some time, this means other bug fixes in kustomize will not be available to Flux, so we can't keep this up for long.Renaming of
flags
The kustomize flags that contain underscores have been replaced with hyphens to be compatible with kubectl.
Ref: kubernetes-sigs/kustomize#3601
Impact
💥 This means Flux docs and the CI validation scripts the we've provided to users will no longer work.
💡 Once we find a way to migrate Flux to
kustomize/api
v0.8, we'll update the documentation and the example scripts.The text was updated successfully, but these errors were encountered: