Skip to content

Fix kustomize5 warnings #2534

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

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

vikas-saxena02
Copy link

What this PR does / why we need it:
This PR aims at fixing deprecation warnings while runing kustomize build on manifest

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes: kubeflow/manifests#2985

Checklist:

  • Docs included if any changes are user facing

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign johnugeorge for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vikas-saxena02
Copy link
Author

/hold

@vikas-saxena02
Copy link
Author

@juliusvonkohout I am currently facing this issue
Screenshot 2025-03-23 at 9 39 16 pm

Any help in fixing this will be great!!

@juliusvonkohout
Copy link
Member

juliusvonkohout commented Mar 25, 2025

@juliusvonkohout I am currently facing this issue Screenshot 2025-03-23 at 9 39 16 pm

Any help in fixing this will be great!!

then please just omit the change there. Only implement what is simple and gets you a zero difference (post diff -u) in output. Fixing just 80 % of the warnings is totally fine. But i think you have to rebase to master first.

@juliusvonkohout
Copy link
Member

Check also #2511 (comment)

@vikas-saxena02
Copy link
Author

vikas-saxena02 commented Mar 26, 2025

@juliusvonkohout I am currently facing this issue Screenshot 2025-03-23 at 9 39 16 pm
Any help in fixing this will be great!!

then please just omit the change there. Only implement what is simple and gets you a zero difference (post diff -u) in output. Fixing just 80 % of the warnings is totally fine. But i think you have to rebase to master first.

@juliusvonkohout gimme time till this weekend, i have narroed down the root cause to the fact that replacements gets applied before patches and hence the issue. I am working on this and confident I will be able to sort this out. I had a deployment at work due yesterday but now I am back to this.

@google-oss-prow google-oss-prow bot added size/XL and removed size/L labels Mar 26, 2025
@vikas-saxena02
Copy link
Author

vikas-saxena02 commented Mar 26, 2025

@juliusvonkohout finally some success... i need to further test for any regressions which i will do later today and rebase with master has been done

@vikas-saxena02 vikas-saxena02 force-pushed the fix_kustomize5_warnings branch from 1733004 to 4fc8120 Compare March 26, 2025 03:39
@google-oss-prow google-oss-prow bot added size/L and removed size/XL labels Mar 26, 2025
@vikas-saxena02
Copy link
Author

/unhold

@vikas-saxena02
Copy link
Author

@Electronic-Waste can I please get some help in identify the root cause of the test failures?

@vikas-saxena02
Copy link
Author

/retest

@vikas-saxena02
Copy link
Author

@juliusvonkohout all issues resolved as promised... i had to completely get rid of katib-cert-manager . Below is output of git diff -u
Screenshot 2025-03-26 at 9 49 17 pm

@vikas-saxena02
Copy link
Author

@Electronic-Waste can I please get some help in identify the root cause of the test failures?

@Electronic-Waste all good now!! All tests have passed!! Can you please review this PR

@juliusvonkohout
Copy link
Member

juliusvonkohout commented Mar 26, 2025

can you post a diff -u to compare old and new rendered manifests for each kustomization.yaml and make sure that there is no difference?

@vikas-saxena02
Copy link
Author

can you post a diff -u to compare old and new rendered manifests for each kustomization.yaml and make sure that there is no difference?

sorry Julius, I am unable to understand what to do here... do you want to me to compare the yamls generated as output of kustomize build

@vikas-saxena02
Copy link
Author

for katib-with-kubeflow
Screenshot 2025-03-27 at 10 01 16 pm

@vikas-saxena02
Copy link
Author

@juliusvonkohout @andreyvelich I have come accrss a situation where diff -u on the new rendered manifests are resulting in some difference in output as shown below
Screenshot 2025-03-28 at 6 58 24 am

This is due to the fact that I had to get rid of patches for katib-cert-manager to make replacements work and add the aanotation to the ../components/webhook/ itself in order for this field to be found. The reason it was not working with replacements as reaplacements get applied prior to patches. While this work perfectly for katib-with-kubeflow this extra field is showing up in other modes e.g. katib-standalone-postgres. However, the newly added annotations field is not being used elsewhere and does not sound like a breaking change to me. Any inputs will really be great.

@vikas-saxena02
Copy link
Author

@juliusvonkohout @andreyvelich I have come accrss a situation where diff -u on the new rendered manifests are resulting in some difference in output as shown below Screenshot 2025-03-28 at 6 58 24 am

This is due to the fact that I had to get rid of patches for katib-cert-manager to make replacements work and add the aanotation to the ../components/webhook/ itself in order for this field to be found. The reason it was not working with replacements as reaplacements get applied prior to patches. While this work perfectly for katib-with-kubeflow this extra field is showing up in other modes e.g. katib-standalone-postgres. However, the newly added annotations field is not being used elsewhere and does not sound like a breaking change to me. Any inputs will really be great.

@juliusvonkohout same with katib-standalone, the recently added annotation is showing up in diff -u
Uploading Screenshot 2025-03-28 at 7.13.05 pm.png…

@vikas-saxena02
Copy link
Author

katib-openshift is good
Screenshot 2025-03-28 at 8 10 18 pm

@vikas-saxena02
Copy link
Author

katib-leader-election has same annotation coming up in diff
Screenshot 2025-03-28 at 8 16 43 pm

same with katib-external-db
Screenshot 2025-03-28 at 8 18 55 pm

