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

Store namespace and k8sClient in the command context #2375

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

michi-covalent
Copy link
Contributor

Store namespace and k8sClient as command context values so that the connectivity package can access them from outside the cli package once it moves to cilium/cilium repo.

Ref: cilium/design-cfps#9

@michi-covalent
Copy link
Contributor Author

@tklauser what do you think about this change? simply exporting namespace and k8sClient fields doesn't work because it creates a circular dependency between https://github.com/cilium/cilium-cli/blob/pr/michi/majestic-ketchup/cli/cmd.go and https://github.com/cilium/cilium/blob/pr/michi/majestic-ketchup/pkg/cilium-cli/cmd/connectivity.go 💭

@michi-covalent michi-covalent marked this pull request as ready for review March 11, 2024 01:17
@michi-covalent michi-covalent requested a review from a team as a code owner March 11, 2024 01:17
@michi-covalent michi-covalent requested a review from squeed March 11, 2024 01:17
@squeed
Copy link
Contributor

squeed commented Mar 11, 2024

If this is the direction we do decide to go, I'd like to see typed getters for these. (I'm missing a lot of context though).

defaults/defaults.go Outdated Show resolved Hide resolved
@michi-covalent michi-covalent requested a review from tklauser March 12, 2024 14:15
Store namespace and k8sClient as command context values so that the
connectivity package can access them from outside the cli package once
it moves to cilium/cilium repo.

Ref: cilium/design-cfps#9

Signed-off-by: Michi Mutsuzaki <[email protected]>
@michi-covalent michi-covalent merged commit a00ab12 into main Mar 13, 2024
13 checks passed
@michi-covalent michi-covalent deleted the pr/michi/command-context branch March 13, 2024 14:44
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