-
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
✨ (kustomize/v2) Remove deprecated syntax usage by replacing patchesStrategicMerge with patches #3374
✨ (kustomize/v2) Remove deprecated syntax usage by replacing patchesStrategicMerge with patches #3374
Conversation
I have run make generate. why its failing? |
@@ -110,7 +110,7 @@ var kustomizationTemplate = `# This kustomization.yaml is not intended to be run | |||
resources: | |||
%s | |||
|
|||
patchesStrategicMerge: | |||
patches: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sajiyah-Salat Try to make this change again in an up-to-date branch (upstream/master) and run make generate
. After running make generate
you will see that these files are also updated:
- docs/book/src/component-config-tutorial/testdata/project/config/crd/kustomization.yaml
- pkg/plugins/common/kustomize/v2/scaffolds/internal/templates/config/crd/kustomization.go
- testdata/project-v4-config/config/crd/kustomization.yaml
- testdata/project-v4-declarative-v1/config/crd/kustomization.yaml
- testdata/project-v4-multigroup/config/crd/kustomization.yaml
- testdata/project-v4-with-deploy-image/config/crd/kustomization.yaml
- testdata/project-v4/config/crd/kustomization.yaml
then commit the changes.
Not sure why oryxBuildBinary is added, so lets try it again.
@Sajiyah-Salat It seems fine now. |
squashing always comes with frustration. I have squashed the commits. i have tried pulling as well. still its giving the following error |
@Sajiyah-Salat This might be because your local branch is not up to date with the origin branch. Try this:
|
78f2c11
to
d9413b4
Compare
/approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution.
- Please, remove oryxBuildBinary
- Also, after the change in the boilerplate, the samples under testdata and docs should be automatically updated by running
make generate
- Also, we have a standard for the titles because they will be used to generate the release notes. So, in this case I am changing the title of this PR accordingly so that you can better check it and I hope that you do not mind.
Note Details about this review: https://github.com/kubernetes-sigs/kubebuilder/pull/3374/files#r1181174158
Please, ensure that you read the Contributing to know how to contribute with the project. Also, feel free to contribute to this doc if you see that it is missing or has outdated info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is great 🥇
Thank you for the contribution 🚀
See that testdata CI is falling because it seems that docs are not successfully update.
Note that:
- You must to run
make generate
after you do the changes - You must have in your local environment your fork cloned in the same module path as described here in the contributing guide : https://github.com/kubernetes-sigs/kubebuilder/blob/master/CONTRIBUTING.md#how-to-build-kubebuilder-locally . So that when you run
make install
a binary build from the source code will be added to your GOPATH/bin and when you runmake generate
it will regenerate the samples under testdata and docs samples using it.
Also, ensure that you have your branch updated (rebased) with the master.
The mistake I did is I deleted oryxBuildBinary and directly pushed it to branch without running make generate. Now when I run make generate and git status it says everything is upto date. What to do? |
@NikhilSharmaWe |
@lauchokyip Yes, I understand that but just wanted @Sajiyah-Salat to make the correct changes with simplicity, just for this case. |
846d8cf
to
a50259c
Compare
I think the tests have some issues. I have run make generate. Following files suggested by @NikhilSharmaWe Changed as well. Still its failing. Why? |
HI @Sajiyah-Salat, Did you have your branch rebased with master? 1 _ update the master branch $ git checkout master 2 - rebase with your branch $ git checkout 3 - run make install # It will ensure that you have the bin with the source code changes |
a50259c
to
0b27251
Compare
0b27251
to
818e880
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great @Sajiyah-Salat !!!!
/approved
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, NikhilSharmaWe, Sajiyah-Salat The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
wooh.... after a long time. Thank you for guiding me through out. |
This commit fixes the syntax error introduced in kubernetes-sigs#3374 where pathcesStrategicMerge was replaced with patches, which now requires that every patch additionally have a "path" key when multiple patches are specified in a file. Signed-off-by: Michael Shen <[email protected]>
This commit fixes the syntax error introduced in kubernetes-sigs#3374 where pathcesStrategicMerge was replaced with patches, which now requires that every patch additionally have a "path" key when multiple patches are specified in a file. Signed-off-by: Michael Shen <[email protected]>
This commit fixes the syntax error introduced in kubernetes-sigs#3374 where pathcesStrategicMerge was replaced with patches, which now requires that every patch additionally have a "path" key when multiple patches are specified in a file. Signed-off-by: Michael Shen <[email protected]>
This commit fixes the syntax error introduced in kubernetes-sigs#3374 where pathcesStrategicMerge was replaced with patches, which now requires that every patch additionally have a "path" key when multiple patches are specified in a file. Signed-off-by: Michael Shen <[email protected]>
This commit fixes the syntax error introduced in kubernetes-sigs#3374 where pathcesStrategicMerge was replaced with patches, which now requires that every patch additionally have a "path" key when multiple patches are specified in a file. Signed-off-by: Michael Shen <[email protected]>
This commit fixes the syntax error introduced in kubernetes-sigs#3374 where pathcesStrategicMerge was replaced with patches, which now requires that every patch additionally have a "path" key when multiple patches are specified in a file. Signed-off-by: Michael Shen <[email protected]>
This commit fixes the syntax error introduced in kubernetes-sigs#3374 where pathcesStrategicMerge was replaced with patches, which now requires that every patch additionally have a "path" key when multiple patches are specified in a file. Signed-off-by: Michael Shen <[email protected]>
This commit fixes the syntax error introduced in kubernetes-sigs#3374 where pathcesStrategicMerge was replaced with patches, which now requires that every patch additionally have a "path" key when multiple patches are specified in a file. Signed-off-by: Michael Shen <[email protected]>
This commit fixes the syntax error introduced in kubernetes-sigs#3374 where pathcesStrategicMerge was replaced with patches, which now requires that every patch additionally have a "path" key when multiple patches are specified in a file. Signed-off-by: Michael Shen <[email protected]>
Fixes #3372
See that the default scaffolds:
Warning:
'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run
"kustomize edit fix' to update
your Kustomization automatically.
Therefore I replaced patchesStrategicMerge by patches in the kustomize/v2 templates code.