@google-oss-prow google-oss-prow bot added size/XL and removed size/L labels Apr 8, 2025
@vikas-saxena02
Copy link
Author

@andreyvelich @juliusvonkohout requested changes have been made

@vikas-saxena02
Copy link
Author

/retest

1 similar comment
@vikas-saxena02
Copy link
Author

/retest

@vikas-saxena02 vikas-saxena02 force-pushed the fix_kustomize5_warnings branch from cb87a98 to 34e7f5b Compare April 8, 2025 10:46
@vikas-saxena02
Copy link
Author

@andreyvelich @juliusvonkohout all checks have passed after rebasing with master. Please review again and provide your feedback/approval.

# This is the 1st commit message:

accepted change to ghcr as part of rebase

Signed-off-by: Vikas Saxena <[email protected]>

# This is the commit message kubeflow#2:

fixed ui-virtual-service.yaml

Signed-off-by: Vikas Saxena <[email protected]>

# This is the commit message kubeflow#3:

replaced vars with replacements

Signed-off-by: Vikas Saxena <[email protected]>

# This is the commit message kubeflow#4:

repalced vars with replacements

Signed-off-by: Vikas Saxena <[email protected]>

# This is the commit message kubeflow#5:

replaced vars with replacements

Signed-off-by: Vikas Saxena <[email protected]>
Signed-off-by: Vikas Saxena <[email protected]>

fixed ui-virtual-service.yaml

Signed-off-by: Vikas Saxena <[email protected]>

replaced vars with replacements

Signed-off-by: Vikas Saxena <[email protected]>

repalced vars with replacements

Signed-off-by: Vikas Saxena <[email protected]>

replaced vars with replacements

Signed-off-by: Vikas Saxena <[email protected]>

ran kustomizr edit fix

Signed-off-by: Vikas Saxena <[email protected]>

ran kustomizr edit fix

Signed-off-by: Vikas Saxena <[email protected]>

ran kustomize edit fix

Signed-off-by: Vikas Saxena <[email protected]>

ran kustomize edit fix

Signed-off-by: Vikas Saxena <[email protected]>

trying to get rdi of error

Signed-off-by: Vikas Saxena <[email protected]>

removing braces in kustomization.yaml

Signed-off-by: Vikas Saxena <[email protected]>

refactoring code to get ridd of missing value

Signed-off-by: Vikas Saxena <[email protected]>

fixing code alignment issue

Signed-off-by: Vikas Saxena <[email protected]>

removed patches from customization file

Signed-off-by: Vikas Saxena <[email protected]>

added placeholder values

Signed-off-by: Vikas Saxena <[email protected]>

replaced placeholder value

Signed-off-by: Vikas Saxena <[email protected]>

removed patches dir

Signed-off-by: Vikas Saxena <[email protected]>

added skipping of . as mentioned at https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/replacements/#field-path-format

Signed-off-by: Vikas Saxena <[email protected]>
Signed-off-by: Vikas Saxena <[email protected]>
Signed-off-by: Vikas Saxena <[email protected]>
Signed-off-by: Vikas Saxena <[email protected]>
@vikas-saxena02 vikas-saxena02 force-pushed the fix_kustomize5_warnings branch from 34e7f5b to 8558848 Compare April 9, 2025 17:05
@vikas-saxena02
Copy link
Author

/retest

1 similar comment
@vikas-saxena02
Copy link
Author

/retest

@vikas-saxena02
Copy link
Author

@juliusvonkohout Short Summary:

  • Not affected: katib-with-kubeflow, katib-cert-manager, katib-openshift
  • affected (showing annotations): katib-external-db, katib-leader-election, katib-standalone-postgres, katib-standalone

@juliusvonkohout same summary as above
Screenshot 2025-04-10 at 3 33 29 am
Screenshot 2025-04-10 at 3 21 02 am

Screenshot 2025-04-10 at 3 28 37 am Screenshot 2025-04-10 at 3 27 26 am Screenshot 2025-04-10 at 3 22 48 am Screenshot 2025-04-10 at 3 24 02 am Screenshot 2025-04-10 at 3 25 25 am

@vikas-saxena02
Copy link
Author

/retest

1 similar comment
@vikas-saxena02
Copy link
Author

/retest

Signed-off-by: Vikas Saxena <[email protected]>
@vikas-saxena02
Copy link
Author

/retest

1 similar comment
@vikas-saxena02
Copy link
Author

/retest

Comment on lines +6 to +7
annotations:
cert-manager.io/inject-ca-from: KATIB_NAMESPACE_PLACEHOLDER/KATIB_CERT_NAME_PLACEHOLDER
Copy link
Member

@tenzen-y tenzen-y Apr 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add cert-manager related parameters in https://github.com/kubeflow/katib/tree/master/manifests/v1beta1/installs/katib-with-kubeflow since in Katib project, the cert-manager is not required dependencies. The certmanager is required dependencies only for Katib with Kubeflow.

Copy link
Author

@vikas-saxena02 vikas-saxena02 Apr 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tenzen-y Apologies, I just saw this. The reason I added this here was this annotation was previously applied with patches and with move to replacements from vars, the replacements get applied first before patches and hence the builds were failing. Given this annotation was not used elsewhere in katib-standalone and other modules I thought of adding it to the main webhook configuration. But I do not have background on Katib so I left it for review so I am open to ideas, can you suggest something that would be more ideal and I can make that change as part of this PR.

PS: this is my first time doing heavylifting work on Kustomize so yes there is some skill gap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KATIB upstream manifest fixes
4 participants