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

Improve antctl get featuregates output #5314

Merged
merged 7 commits into from
Sep 20, 2023

Conversation

cr7258
Copy link
Contributor

@cr7258 cr7258 commented Jul 25, 2023

Fixes: #5173

Here are the major changes in this PR:

  • 1.Keep the information about which component is using the FeatureGate in antrea_features.go.
  • 2.For controller and remote mode, get feature gates by reading ConfigMap and include antrea-agent-windows feature gates for improvement.

Test

remote mode (outside of the cluster) / In antrea-controller Pod:

root@kind-demo:~# antctl get featuregates
Antrea Agent Feature Gates
FEATUREGATE                     STATUS       VERSION
AntreaIPAM                      Disabled     ALPHA
AntreaPolicy                    Enabled      BETA
AntreaProxy                     Enabled      BETA
CleanupStaleUDPSvcConntrack     Disabled     ALPHA
Egress                          Enabled      BETA
EndpointSlice                   Enabled      BETA
ExternalNode                    Disabled     ALPHA
FlowExporter                    Disabled     ALPHA
IPsecCertAuth                   Disabled     ALPHA
L7NetworkPolicy                 Disabled     ALPHA
LoadBalancerModeDSR             Disabled     ALPHA
Multicast                       Enabled      BETA
Multicluster                    Disabled     ALPHA
NetworkPolicyStats              Enabled      BETA
NodePortLocal                   Enabled      BETA
SecondaryNetwork                Disabled     ALPHA
ServiceExternalIP               Disabled     ALPHA
SupportBundleCollection         Disabled     ALPHA
TopologyAwareHints              Enabled      BETA
Traceflow                       Enabled      BETA
TrafficControl                  Disabled     ALPHA

Antrea Controller Feature Gates
FEATUREGATE                 STATUS       VERSION
AdminNetworkPolicy          Disabled     ALPHA
AntreaIPAM                  Disabled     ALPHA
AntreaPolicy                Enabled      BETA
Egress                      Enabled      BETA
IPsecCertAuth               Disabled     ALPHA
L7NetworkPolicy             Disabled     ALPHA
Multicast                   Enabled      BETA
Multicluster                Disabled     ALPHA
NetworkPolicyStats          Enabled      BETA
NodeIPAM                    Enabled      BETA
ServiceExternalIP           Disabled     ALPHA
SupportBundleCollection     Disabled     ALPHA
Traceflow                   Enabled      BETA

in antrea-agent Pod:

Antrea Agent Feature Gates
FEATUREGATE                     STATUS       VERSION
AntreaIPAM                      Disabled     ALPHA
AntreaPolicy                    Enabled      BETA
AntreaProxy                     Enabled      BETA
CleanupStaleUDPSvcConntrack     Disabled     ALPHA
Egress                          Enabled      BETA
EndpointSlice                   Enabled      BETA
ExternalNode                    Disabled     ALPHA
FlowExporter                    Disabled     ALPHA
IPsecCertAuth                   Disabled     ALPHA
L7NetworkPolicy                 Disabled     ALPHA
LoadBalancerModeDSR             Disabled     ALPHA
Multicast                       Enabled      BETA
Multicluster                    Disabled     ALPHA
NetworkPolicyStats              Enabled      BETA
NodePortLocal                   Enabled      BETA
SecondaryNetwork                Disabled     ALPHA
ServiceExternalIP               Disabled     ALPHA
SupportBundleCollection         Disabled     ALPHA
TopologyAwareHints              Enabled      BETA
Traceflow                       Enabled      BETA
TrafficControl                  Disabled     ALPHA

remote mode (outside of the cluster) / In antrea-controller Pod with antrea-windows-config-xxx Configmap:

root@kind-demo:~# kubectl exec -it -n kube-system antrea-controller-54f97f54c4-8wj7m -- antctl get featuregates
Antrea Agent Feature Gates
FEATUREGATE                     STATUS       VERSION
AntreaIPAM                      Disabled     ALPHA
AntreaPolicy                    Enabled      BETA
AntreaProxy                     Enabled      BETA
CleanupStaleUDPSvcConntrack     Disabled     ALPHA
Egress                          Enabled      BETA
EndpointSlice                   Enabled      BETA
ExternalNode                    Disabled     ALPHA
FlowExporter                    Disabled     ALPHA
IPsecCertAuth                   Disabled     ALPHA
L7NetworkPolicy                 Disabled     ALPHA
LoadBalancerModeDSR             Disabled     ALPHA
Multicast                       Enabled      BETA
Multicluster                    Disabled     ALPHA
NetworkPolicyStats              Enabled      BETA
NodePortLocal                   Enabled      BETA
SecondaryNetwork                Disabled     ALPHA
ServiceExternalIP               Disabled     ALPHA
SupportBundleCollection         Disabled     ALPHA
TopologyAwareHints              Enabled      BETA
Traceflow                       Enabled      BETA
TrafficControl                  Disabled     ALPHA

