-
Notifications
You must be signed in to change notification settings - Fork 121
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 support for applying and deleting configs on cluster #582
Conversation
/retest |
02d69aa
to
37a485c
Compare
generators/pkg/manager/manage.go
Outdated
var kubeconfig *string | ||
if home := homedir.HomeDir(); home != "" { | ||
kubeconfig = flag.String("kubeconfig", filepath.Join(home, ".kube", "config"), "(optional) absolute path to the kubeconfig file") | ||
} else { | ||
kubeconfig = flag.String("kubeconfig", "", "absolute path to the kubeconfig file") | ||
} | ||
flag.Parse() |
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 we should probably break this out from this func.
- I'm not sure if these flags will actually render in
--help
unless they're declared in a var / cobra flags - I'm not sure what happens if you call flag.Parse multiple times, which may cause problems.
- This forces the flags on any caller of the function, which is generally something I try to avoid.
What I think we should do instead is define this flag on the cobra root command, which will automatically apply to all subcommands, and change this func to just take the kubeconfig path as a string.
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 will move the kubeconfig as the flag on the cobra root command.
37a485c
to
7f35353
Compare
Done. |
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
Looks good! Let's squash this up.
This commit is to add support to apply generated configs on cluster and then also enable users to delete them from cluster. Use subtests to test different cases.
74c2a19
to
bc3b559
Compare
Done! |
/lgtm |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wlynch 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 |
Changes
This PR aims to add support for managing generated configs on Kubernetes cluster for Tekton Generators.
The changes includes:
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide
for more details.