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

Extend cilium config to expose all active configurations. Add subcommand cilium config get to get configurations from CLI #16519

Merged
merged 3 commits into from Sep 3, 2021

Conversation

h3llix
Copy link
Contributor

@h3llix h3llix commented Jun 13, 2021

Fixes: #13913

For cilium config get <config_name> configuration name should be in kebab case. For example EncryptNode, So we can get its value by cilium config get encrypt-node. Add flag -r to display read-only configurations.

Test-image : docker.io/h3llix/cilium-dev:cilium-config (if required)

image
image
image

@maintainer-s-little-helper

This comment has been minimized.

@maintainer-s-little-helper maintainer-s-little-helper bot added dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Jun 13, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label Jun 13, 2021
Copy link
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

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

It looks it's going on the right track. I assume all fields had to be made public otherwise the reflect won't work?

@h3llix
Copy link
Contributor Author

h3llix commented Jun 15, 2021

Yes @aanm . All fields need to be public. Though there is a way we can read unexported fileds by using reflect's unsafe pointer.

@pchaigno pchaigno added the release-note/minor This PR changes functionality that users may find relevant to operating Cilium. label Jun 21, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jun 21, 2021
Copy link
Member

@pchaigno pchaigno left a comment

Choose a reason for hiding this comment

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

LGTM! A few minor comments below.

I've answered to your weekly report to discuss what we want to include in that PR before merging.

pkg/option/config.go Outdated Show resolved Hide resolved
pkg/option/config.go Outdated Show resolved Hide resolved
cilium/cmd/config.go Outdated Show resolved Hide resolved
pkg/option/config.go Outdated Show resolved Hide resolved
@h3llix h3llix force-pushed the hellixSoc branch 3 times, most recently from ce142a5 to aa6f8bb Compare July 13, 2021 11:36
@h3llix h3llix changed the title [WIP] draft: pass config map through api Extend cilium config to expose all active configuraitons. Add subcommand cilium config get to get configurations from CLI Jul 13, 2021
@h3llix h3llix marked this pull request as ready for review July 13, 2021 11:54
@h3llix h3llix requested a review from a team July 13, 2021 11:54
@h3llix h3llix requested review from a team as code owners July 13, 2021 11:54
@h3llix h3llix requested a review from aanm July 13, 2021 11:54
@h3llix h3llix force-pushed the hellixSoc branch 2 times, most recently from b2035f6 to 63ca380 Compare August 16, 2021 12:42
cilium/cmd/config.go Outdated Show resolved Hide resolved
cilium/cmd/config.go Outdated Show resolved Hide resolved
cilium/cmd/config.go Outdated Show resolved Hide resolved
Documentation/cmdref/cilium_config.md Outdated Show resolved Hide resolved
pkg/option/config.go Outdated Show resolved Hide resolved
pkg/option/config.go Outdated Show resolved Hide resolved
Note: All the daemon configurations have to be public for reflections to work

Signed-off-by: Gaurav Genani <h3llix.pvt@gmail.com>
cilium config get <config_name> gives configuration value from the cli.
conifg_name should be in kebab case.

Signed-off-by: Gaurav Genani <h3llix.pvt@gmail.com>
Add -r flag to show read-only configurations while default cilium config
show read-write configurations

Signed-off-by: Gaurav Genani <h3llix.pvt@gmail.com>
@pchaigno
Copy link
Member

pchaigno commented Sep 1, 2021

test-me-please

Job 'Cilium-PR-K8s-1.16-net-next' hit: #17060 (84.67% similarity)

@pchaigno
Copy link
Member

pchaigno commented Sep 2, 2021

All tests are passing except for the one known flake above. All reviews are in except for Joe's but he said before that he was okay to merge without waiting for his review. I'm marking ready to merge.

@pchaigno pchaigno added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Sep 2, 2021
@aditighag aditighag merged commit b17e0fb into cilium:master Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose runtime config via cilium config CLI
9 participants