Antrea Agent Feature Gates (Windows)
FEATUREGATE                 STATUS       VERSION
AntreaPolicy                Enabled      BETA
AntreaProxy                 Enabled      BETA
EndpointSlice               Enabled      BETA
ExternalNode                Disabled     ALPHA
FlowExporter                Disabled     ALPHA
NetworkPolicyStats          Enabled      BETA
NodePortLocal               Enabled      BETA
SupportBundleCollection     Disabled     ALPHA
TopologyAwareHints          Enabled      BETA
Traceflow                   Enabled      BETA
TrafficControl              Disabled     ALPHA

Antrea Controller Feature Gates
FEATUREGATE                 STATUS       VERSION
AdminNetworkPolicy          Disabled     ALPHA
AntreaIPAM                  Disabled     ALPHA
AntreaPolicy                Enabled      BETA
Egress                      Enabled      BETA
IPsecCertAuth               Disabled     ALPHA
L7NetworkPolicy             Disabled     ALPHA
Multicast                   Enabled      BETA
Multicluster                Disabled     ALPHA
NetworkPolicyStats          Enabled      BETA
NodeIPAM                    Enabled      BETA
ServiceExternalIP           Disabled     ALPHA
SupportBundleCollection     Disabled     ALPHA
Traceflow                   Enabled      BETA

@cr7258 cr7258 changed the title Improve antctl get featuregates Improve antctl get featuregates output Jul 25, 2023
@cr7258 cr7258 force-pushed the improve-antctl-get-featuregates branch 6 times, most recently from 9848098 to 00b9070 Compare July 25, 2023 13:18
docs/feature-gates.md Outdated Show resolved Hide resolved
pkg/antctl/raw/featuregates/command.go Outdated Show resolved Hide resolved
pkg/apiserver/handlers/featuregates/handler.go Outdated Show resolved Hide resolved
pkg/apiserver/handlers/featuregates/handler.go Outdated Show resolved Hide resolved
pkg/apiserver/handlers/featuregates/handler_test.go Outdated Show resolved Hide resolved
pkg/apiserver/handlers/featuregates/handler_test.go Outdated Show resolved Hide resolved
pkg/features/antrea_features.go Outdated Show resolved Hide resolved
@hongliangl hongliangl added the area/component/antctl Issues or PRs releated to the command line interface component label Jul 28, 2023
docs/feature-gates.md Outdated Show resolved Hide resolved
pkg/features/antrea_features.go Outdated Show resolved Hide resolved
@luolanzone
Copy link
Contributor

Please help to resolve the doc conflicts. We had a new feature gate AdminNetworkPolicy since v1.13, you need also update the feature gate list for this new feature. Don't forget to update the antctl doc since the print behavior is different now.

@cr7258 cr7258 force-pushed the improve-antctl-get-featuregates branch 6 times, most recently from ed8b4a2 to 8edb199 Compare July 31, 2023 06:12
@cr7258
Copy link
Contributor Author

cr7258 commented Jul 31, 2023

Please help to resolve the doc conflicts. We had a new feature gate AdminNetworkPolicy since v1.13, you need also update the feature gate list for this new feature. Don't forget to update the antctl doc since the print behavior is different now.

update the feature gate list: 5f1a4a7
update the antctl doc: 2566f74

@cr7258
Copy link
Contributor Author

cr7258 commented Jul 31, 2023

Hi @hongliangl @luolanzone, I have addressed all comments, please review them again, Thanks.

@cr7258 cr7258 requested review from hongliangl and luolanzone July 31, 2023 08:35
Copy link
Contributor

@hongliangl hongliangl left a comment

Choose a reason for hiding this comment

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

You need to rebase this PR.

Tips: when rebasing this PR

  • Just accept all yaml files from the latest main branch
  • Run make manifest to update all yaml files.

pkg/apiserver/handlers/featuregates/handler.go Outdated Show resolved Hide resolved
docs/antctl.md Outdated Show resolved Hide resolved
pkg/features/antrea_features.go Outdated Show resolved Hide resolved
pkg/features/antrea_features.go Outdated Show resolved Hide resolved
@luolanzone
Copy link
Contributor

@cr7258, there are too many commits in this PR, please help to squash them. The DCO check is also failed, you need to add sign-off-by info in each commit. You can take a look at other PRs to learn how to add DCO info.

