-
Notifications
You must be signed in to change notification settings - Fork 203
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 field of override for component extraArgs #1180
Conversation
Welcome @liangyuanpeng! |
Hi @liangyuanpeng. 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 Once the patch is verified, the new status will be reflected by the 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-sigs/prow repository. |
✅ Deploy Preview for k8s-kwok canceled.
|
/release-note none |
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 can add an override
field to ExtraArgs to override hardcode args.
@wzshiming componentsPatches:
- name: kube-apiserver
extraArgs:
- key: etcd-servers
value: http://192.168.66.2:3379
- key: etcd-prefix
value: /test
- key: override
value: true and do not override args by default. |
I think it looks like this. When the override is true, the same key arguments that already exist are removed. componentsPatches:
- name: kube-apiserver
extraArgs:
- key: etcd-servers
value: http://192.168.66.2:3379
override: true
- key: etcd-prefix
value: /test
override: true or another way to remove existing arguments componentsPatches:
- name: kube-apiserver
extraArgs:
- key: etcd-servers
remove: true
- key: etcd-prefix
remove: true
- key: etcd-servers
value: http://192.168.66.2:3379
- key: etcd-prefix
value: /test |
1cc1e41
to
1541dbe
Compare
1541dbe
to
9705c77
Compare
test/e2e/kwokctl/dryrun/testdata/binary/create_cluster_with_extra.txt
Outdated
Show resolved
Hide resolved
"sigs.k8s.io/kwok/pkg/apis/internalversion" | ||
) | ||
|
||
func TestApplyComponentPatch(t *testing.T) { |
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.
It might be better to have hard-coded expectation output.
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.
should, let me update it for test data for want
later
I think the override may need to be used in a different way without sort args, |
73fd35a
to
4eae31a
Compare
@wzshiming ready to go! |
4eae31a
to
3db53fb
Compare
0e384d2
to
8896fc0
Compare
/remove-kind cleanup |
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.
/ok-to-test
Signed-off-by: Lan Liang <[email protected]>
595bda7
to
43df963
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liangyuanpeng, wzshiming 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 |
/override pull-kwok-e2e-test-main |
@wzshiming: Overrode contexts on behalf of wzshiming: pull-kwok-e2e-test-main In response to this:
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-sigs/prow repository. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
I'm using componentsPatches to rewrite the args of kube-apiserver for
etcd-servers
andetcd-prefix
, it's working for me but i found the arg etcd-servers and etcd-prefix is repeated. This PR is working for cleanup the repeate.config.yaml
cmd of container kube-apiserver
/assign @wzshiming
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: