-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Remove use of deprecated patchesStrategicMerge #3539
Comments
There seem to be a few more occurrences:
We could probably look into removing all of those. |
We should only remove from kustomize/v2 plugin and not v1 since, the v1 is deprecated. Therefore, the projects scaffolds within go/v2 and go/3 layout, which either are deprecated, will not be changed. So, the change must be done in: ./pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault/kustomization.go:75:patchesStrategicMerge: And then, we run make generate to update the docs and samples accordingly. Would you like to contribute with this one @lentzi90? |
I'd like to pick this if not @lentzi90 cc: @camilamacedo86 |
/assign |
/assign |
Feel free to take it! The gist is that # Before
pathesStrategicMerge:
- patch_file.yaml
# After
patches:
- path: patch_file.yaml However, there is one thing that It is possible to work around by splitting the patch into multiple files, but as mentioned, I think we could just wait for the issue to be fixed in kustomize before we get rid of |
They are working on patches and it will accept multiple patches in future. Should we just wait for now? |
The issue in Kustomize has been fixed 🎉 |
After the release we just need to run |
I think it may be better to do it manually. At least I had some issues with # Before
pathesStrategicMerge:
- patch_file.yaml
# After
patches:
- path: patch_file.yaml
|
@camilamacedo86 okay so we can do it now as well. right? I can open a pr then. is it fine? |
I'm not sure how kubebuilder handles kustomize. Maybe @camilamacedo86 knows? |
Yes, you can open PRs to solve any issue and as please you. Hi @lentzi90 ,
I hope that it answer your questions |
What broke? What's expected?
Most of the deprecated kustomize syntax has already been removed, but I came across one instance of
patchesStrategicMerge
still lingering:kubebuilder/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/kdefault/kustomization.go
Line 75 in 68abac1
This should be changed to
patches
.Reproducing this issue
Now check
config/default/kustomization.yaml
:grep "patchesStrategicMerge" config/default/kustomization.yaml
KubeBuilder (CLI) Version
Version: main.version{KubeBuilderVersion:"3.11.1", KubernetesVendor:"1.27.1", GitCommit:"1dc8ed95f7cc55fef3151f749d3d541bec3423c9", BuildDate:"2023-07-03T13:10:56Z", GoOs:"linux", GoArch:"amd64"}
PROJECT version
3
Plugin versions
Other versions
No response
Extra Labels
/kind deprecation
The text was updated successfully, but these errors were encountered: