From e8453fe7ee11356d2d6ceb306d326b7434380544 Mon Sep 17 00:00:00 2001 From: Hongliang Liu Date: Wed, 16 Aug 2023 10:52:15 +0800 Subject: [PATCH] Promote feature gate EndpointSlice to GA Signed-off-by: Hongliang Liu --- build/charts/antrea/conf/antrea-agent.conf | 5 ----- build/yamls/antrea-aks.yml | 9 ++------- build/yamls/antrea-eks.yml | 9 ++------- build/yamls/antrea-gke.yml | 9 ++------- build/yamls/antrea-ipsec.yml | 9 ++------- build/yamls/antrea-windows-containerd-with-ovs.yml | 9 ++------- build/yamls/antrea-windows-containerd.yml | 9 ++------- build/yamls/antrea-windows.yml | 9 ++------- build/yamls/antrea.yml | 9 ++------- build/yamls/windows/base/conf/antrea-agent.conf | 5 ----- docs/feature-gates.md | 4 ++-- pkg/apiserver/handlers/featuregates/handler_test.go | 2 +- pkg/features/antrea_features.go | 3 ++- 13 files changed, 21 insertions(+), 70 deletions(-) diff --git a/build/charts/antrea/conf/antrea-agent.conf b/build/charts/antrea/conf/antrea-agent.conf index 6790822c672..998266c6dc9 100644 --- a/build/charts/antrea/conf/antrea-agent.conf +++ b/build/charts/antrea/conf/antrea-agent.conf @@ -11,11 +11,6 @@ featureGates: # Service traffic. {{- include "featureGate" (dict "featureGates" .Values.featureGates "name" "AntreaProxy" "default" true) }} -# Enable EndpointSlice support in AntreaProxy. Don't enable this feature unless that EndpointSlice -# API version v1 is supported and set as enabled in Kubernetes. If AntreaProxy is not enabled, -# this flag will not take effect. -{{- include "featureGate" (dict "featureGates" .Values.featureGates "name" "EndpointSlice" "default" true) }} - # Enable TopologyAwareHints in AntreaProxy. This requires AntreaProxy and EndpointSlice to be # enabled, otherwise this flag will not take effect. {{- include "featureGate" (dict "featureGates" .Values.featureGates "name" "TopologyAwareHints" "default" true) }} diff --git a/build/yamls/antrea-aks.yml b/build/yamls/antrea-aks.yml index ad6d8f6fb56..c3b0a6eacb0 100644 --- a/build/yamls/antrea-aks.yml +++ b/build/yamls/antrea-aks.yml @@ -5466,11 +5466,6 @@ data: # Service traffic. # AntreaProxy: true - # Enable EndpointSlice support in AntreaProxy. Don't enable this feature unless that EndpointSlice - # API version v1 is supported and set as enabled in Kubernetes. If AntreaProxy is not enabled, - # this flag will not take effect. - # EndpointSlice: true - # Enable TopologyAwareHints in AntreaProxy. This requires AntreaProxy and EndpointSlice to be # enabled, otherwise this flag will not take effect. # TopologyAwareHints: true @@ -6819,7 +6814,7 @@ spec: kubectl.kubernetes.io/default-container: antrea-agent # Automatically restart Pods with a RollingUpdate if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: 3f29ab6bd7105c6a6b30dafad282ac88a606e7aefe5914b7787aeeaafa7b4f8d + checksum/config: bd3cc2357f4f4840922ea96aae5b57153ba83fde408981db5333e53cc24255d8 labels: app: antrea component: antrea-agent @@ -7060,7 +7055,7 @@ spec: annotations: # Automatically restart Pod if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: 3f29ab6bd7105c6a6b30dafad282ac88a606e7aefe5914b7787aeeaafa7b4f8d + checksum/config: bd3cc2357f4f4840922ea96aae5b57153ba83fde408981db5333e53cc24255d8 labels: app: antrea component: antrea-controller diff --git a/build/yamls/antrea-eks.yml b/build/yamls/antrea-eks.yml index b1bfdc60b67..c564b35aa79 100644 --- a/build/yamls/antrea-eks.yml +++ b/build/yamls/antrea-eks.yml @@ -5466,11 +5466,6 @@ data: # Service traffic. # AntreaProxy: true - # Enable EndpointSlice support in AntreaProxy. Don't enable this feature unless that EndpointSlice - # API version v1 is supported and set as enabled in Kubernetes. If AntreaProxy is not enabled, - # this flag will not take effect. - # EndpointSlice: true - # Enable TopologyAwareHints in AntreaProxy. This requires AntreaProxy and EndpointSlice to be # enabled, otherwise this flag will not take effect. # TopologyAwareHints: true @@ -6819,7 +6814,7 @@ spec: kubectl.kubernetes.io/default-container: antrea-agent # Automatically restart Pods with a RollingUpdate if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: 3f29ab6bd7105c6a6b30dafad282ac88a606e7aefe5914b7787aeeaafa7b4f8d + checksum/config: bd3cc2357f4f4840922ea96aae5b57153ba83fde408981db5333e53cc24255d8 labels: app: antrea component: antrea-agent @@ -7061,7 +7056,7 @@ spec: annotations: # Automatically restart Pod if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: 3f29ab6bd7105c6a6b30dafad282ac88a606e7aefe5914b7787aeeaafa7b4f8d + checksum/config: bd3cc2357f4f4840922ea96aae5b57153ba83fde408981db5333e53cc24255d8 labels: app: antrea component: antrea-controller diff --git a/build/yamls/antrea-gke.yml b/build/yamls/antrea-gke.yml index 0efa7a61c61..d3c6d09fa7d 100644 --- a/build/yamls/antrea-gke.yml +++ b/build/yamls/antrea-gke.yml @@ -5466,11 +5466,6 @@ data: # Service traffic. # AntreaProxy: true - # Enable EndpointSlice support in AntreaProxy. Don't enable this feature unless that EndpointSlice - # API version v1 is supported and set as enabled in Kubernetes. If AntreaProxy is not enabled, - # this flag will not take effect. - # EndpointSlice: true - # Enable TopologyAwareHints in AntreaProxy. This requires AntreaProxy and EndpointSlice to be # enabled, otherwise this flag will not take effect. # TopologyAwareHints: true @@ -6819,7 +6814,7 @@ spec: kubectl.kubernetes.io/default-container: antrea-agent # Automatically restart Pods with a RollingUpdate if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: f72133ab696861e8ad657749229d1449f856a7b84fb37c933db72debf8c57a30 + checksum/config: b60de279ae16a5513b971fbc10031f7c520787cfdfd13e2c59063dc2b2c8a8be labels: app: antrea component: antrea-agent @@ -7058,7 +7053,7 @@ spec: annotations: # Automatically restart Pod if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: f72133ab696861e8ad657749229d1449f856a7b84fb37c933db72debf8c57a30 + checksum/config: b60de279ae16a5513b971fbc10031f7c520787cfdfd13e2c59063dc2b2c8a8be labels: app: antrea component: antrea-controller diff --git a/build/yamls/antrea-ipsec.yml b/build/yamls/antrea-ipsec.yml index 8c2670efa95..e4dff099905 100644 --- a/build/yamls/antrea-ipsec.yml +++ b/build/yamls/antrea-ipsec.yml @@ -5479,11 +5479,6 @@ data: # Service traffic. # AntreaProxy: true - # Enable EndpointSlice support in AntreaProxy. Don't enable this feature unless that EndpointSlice - # API version v1 is supported and set as enabled in Kubernetes. If AntreaProxy is not enabled, - # this flag will not take effect. - # EndpointSlice: true - # Enable TopologyAwareHints in AntreaProxy. This requires AntreaProxy and EndpointSlice to be # enabled, otherwise this flag will not take effect. # TopologyAwareHints: true @@ -6832,7 +6827,7 @@ spec: kubectl.kubernetes.io/default-container: antrea-agent # Automatically restart Pods with a RollingUpdate if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: 62fe59882b960435e6de67c414b3ea71463d9c1eb97a024a69dd0aa6e506deff + checksum/config: 6de7d12710db8233e2b3bc744a0e646aee919454499a28c6afd3755744d4bde8 checksum/ipsec-secret: d0eb9c52d0cd4311b6d252a951126bf9bea27ec05590bed8a394f0f792dcb2a4 labels: app: antrea @@ -7117,7 +7112,7 @@ spec: annotations: # Automatically restart Pod if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: 62fe59882b960435e6de67c414b3ea71463d9c1eb97a024a69dd0aa6e506deff + checksum/config: 6de7d12710db8233e2b3bc744a0e646aee919454499a28c6afd3755744d4bde8 labels: app: antrea component: antrea-controller diff --git a/build/yamls/antrea-windows-containerd-with-ovs.yml b/build/yamls/antrea-windows-containerd-with-ovs.yml index cca93bae5bd..d6da648470a 100644 --- a/build/yamls/antrea-windows-containerd-with-ovs.yml +++ b/build/yamls/antrea-windows-containerd-with-ovs.yml @@ -86,11 +86,6 @@ data: # Service traffic. # AntreaProxy: true - # Enable EndpointSlice support in AntreaProxy. Don't enable this feature unless that EndpointSlice - # API version v1beta1 is supported and set as enabled in Kubernetes. If AntreaProxy is not enabled, - # this flag will not take effect. - # EndpointSlice: true - # Enable NodePortLocal feature to make the Pods reachable externally through NodePort # NodePortLocal: true @@ -240,7 +235,7 @@ kind: ConfigMap metadata: labels: app: antrea - name: antrea-windows-config-cb2hmgg648 + name: antrea-windows-config-c2c7f4kbbc namespace: kube-system --- apiVersion: apps/v1 @@ -355,7 +350,7 @@ spec: operator: Exists volumes: - configMap: - name: antrea-windows-config-cb2hmgg648 + name: antrea-windows-config-c2c7f4kbbc name: antrea-windows-config - configMap: defaultMode: 420 diff --git a/build/yamls/antrea-windows-containerd.yml b/build/yamls/antrea-windows-containerd.yml index dab1040d477..2c2f06cd0f6 100644 --- a/build/yamls/antrea-windows-containerd.yml +++ b/build/yamls/antrea-windows-containerd.yml @@ -37,11 +37,6 @@ data: # Service traffic. # AntreaProxy: true - # Enable EndpointSlice support in AntreaProxy. Don't enable this feature unless that EndpointSlice - # API version v1beta1 is supported and set as enabled in Kubernetes. If AntreaProxy is not enabled, - # this flag will not take effect. - # EndpointSlice: true - # Enable NodePortLocal feature to make the Pods reachable externally through NodePort # NodePortLocal: true @@ -191,7 +186,7 @@ kind: ConfigMap metadata: labels: app: antrea - name: antrea-windows-config-cb2hmgg648 + name: antrea-windows-config-c2c7f4kbbc namespace: kube-system --- apiVersion: apps/v1 @@ -275,7 +270,7 @@ spec: operator: Exists volumes: - configMap: - name: antrea-windows-config-cb2hmgg648 + name: antrea-windows-config-c2c7f4kbbc name: antrea-windows-config - configMap: defaultMode: 420 diff --git a/build/yamls/antrea-windows.yml b/build/yamls/antrea-windows.yml index 2314e7bc529..f44ab0cbd4c 100644 --- a/build/yamls/antrea-windows.yml +++ b/build/yamls/antrea-windows.yml @@ -23,11 +23,6 @@ data: # Service traffic. # AntreaProxy: true - # Enable EndpointSlice support in AntreaProxy. Don't enable this feature unless that EndpointSlice - # API version v1beta1 is supported and set as enabled in Kubernetes. If AntreaProxy is not enabled, - # this flag will not take effect. - # EndpointSlice: true - # Enable NodePortLocal feature to make the Pods reachable externally through NodePort # NodePortLocal: true @@ -177,7 +172,7 @@ kind: ConfigMap metadata: labels: app: antrea - name: antrea-windows-config-cb2hmgg648 + name: antrea-windows-config-c2c7f4kbbc namespace: kube-system --- apiVersion: apps/v1 @@ -265,7 +260,7 @@ spec: operator: Exists volumes: - configMap: - name: antrea-windows-config-cb2hmgg648 + name: antrea-windows-config-c2c7f4kbbc name: antrea-windows-config - configMap: defaultMode: 420 diff --git a/build/yamls/antrea.yml b/build/yamls/antrea.yml index 42611ddb053..02340506ea5 100644 --- a/build/yamls/antrea.yml +++ b/build/yamls/antrea.yml @@ -5466,11 +5466,6 @@ data: # Service traffic. # AntreaProxy: true - # Enable EndpointSlice support in AntreaProxy. Don't enable this feature unless that EndpointSlice - # API version v1 is supported and set as enabled in Kubernetes. If AntreaProxy is not enabled, - # this flag will not take effect. - # EndpointSlice: true - # Enable TopologyAwareHints in AntreaProxy. This requires AntreaProxy and EndpointSlice to be # enabled, otherwise this flag will not take effect. # TopologyAwareHints: true @@ -6819,7 +6814,7 @@ spec: kubectl.kubernetes.io/default-container: antrea-agent # Automatically restart Pods with a RollingUpdate if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: 0916c9bded20cacbfe338c02c0128325d00b246fabb96488a95baa2a54ad7616 + checksum/config: 097c0152deaf8e5b6e6b832dd48a77e0e7334c887eabc112adee31deffed09bc labels: app: antrea component: antrea-agent @@ -7058,7 +7053,7 @@ spec: annotations: # Automatically restart Pod if the ConfigMap changes # See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments - checksum/config: 0916c9bded20cacbfe338c02c0128325d00b246fabb96488a95baa2a54ad7616 + checksum/config: 097c0152deaf8e5b6e6b832dd48a77e0e7334c887eabc112adee31deffed09bc labels: app: antrea component: antrea-controller diff --git a/build/yamls/windows/base/conf/antrea-agent.conf b/build/yamls/windows/base/conf/antrea-agent.conf index 966805518a5..82db62a0a83 100644 --- a/build/yamls/windows/base/conf/antrea-agent.conf +++ b/build/yamls/windows/base/conf/antrea-agent.conf @@ -5,11 +5,6 @@ featureGates: # Service traffic. # AntreaProxy: true -# Enable EndpointSlice support in AntreaProxy. Don't enable this feature unless that EndpointSlice -# API version v1beta1 is supported and set as enabled in Kubernetes. If AntreaProxy is not enabled, -# this flag will not take effect. -# EndpointSlice: true - # Enable NodePortLocal feature to make the Pods reachable externally through NodePort # NodePortLocal: true diff --git a/docs/feature-gates.md b/docs/feature-gates.md index dcd813ce9ef..a72d40959f4 100644 --- a/docs/feature-gates.md +++ b/docs/feature-gates.md @@ -35,7 +35,7 @@ edit the Agent configuration in the | Feature Name | Component | Default | Stage | Alpha Release | Beta Release | GA Release | Extra Requirements | Notes | |-------------------------------|--------------------|---------|-------|---------------|--------------|------------|--------------------|-----------------------------------------------| | `AntreaProxy` | Agent | `true` | Beta | v0.8 | v0.11 | N/A | Yes | Must be enabled for Windows. | -| `EndpointSlice` | Agent | `true` | Beta | v0.13.0 | v1.11 | N/A | Yes | | +| `EndpointSlice` | Agent | `true` | GA | v0.13.0 | v1.11 | v1.14 | Yes | | | `TopologyAwareHints` | Agent | `true` | Beta | v1.8 | v1.12 | N/A | Yes | | | `CleanupStaleUDPSvcConntrack` | Agent | `false` | Alpha | v1.13 | N/A | N/A | Yes | | | `LoadBalancerModeDSR` | Agent | `false` | Alpha | v1.13 | N/A | N/A | Yes | | @@ -101,7 +101,7 @@ for more information about TopologyAwareHints. #### Requirements for this Feature - `AntreaProxy` is enabled. -- `EndpointSlice` is enabled. +- EndpointSlice API version v1 is supported and set as enabled in Kubernetes. ### LoadBalancerModeDSR diff --git a/pkg/apiserver/handlers/featuregates/handler_test.go b/pkg/apiserver/handlers/featuregates/handler_test.go index 76c975b4668..38d9e002cfb 100644 --- a/pkg/apiserver/handlers/featuregates/handler_test.go +++ b/pkg/apiserver/handlers/featuregates/handler_test.go @@ -54,7 +54,7 @@ func Test_getGatesResponse(t *testing.T) { {Component: "agent", Name: "AntreaPolicy", Status: "Disabled", Version: "BETA"}, {Component: "agent", Name: "AntreaProxy", Status: "Enabled", Version: "BETA"}, {Component: "agent", Name: "Egress", Status: egressStatus, Version: "BETA"}, - {Component: "agent", Name: "EndpointSlice", Status: "Enabled", Version: "BETA"}, + {Component: "agent", Name: "EndpointSlice", Status: "Enabled"}, {Component: "agent", Name: "AntreaIPAM", Status: "Disabled", Version: "ALPHA"}, {Component: "agent", Name: "Traceflow", Status: "Enabled", Version: "BETA"}, {Component: "agent", Name: "FlowExporter", Status: "Disabled", Version: "ALPHA"}, diff --git a/pkg/features/antrea_features.go b/pkg/features/antrea_features.go index 056b50f5db4..85e52b324ef 100644 --- a/pkg/features/antrea_features.go +++ b/pkg/features/antrea_features.go @@ -38,6 +38,7 @@ const ( // alpha: v0.13 // beta: v1.11 + // GA: v1.14 // Enable EndpointSlice support in AntreaProxy. If AntreaProxy is not enabled, this // flag will not take effect. EndpointSlice featuregate.Feature = "EndpointSlice" @@ -155,7 +156,7 @@ var ( AntreaPolicy: {Default: true, PreRelease: featuregate.Beta}, AntreaProxy: {Default: true, PreRelease: featuregate.Beta}, Egress: {Default: true, PreRelease: featuregate.Beta}, - EndpointSlice: {Default: true, PreRelease: featuregate.Beta}, + EndpointSlice: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, TopologyAwareHints: {Default: true, PreRelease: featuregate.Beta}, CleanupStaleUDPSvcConntrack: {Default: false, PreRelease: featuregate.Alpha}, Traceflow: {Default: true, PreRelease: featuregate.Beta},