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

✨ Updated Makefile to support go install kustomize #3398

Merged

Conversation

lauchokyip
Copy link
Contributor

This change will change the method of installation from downloading the script to using go install
Fixes #2822

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 9, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @lauchokyip!

It looks like this is your first PR to kubernetes-sigs/kubebuilder 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kubebuilder has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 9, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @lauchokyip. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 9, 2023
@AlmogBaku
Copy link
Member

/lgtm

@lauchokyip
Copy link
Contributor Author

/cc @camilamacedo86

Can you PTAL? thanks!

Copy link
Member

@varshaprasad96 varshaprasad96 left a comment

Choose a reason for hiding this comment

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

/lgtm
/ok-to-test

This looks good. @lauchokyip. Thanks for working on this. This would also need an update in the migration guide in the KB docs. In this section to be specific (https://kubebuilder.io/migration/migration_guide_gov3_to_gov4.html?highlight=v3,to,v4#initialize-a-gov4-project). Would you mind taking a look and changing them.

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 10, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2023
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 10, 2023
@lauchokyip
Copy link
Contributor Author

@varshaprasad96 Thanks! added over here

Copy link
Member

@varshaprasad96 varshaprasad96 left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks @lauchokyip

@camilamacedo86 @everettraven @Kavinjsir can we have another lgtm to merge this?

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 10, 2023
@lauchokyip
Copy link
Contributor Author

/retest

@@ -141,15 +141,14 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
KUSTOMIZE_VERSION ?= v5.0.1
CONTROLLER_TOOLS_VERSION ?= v0.12.0

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
Copy link
Member

Choose a reason for hiding this comment

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

Can you please have your branch rebased with master and run make generate to update the samples and docs?
Also, please when you push the PR to update this one can you have the commits squashed?

Copy link
Contributor Author

@lauchokyip lauchokyip May 11, 2023

Choose a reason for hiding this comment

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

My apology, I forgot to setup upstream using git remote 😅

Copy link
Member

Choose a reason for hiding this comment

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

all fine. Thank you

@lauchokyip
Copy link
Contributor Author

/retest

@camilamacedo86
Copy link
Member

camilamacedo86 commented May 11, 2023

Great job 🥇

But sorry it still missing the rebase with master

/lgtm cancel

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 11, 2023
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 11, 2023
@lauchokyip
Copy link
Contributor Author

lauchokyip commented May 11, 2023

> Great job 1st_place_medal~

But sorry it still missing the rebase with master

/lgtm cancel

~I think there is some bug exists on make generate

I already rebased with upstream master as below, and run make generate for 5 times, but I still saw patchStragegicMerge being changed. I think the Makefile did not pick up the new changes

commit d03ea890b77b5c691c172923619488c917f9f353 (HEAD -> kuztomize-go-install, origin/kuztomize-go-install)
Author: Chok Yip Lau <lauchokyip@gmail.com>
Date:   Mon May 8 23:08:56 2023 -0400

    Updated Makefile to support go install kustomize

commit 4e131503b26116dd386181da3f6add9c475f7017 (upstream/master)
Merge: 77bc8955 12f9fad1
Author: Kubernetes Prow Robot <k8s-ci-robot@users.noreply.github.com>
Date:   Thu May 11 04:15:18 2023 -0700

    Merge pull request #3406 from camilamacedo86/onwer-alias
```</s>

@lauchokyip
Copy link
Contributor Author

lauchokyip commented May 11, 2023

@camilamacedo86 , can you run make generate on this branch? I kept getting this after running make generate

$ git status
On branch kuztomize-go-install
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   docs/book/src/component-config-tutorial/testdata/project/config/crd/kustomization.yaml
        modified:   docs/book/src/cronjob-tutorial/testdata/project/config/crd/kustomization.yaml

Turned out I was using old kubebuilder binary 😅

Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 12, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AlmogBaku, camilamacedo86, lauchokyip, varshaprasad96

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:
  • OWNERS [camilamacedo86,varshaprasad96]

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

@k8s-ci-robot k8s-ci-robot merged commit d64868e into kubernetes-sigs:master May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Makefile scaffolding should generate target to install Kustomize with go install
5 participants