@cr7258 cr7258 force-pushed the improve-antctl-get-featuregates branch 2 times, most recently from 66aaa82 to 9ca7370 Compare August 2, 2023 02:11
@cr7258
Copy link
Contributor Author

cr7258 commented Aug 2, 2023

You need to rebase this PR.

Tips: when rebasing this PR

  • Just accept all yaml files from the latest main branch
  • Run make manifest to update all yaml files.

Done

@hongliangl
Copy link
Contributor

You don't need to push a comment for every review comment. You could just amend the updates, or commit the updates and squash the commits into one commit. Then you push the new commit with parameter --force to overwrite the remote repo.

@cr7258 cr7258 force-pushed the improve-antctl-get-featuregates branch from 9ca7370 to 41cd9a7 Compare August 2, 2023 02:26
@cr7258
Copy link
Contributor Author

cr7258 commented Aug 2, 2023

I squashed all commits.

@tnqn
Copy link
Member

tnqn commented Aug 24, 2023

The use of keyword "fix" in the PR description of #5433 automatically closed the PR on behalf of me. Please avoid using closing keywords to link issues/PRs in the future if merging a PR shouldn't close the other one.

@tnqn tnqn reopened this Aug 24, 2023
pkg/agent/apiserver/handlers/featuregates/handler_test.go Outdated Show resolved Hide resolved
pkg/agent/apiserver/handlers/featuregates/handler_test.go Outdated Show resolved Hide resolved
pkg/antctl/raw/featuregates/command.go Show resolved Hide resolved
pkg/antctl/runtime/runtime.go Outdated Show resolved Hide resolved
pkg/apiserver/handlers/featuregates/handler.go Outdated Show resolved Hide resolved
pkg/apiserver/handlers/featuregates/handler.go Outdated Show resolved Hide resolved
pkg/apiserver/handlers/featuregates/handler.go Outdated Show resolved Hide resolved
@cr7258 cr7258 requested a review from antoninbas August 25, 2023 01:40
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

a couple more small comments, otherwise LGTM

make sure you get another review

pkg/agent/apiserver/handlers/featuregates/handler_test.go Outdated Show resolved Hide resolved
pkg/antctl/raw/featuregates/command.go Outdated Show resolved Hide resolved
pkg/apiserver/handlers/featuregates/handler.go Outdated Show resolved Hide resolved
pkg/apiserver/handlers/featuregates/handler_test.go Outdated Show resolved Hide resolved
pkg/apiserver/handlers/featuregates/handler_test.go Outdated Show resolved Hide resolved
@cr7258 cr7258 force-pushed the improve-antctl-get-featuregates branch 2 times, most recently from 4a79646 to 94e819d Compare August 26, 2023 02:13
@cr7258 cr7258 force-pushed the improve-antctl-get-featuregates branch from 94e819d to 3373af6 Compare August 26, 2023 02:17
@cr7258 cr7258 requested a review from antoninbas August 26, 2023 02:17
@cr7258
Copy link
Contributor Author

cr7258 commented Aug 31, 2023

Hi @antoninbas, I adjusted the code according to your comments, please review them again, thanks.

tnqn
tnqn previously approved these changes Sep 5, 2023
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

LGTM, but would defer to Antonin for final approval as he has been reviewing it since the begining.
@cr7258 Antonin is on vacation and will be back next week.

antoninbas
antoninbas previously approved these changes Sep 18, 2023
@antoninbas
Copy link
Contributor

/test-all

@antoninbas
Copy link
Contributor

/test-windows-e2e

@antoninbas
Copy link
Contributor

/test-e2e

@antoninbas
Copy link
Contributor

/test-windows-containerd-e2e

@antoninbas antoninbas dismissed stale reviews from tnqn and themself via 2a34e84 September 20, 2023 17:07
@antoninbas
Copy link
Contributor

I resolved a small conflict in the Github UI. No need to run Jenkins tests again. Will merge once Go and Kind tests have passed.

antoninbas
antoninbas previously approved these changes Sep 20, 2023
Signed-off-by: Antonin Bas <[email protected]>
@antoninbas
Copy link
Contributor

/skip-all

@antoninbas antoninbas merged commit e16c364 into antrea-io:main Sep 20, 2023
@antoninbas antoninbas added the action/release-note Indicates a PR that should be included in release notes. label Sep 21, 2023
@antoninbas antoninbas added this to the Antrea v1.14 release milestone Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/release-note Indicates a PR that should be included in release notes. area/component/antctl Issues or PRs releated to the command line interface component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve "antctl get featuregates" output
5 participants