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
Implement commands for listing per-cluster CT/SNAT maps #24629
Implement commands for listing per-cluster CT/SNAT maps #24629
Conversation
1628142
to
1c7119f
Compare
/test |
cd2906e
to
b7ffc59
Compare
/test |
b7ffc59
to
4aef80e
Compare
/test |
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.
nit and validation concern.
4aef80e
to
6b98f8f
Compare
Reflected on Nate's comment. And sorry, I added a commit that implements the missing flag string for |
Smoke test, Smoke Test with IPv6: #23812 |
/conformance-test |
/test |
/conformance-test-ipv6 |
6b98f8f
to
410fdc3
Compare
/test Job 'Cilium-PR-K8s-1.25-kernel-4.19' failed: Click to show.Test Name
Failure Output
Jenkins URL: https://jenkins.cilium.io/job/Cilium-PR-K8s-1.25-kernel-4.19/1680/ If it is a flake and a GitHub issue doesn't already exist to track it, comment |
410fdc3
to
009a73d
Compare
/test |
Cilium Datapath is broken by cilium-cli change (cilium/cilium-cli#1498) and now fixed by 0a984a7. I think we don't have to re-run datapath test as it is not related to this change. |
Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
Introduce a new method GetClusterCTMaps which gets all CT maps for specific cluster. Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
dumpAndRead takes dump function and argument (args... interface{}) and calls dump function with args without expand the args slice. Fix it to expand slice. Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
In the current `cilium bpf ct list`, we specify the instance of the CT maps to dump by reserved word "global" or numeric id of the endpoints. This means we recognize the "type" of the CT maps by checking if the first argument is string or int and now we're trying to introduce another type for per-cluster maps. It is technically possible to introduce compatible command fixture like follows, but the parsing is unnecessarily complicated. Global : cilium bpf ct list global Enpoints : cilium bpf ct list 12345 Cluster : cilium bpf ct list cluster 1 Instead, we can explicitly specify the type by the first argument. Global : cilium bpf ct list global Enpoints : cilium bpf ct list endpoint 12345 Cluster : cilium bpf ct list cluster 1 This breaks the existing command for per-endpoint CT maps, but we consider this as an acceptable change since it doesn't change output of the command and cilium command fixture is considered as an cilium internal things and not a user interface we maintain. Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
Introduce a new command `cilium bpf ct list cluster <cluster id>` which dumps per-cluster CT maps. Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
Introduce a new command `cilium bpf nat list cluster <cluster id>` which dumps per-cluster NAT maps. Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
Handle from_tunnel in flagString. So that we can show from_tunnel value to CLI output. Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
009a73d
to
3630bbe
Compare
Rebasing on the master and re-running the CI. |
/test |
ConformanceK8sKind: #24622 |
Please see individual commits for more details.