Skip to content
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/v2) - Remove the deprecation #3372

Closed
camilamacedo86 opened this issue Apr 28, 2023 · 5 comments · Fixed by #3374
Closed

(kustomize/v2) - Remove the deprecation #3372

camilamacedo86 opened this issue Apr 28, 2023 · 5 comments · Fixed by #3374
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@camilamacedo86
Copy link
Member

What do you want to happen?

See that the default scaffolds:

Warning:

'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run
"kustomize edit fix' to update
your Kustomization automatically.

Therefore we should replace patchesStrategicMerge by patches in the kustomize/v2 templates code. PS.: Update the code and use make generate to update the samples under testdata.

Extra Labels

No response

@camilamacedo86 camilamacedo86 added kind/feature Categorizes issue or PR as related to a new feature. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Apr 28, 2023
@Sajiyah-Salat
Copy link
Contributor

I am ready to work on this.

@Sajiyah-Salat
Copy link
Contributor

/assign

@Sajiyah-Salat
Copy link
Contributor

I have tried finding the file where changes needed. unfortunately didnt get it. Let me know the file where changes needed.

@camilamacedo86
Copy link
Member Author

Hi @Sajiyah-Salat,

This one seems a good issue !
Follow the steps to do this one.

1 - Follow up the quick start (https://book.kubebuilder.io/quick-start.html) and check the warning when you run make install

2 - Do the change

You will need to replace : patchesStrategicMerge
With : patches
In the file: https://github.com/kubernetes-sigs/kubebuilder/blob/master/pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/crd/kustomization.go#L113

3 - Now, let's test

  • Run make install in the project root dir to generate another Kubebuilder CLI binary from your source code.
  • Then, create a directory like test (mkdir test) and do the test again to ensure that the above replace will sort out the warning

4 - Run make generate to regenerate all (samples) under testdata and docs within yout change prior send the PR

Acceptance criteria

@Sajiyah-Salat
Copy link
Contributor

I have tried making directory test and it exits already. also I got three deprecation notice in make generate. still I have tried my best to follow the steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
2 participants