-
Notifications
You must be signed in to change notification settings - Fork 413
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
Fix Kustomization Warnings #4859
Fix Kustomization Warnings #4859
Conversation
Skipping CI for Draft Pull Request. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4859 +/- ##
=======================================
Coverage 62.01% 62.01%
=======================================
Files 201 201
Lines 16862 16862
=======================================
Hits 10457 10457
Misses 5622 5622
Partials 783 783 ☔ View full report in Codecov by Sentry. |
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.
Self notes.
templates/test/dev/custom-builds-machine-pool/kustomization.yaml
Outdated
Show resolved
Hide resolved
16b457d
to
de1b168
Compare
de1b168
to
28c3efb
Compare
28c3efb
to
2570c4d
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.
I think the goal of this PR should be just to change any kustomization.yaml
files (and the Makefile
, etc.) but not have any of the generated templates change. At least that's what I was attempting in #4753. You may have to add
sortOptions:
order: fifo
to ensure things stay stable.
0d199ff
to
390d257
Compare
|
/test pull-cluster-api-provider-azure-e2e-aks |
/test pull-cluster-api-provider-azure-conformance-ipv6-with-ci-artifacts |
AFAICT |
templates/test/dev/cluster-template-custom-builds-machine-pool.yaml
Outdated
Show resolved
Hide resolved
20e44c1
to
596da46
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.
/lgtm
LGTM label has been added. Git tree hash: 2375193756d1d0846b09f8102138dca6528e8d13
|
/retest |
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.
Overall looks good! Will run this locally to verify and I'll approve it then
/lgtm
done | ||
|
||
for name in $(find "${dev_dir}"* -maxdepth 0 -type d -print0 | xargs -0 -I {} basename {} | grep -v patches); do | ||
${KUSTOMIZE} build --load-restrictor LoadRestrictionsNone --reorder none "${dev_dir}${name}" > "${dev_dir}cluster-template-${name}.yaml" |
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.
Just for my own understanding: why is --reorder none
removed here?
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.
kustomize v5.4.1
complained on using reorder
flag. It said Flag --reorder has been deprecated, use the new 'sortOptions' field in kustomization.yaml instead
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.
So we removed --reorder
flag and are using sortOptions
instead in the kustomization files
/hold
|
- config folder - templates/addons - templates/azure-cluster-identity - templates/flavors - templates/test/ci - templates/test/dev - hack/observabilty - test/e2e/data remove --reorder none flag from the kustomize command and add sortOption:legacy to below folder - flavors - test/ci - test/dev
596da46
to
f0f1853
Compare
- path: ../patches/control-plane-custom-builds.yaml | ||
- path: patches/machine-pool-deployment-pr-version-windows.yaml | ||
- path: patches/custom-builds.yaml | ||
- path: ../../../test/ci/prow-ci-version/patches/oot-credential-provider-kcp.yaml |
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.
Since the sortOrder
is set to fifo
, a change in the order of listing these patch files generates a different cluster-template-custom-builds-machine-pool.yaml
/unhold |
And I do not believe we need to worry about restoring the order of patch files in other kustomization.yaml files since |
/test pull-cluster-api-provider-azure-conformance-with-ci-artifacts |
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.
/lgtm
LGTM label has been added. Git tree hash: ddbf42e15e90aac3e2e8eee41be84bc860ce055f
|
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: willie-yao 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 |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR is intended to fix Kustomization warnings seen on running
make generate
.The warnings I see are
# Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.
Flag --reorder has been deprecated, use the new 'sortOptions' field in kustomization.yaml instead.
Which issue(s) this PR fixes:
Fixes #4752
Special notes for your reviewer:
TODOs:
Release note: