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

✨ Add a flag to crd-puller to specify only the required CRDs that needs to be synced #840

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

bnallapeta
Copy link

@bnallapeta bnallapeta commented Apr 6, 2022

Summary

Provide an additional flag (--resources-to-sync) to specify which CRDs the user wants to pull.
Note: If the flag is not used or is empty, the default behavior(pull all CRDs on the cluster) is followed.

Typical usage is as shown below:

go run cmd/crd-puller/pull-crds.go --kubeconfig /home/bnr/.kube/config --resources-to-sync "pods,services,deployments"

Related issue(s)

#839

Fixes #839

cmd/crd-puller/pull-crds.go Outdated Show resolved Hide resolved
@ncdc
Copy link
Member

ncdc commented Sep 9, 2022

I think the path forward is to delete cmd/crd-puller from the repo. Thoughts @sttts @stevekuznetsov @davidfestal?

@sttts
Copy link
Member

sttts commented Sep 10, 2022

Would wait for the API management epic to unfold. There we need something like crdpuller.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 12, 2022
@ncdc ncdc added the area/transparent-multi-cluster Related to scheduling of workloads into pclusters. label Nov 17, 2022
Copy link
Member

@ncdc ncdc left a comment

Choose a reason for hiding this comment

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

Sorry for taking so long on this one - are you still interested in getting this merged? If you can make these changes, we can get it in! Thanks!

cmd/crd-puller/pull-crds.go Outdated Show resolved Hide resolved
cmd/crd-puller/pull-crds.go Outdated Show resolved Hide resolved
cmd/crd-puller/pull-crds.go Outdated Show resolved Hide resolved
cmd/crd-puller/pull-crds.go Outdated Show resolved Hide resolved
cmd/crd-puller/pull-crds.go Outdated Show resolved Hide resolved
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 2, 2023
@bnallapeta
Copy link
Author

@ncdc PTAL. I have worked on all the changes.
I had to introduce a third variable in order to handle the case where the user does not pass any value. I wasn't able to do this with just one var of type string or []string.

Copy link
Member

@ncdc ncdc left a comment

Choose a reason for hiding this comment

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

These diffs should make it work without the need for an extra variable

cmd/crd-puller/pull-crds.go Outdated Show resolved Hide resolved
cmd/crd-puller/pull-crds.go Outdated Show resolved Hide resolved
cmd/crd-puller/pull-crds.go Outdated Show resolved Hide resolved
cmd/crd-puller/pull-crds.go Outdated Show resolved Hide resolved
@ncdc
Copy link
Member

ncdc commented Mar 2, 2023

/test all

@bnallapeta
Copy link
Author

@ncdc Done. PTAL.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 3, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 3, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ncdc

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 3, 2023
@ncdc
Copy link
Member

ncdc commented Mar 3, 2023

/test all

@ncdc ncdc changed the title Added a flag to crd-puller to specify only the required CRDs that needs to be synced ✨ Add a flag to crd-puller to specify only the required CRDs that needs to be synced Mar 3, 2023
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 3, 2023
@ncdc
Copy link
Member

ncdc commented Mar 3, 2023

Fixed the imports

@ncdc
Copy link
Member

ncdc commented Mar 3, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 3, 2023
@ncdc
Copy link
Member

ncdc commented Mar 3, 2023

Going to close and reopen to get Prow to do all the tests

@ncdc ncdc closed this Mar 3, 2023
@ncdc ncdc reopened this Mar 3, 2023
@ncdc
Copy link
Member

ncdc commented Mar 3, 2023

/test all

@ncdc
Copy link
Member

ncdc commented Mar 3, 2023

kcp-dev/contrib-tmc#93
/test test

@openshift-merge-robot openshift-merge-robot merged commit de6312b into kcp-dev:main Mar 3, 2023
@kcp-ci-bot kcp-ci-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 23, 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. area/transparent-multi-cluster Related to scheduling of workloads into pclusters. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Added a flag to crd-puller to specify only the required CRDs that needs to be synced
5 participants