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

Fix to allow etcd-snapshot to use config file with flags that are only used with k3s server. #4464

Merged
merged 6 commits into from
Nov 12, 2021

Conversation

dereknola
Copy link
Member

Proposed Changes

Allows server and etcd-snapshot to ignore flags in the config.yaml that do not match their valid flags list. This does not affect command line arguments.

Types of Changes

Verification

New unit test

Start k3s server with the following config.yaml:

token: 12345
node-label: myNodeIsFun
etcd-s3: true

Run k3s etcd-snapshot save and verify it does not fail. You should only see warnings about unknown flags

Linked Issues

#4449

User-Facing Change


Further Comments

@dereknola dereknola requested a review from a team as a code owner November 11, 2021 19:44
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
pkg/configfilearg/parser.go Outdated Show resolved Hide resolved
pkg/configfilearg/parser.go Outdated Show resolved Hide resolved
Signed-off-by: Derek Nola <derek.nola@suse.com>
@dereknola dereknola merged commit 4b57951 into k3s-io:master Nov 12, 2021
dereknola added a commit to dereknola/k3s that referenced this pull request Nov 12, 2021
…y used with k3s server. (k3s-io#4464)

* Enabled skipping of unknown flags from config in parser
* Added new unit test, expanded existing

Signed-off-by: Derek Nola <derek.nola@suse.com>
dereknola added a commit to dereknola/k3s that referenced this pull request Nov 12, 2021
…y used with k3s server. (k3s-io#4464)

* Enabled skipping of unknown flags from config in parser
* Added new unit test, expanded existing

Signed-off-by: Derek Nola <derek.nola@suse.com>
dereknola added a commit that referenced this pull request Nov 12, 2021
…h etcd-snapshot (#4477)

* Match to last After keyword for parser (#4383)
* Made parser able to skip over subcommands
* Fix to allow etcd-snapshot to use config file with flags that are only used with k3s server. (#4464)

Signed-off-by: Derek Nola <derek.nola@suse.com>
dereknola added a commit to dereknola/k3s that referenced this pull request Nov 12, 2021
…y used with k3s server. (k3s-io#4464)

* Enabled skipping of unknown flags from config in parser
* Added new unit test, expanded existing

Signed-off-by: Derek Nola <derek.nola@suse.com>
dereknola added a commit that referenced this pull request Nov 12, 2021
… but not defined" (#4482)

* Match to last After keyword for parser (#4383)
* Fix to allow etcd-snapshot to use config file with flags that are only used with k3s server. (#4464)

Signed-off-by: Derek Nola <derek.nola@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants