Skip to content

Commit 75a7bea

Browse files
committed
Evolve AntreaProxy with framework and feature updates
This commit brings AntreaProxy: - Add `serviceProxyHealthy` field to Service health check response in AntreaProxy. - Add healthz server serving on port 10352 to AntreaProxy, which is a replacement of kube-proxy health server serving on 10256. - Add support of feature gate PreferSameTrafficDistribution in AntreaProxy. Refer to this https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/3015-prefer-same-node. - Remove Endpoints API support in AntreaProxy. - Align the code `third_party/proxy` with K8s 1.33.1. Signed-off-by: Hongliang Liu <[email protected]>
1 parent 4f05458 commit 75a7bea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+4052
-3262
lines changed

build/charts/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ VERSION := $(shell head -n 1 ../../VERSION | cut -c 2-)
66
.PHONY: helm-docs
77
helm-docs:
88
docker run --rm --volume "$(CURDIR):/helm-docs" --user=$(USERID):$(GRPID) jnorwood/helm-docs:v1.14.2
9-
sed -i.bak "s/0\.0\.0/$(VERSION)/g" antrea/README.md # replace version placeholder
9+
sed -i.bak "s/0.0.0.0:10352/placeholder/g" antrea/README.md # avoid "0.0.0" is replaced by $VERSION
10+
sed -i.bak "s/0.0.0/$(VERSION)/g" antrea/README.md # replace version placeholder
11+
sed -i.bak "s/placeholder/0.0.0.0:10352/g" antrea/README.md
1012
sed -i.bak "s/-dev-informational/--dev-informational/g" antrea/README.md # fix img.shields.io badge URLs
11-
sed -i.bak "s/0\.0\.0/$(VERSION)/g" flow-aggregator/README.md # replace version placeholder
12-
sed -i.bak "s/-dev-informational/--dev-informational/g" flow-aggregator/README.md # fix img.shields.io badge URLs
13+
sed -i.bak "s/0.0.0/$(VERSION)/g" flow-aggregator/README.md # replace version placeholder
14+
sed -i.bak "s/0.0.0/$(VERSION)/g" antrea-windows/README.md # replace version placeholder
15+
sed -i.bak "s/-dev-informational/--dev-informational/g" flow-aggregator/README.md # fix img.shields.io badge URLs

build/charts/antrea-windows/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# antrea-windows
22

3-
![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
3+
![Version: 2.5.0-dev](https://img.shields.io/badge/Version-2.5.0-dev-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
44

55
Kubernetes networking based on Open vSwitch for Windows Nodes
66

build/charts/antrea/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Kubernetes: `>= 1.19.0-0`
6161
| antreaProxy.nodePortAddresses | list | `[]` | String array of values which specifies the host IPv4/IPv6 addresses for NodePort. By default, all host addresses are used. |
6262
| antreaProxy.proxyAll | bool | `false` | Proxy all Service traffic, for all Service types, regardless of where it comes from. |
6363
| antreaProxy.proxyLoadBalancerIPs | bool | `true` | When set to false, AntreaProxy no longer load-balances traffic destined to the External IPs of LoadBalancer Services. |
64+
| antreaProxy.serviceHealthCheckServerBindAddress | string | `""` | The value of the IP address and the port that the AntreaProxy health server binds to. If it is not specified, it will be automatically set to "0.0.0.0:10352" for IPv4-only clusters, or "[::]:10352" for IPv6-only and dual-stack clusters. Note that "[::]:10352" may act as either IPv6-only or dual-stack depending on the system setting of IPV6_V6ONLY (sysctl: net.ipv6.bindv6only). |
6465
| antreaProxy.serviceProxyName | string | `""` | The value of the "service.kubernetes.io/service-proxy-name" label for AntreaProxy to match. If it is set, then AntreaProxy will only handle Services with the label that equals the provided value. If it is not set, then AntreaProxy will only handle Services without the "service.kubernetes.io/service-proxy-name" label, but ignore Services with the label no matter what is the value. |
6566
| antreaProxy.skipServices | list | `[]` | List of Services which should be ignored by AntreaProxy. |
6667
| auditLogging.compress | bool | `true` | Compress enables gzip compression on rotated files. |

build/charts/antrea/conf/antrea-agent.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ featureGates:
66
# AllBeta is a global toggle for beta features. Per-feature key values override the default set by AllBeta.
77
{{- include "featureGate" (dict "featureGates" .Values.featureGates "name" "AllBeta" "default" false) }}
88

9+
# Enable PreferSameTrafficDistribution in AntreaProxy, allowing usage of the values PreferSameZone and PreferSameNode in
10+
# the Service trafficDistribution field.
11+
{{- include "featureGate" (dict "featureGates" .Values.featureGates "name" "PreferSameTrafficDistribution" "default" false) }}
12+
913
# Enable support for cleaning up stale UDP Service conntrack connections in AntreaProxy. This requires AntreaProxy to
1014
# be enabled, otherwise this flag will not take effect.
1115
{{- include "featureGate" (dict "featureGates" .Values.featureGates "name" "CleanupStaleUDPSvcConntrack" "default" true) }}
@@ -425,6 +429,12 @@ antreaProxy:
425429
# enabled. This avoids race conditions between kube-proxy and Antrea proxy, with both trying to
426430
# bind to the same addresses, when proxyAll is enabled while kube-proxy has not been removed.
427431
disableServiceHealthCheckServer: {{ .disableServiceHealthCheckServer }}
432+
# The value of the IP address and the port that the AntreaProxy health server binds to. If it is not specified,
433+
# it will be automatically set to "0.0.0.0:10352" for IPv4-only clusters, or "[::]10352" for IPv6-only and dual-stack
434+
# clusters. Note that "[::]10352" may act as either IPv6-only or dual-stack depending on the system setting of
435+
# IPV6_V6ONLY (sysctl: net.ipv6.bindv6only).
436+
serviceHealthCheckServerBindAddress: {{ .serviceHealthCheckServerBindAddress | quote }}
437+
428438
{{- end }}
429439

430440
# IPsec tunnel related configurations.

build/charts/antrea/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ antreaProxy:
165165
# and Antrea proxy, with both trying to bind to the same addresses, when proxyAll
166166
# is enabled while kube-proxy has not been removed.
167167
disableServiceHealthCheckServer: false
168+
# -- The value of the IP address and the port that the AntreaProxy health server binds to. If it is not specified,
169+
# it will be automatically set to "0.0.0.0:10352" for IPv4-only clusters, or "[::]:10352" for IPv6-only and dual-stack
170+
# clusters. Note that "[::]:10352" may act as either IPv6-only or dual-stack depending on the system setting of
171+
# IPV6_V6ONLY (sysctl: net.ipv6.bindv6only).
172+
serviceHealthCheckServerBindAddress: ""
168173

169174
nodeIPAM:
170175
# -- Enable Node IPAM in Antrea

build/charts/flow-aggregator/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Kubernetes: `>= 1.19.0-0`
7777
| s3Uploader.bucketPrefix | string | `""` | BucketPrefix is the prefix ("folder") under which flow records will be uploaded. |
7878
| s3Uploader.compress | bool | `true` | Compress enables gzip compression when uploading files to S3. |
7979
| s3Uploader.enable | bool | `false` | Determine whether to enable exporting flow records to AWS S3. |
80-
| s3Uploader.maxRecordsPerFile | int | `1000000` | MaxRecordsPerFile is the maximum number of records per file uploaded. It is not recommended to change this value. |
80+
| s3Uploader.maxRecordsPerFile | int | `12.5.0-dev0` | MaxRecordsPerFile is the maximum number of records per file uploaded. It is not recommended to change this value. |
8181
| s3Uploader.recordFormat | string | `"CSV"` | RecordFormat defines the format of the flow records uploaded to S3. Only "CSV" is supported at the moment. |
8282
| s3Uploader.region | string | `"us-west-2"` | Region is used as a "hint" to get the region in which the provided bucket is located. An error will occur if the bucket does not exist in the AWS partition the region hint belongs to. |
8383
| s3Uploader.uploadInterval | string | `"60s"` | UploadInterval is the duration between each file upload to S3. |

build/yamls/antrea-aks.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4139,6 +4139,10 @@ data:
41394139
# AllBeta is a global toggle for beta features. Per-feature key values override the default set by AllBeta.
41404140
# AllBeta: false
41414141
4142+
# Enable PreferSameTrafficDistribution in AntreaProxy, allowing usage of the values PreferSameZone and PreferSameNode in
4143+
# the Service trafficDistribution field.
4144+
# PreferSameTrafficDistribution: false
4145+
41424146
# Enable support for cleaning up stale UDP Service conntrack connections in AntreaProxy. This requires AntreaProxy to
41434147
# be enabled, otherwise this flag will not take effect.
41444148
# CleanupStaleUDPSvcConntrack: true
@@ -4524,6 +4528,11 @@ data:
45244528
# enabled. This avoids race conditions between kube-proxy and Antrea proxy, with both trying to
45254529
# bind to the same addresses, when proxyAll is enabled while kube-proxy has not been removed.
45264530
disableServiceHealthCheckServer: false
4531+
# The value of the IP address and the port that the AntreaProxy health server binds to. If it is not specified,
4532+
# it will be automatically set to "0.0.0.0:10352" for IPv4-only clusters, or "[::]10352" for IPv6-only and dual-stack
4533+
# clusters. Note that "[::]10352" may act as either IPv6-only or dual-stack depending on the system setting of
4534+
# IPV6_V6ONLY (sysctl: net.ipv6.bindv6only).
4535+
serviceHealthCheckServerBindAddress: ""
45274536
45284537
# IPsec tunnel related configurations.
45294538
ipsec:
@@ -5623,7 +5632,7 @@ spec:
56235632
kubectl.kubernetes.io/default-container: antrea-agent
56245633
# Automatically restart Pods with a RollingUpdate if the ConfigMap changes
56255634
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
5626-
checksum/config: 57f02660c27175cf8cec0d665db7e91883d3d241ade3ed77d710ee98f5e3fe40
5635+
checksum/config: 94b6588150d359aaea00c29a571d77cdc57e99dcaf1da34ddb0e6f21b866bf2f
56275636
labels:
56285637
app: antrea
56295638
component: antrea-agent
@@ -5871,7 +5880,7 @@ spec:
58715880
annotations:
58725881
# Automatically restart Pod if the ConfigMap changes
58735882
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
5874-
checksum/config: 57f02660c27175cf8cec0d665db7e91883d3d241ade3ed77d710ee98f5e3fe40
5883+
checksum/config: 94b6588150d359aaea00c29a571d77cdc57e99dcaf1da34ddb0e6f21b866bf2f
58755884
labels:
58765885
app: antrea
58775886
component: antrea-controller

build/yamls/antrea-eks.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4135,6 +4135,10 @@ data:
41354135
# AllBeta is a global toggle for beta features. Per-feature key values override the default set by AllBeta.
41364136
# AllBeta: false
41374137
4138+
# Enable PreferSameTrafficDistribution in AntreaProxy, allowing usage of the values PreferSameZone and PreferSameNode in
4139+
# the Service trafficDistribution field.
4140+
# PreferSameTrafficDistribution: false
4141+
41384142
# Enable support for cleaning up stale UDP Service conntrack connections in AntreaProxy. This requires AntreaProxy to
41394143
# be enabled, otherwise this flag will not take effect.
41404144
# CleanupStaleUDPSvcConntrack: true
@@ -4520,6 +4524,11 @@ data:
45204524
# enabled. This avoids race conditions between kube-proxy and Antrea proxy, with both trying to
45214525
# bind to the same addresses, when proxyAll is enabled while kube-proxy has not been removed.
45224526
disableServiceHealthCheckServer: false
4527+
# The value of the IP address and the port that the AntreaProxy health server binds to. If it is not specified,
4528+
# it will be automatically set to "0.0.0.0:10352" for IPv4-only clusters, or "[::]10352" for IPv6-only and dual-stack
4529+
# clusters. Note that "[::]10352" may act as either IPv6-only or dual-stack depending on the system setting of
4530+
# IPV6_V6ONLY (sysctl: net.ipv6.bindv6only).
4531+
serviceHealthCheckServerBindAddress: ""
45234532
45244533
# IPsec tunnel related configurations.
45254534
ipsec:
@@ -5619,7 +5628,7 @@ spec:
56195628
kubectl.kubernetes.io/default-container: antrea-agent
56205629
# Automatically restart Pods with a RollingUpdate if the ConfigMap changes
56215630
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
5622-
checksum/config: 57f02660c27175cf8cec0d665db7e91883d3d241ade3ed77d710ee98f5e3fe40
5631+
checksum/config: 94b6588150d359aaea00c29a571d77cdc57e99dcaf1da34ddb0e6f21b866bf2f
56235632
labels:
56245633
app: antrea
56255634
component: antrea-agent
@@ -5868,7 +5877,7 @@ spec:
58685877
annotations:
58695878
# Automatically restart Pod if the ConfigMap changes
58705879
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
5871-
checksum/config: 57f02660c27175cf8cec0d665db7e91883d3d241ade3ed77d710ee98f5e3fe40
5880+
checksum/config: 94b6588150d359aaea00c29a571d77cdc57e99dcaf1da34ddb0e6f21b866bf2f
58725881
labels:
58735882
app: antrea
58745883
component: antrea-controller

build/yamls/antrea-gke.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4135,6 +4135,10 @@ data:
41354135
# AllBeta is a global toggle for beta features. Per-feature key values override the default set by AllBeta.
41364136
# AllBeta: false
41374137
4138+
# Enable PreferSameTrafficDistribution in AntreaProxy, allowing usage of the values PreferSameZone and PreferSameNode in
4139+
# the Service trafficDistribution field.
4140+
# PreferSameTrafficDistribution: false
4141+
41384142
# Enable support for cleaning up stale UDP Service conntrack connections in AntreaProxy. This requires AntreaProxy to
41394143
# be enabled, otherwise this flag will not take effect.
41404144
# CleanupStaleUDPSvcConntrack: true
@@ -4520,6 +4524,11 @@ data:
45204524
# enabled. This avoids race conditions between kube-proxy and Antrea proxy, with both trying to
45214525
# bind to the same addresses, when proxyAll is enabled while kube-proxy has not been removed.
45224526
disableServiceHealthCheckServer: false
4527+
# The value of the IP address and the port that the AntreaProxy health server binds to. If it is not specified,
4528+
# it will be automatically set to "0.0.0.0:10352" for IPv4-only clusters, or "[::]10352" for IPv6-only and dual-stack
4529+
# clusters. Note that "[::]10352" may act as either IPv6-only or dual-stack depending on the system setting of
4530+
# IPV6_V6ONLY (sysctl: net.ipv6.bindv6only).
4531+
serviceHealthCheckServerBindAddress: ""
45234532
45244533
# IPsec tunnel related configurations.
45254534
ipsec:
@@ -5610,7 +5619,7 @@ spec:
56105619
kubectl.kubernetes.io/default-container: antrea-agent
56115620
# Automatically restart Pods with a RollingUpdate if the ConfigMap changes
56125621
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
5613-
checksum/config: da05c6a135078734144b39bec8201adac80e58264879d2787f22c4c850d0400a
5622+
checksum/config: 98a70175f53cf47222530a3e5a9173fe143c9ec95daadd20cd1ba1a4239c6e47
56145623
labels:
56155624
app: antrea
56165625
component: antrea-agent
@@ -5856,7 +5865,7 @@ spec:
58565865
annotations:
58575866
# Automatically restart Pod if the ConfigMap changes
58585867
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
5859-
checksum/config: da05c6a135078734144b39bec8201adac80e58264879d2787f22c4c850d0400a
5868+
checksum/config: 98a70175f53cf47222530a3e5a9173fe143c9ec95daadd20cd1ba1a4239c6e47
58605869
labels:
58615870
app: antrea
58625871
component: antrea-controller

build/yamls/antrea-ipsec.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4148,6 +4148,10 @@ data:
41484148
# AllBeta is a global toggle for beta features. Per-feature key values override the default set by AllBeta.
41494149
# AllBeta: false
41504150
4151+
# Enable PreferSameTrafficDistribution in AntreaProxy, allowing usage of the values PreferSameZone and PreferSameNode in
4152+
# the Service trafficDistribution field.
4153+
# PreferSameTrafficDistribution: false
4154+
41514155
# Enable support for cleaning up stale UDP Service conntrack connections in AntreaProxy. This requires AntreaProxy to
41524156
# be enabled, otherwise this flag will not take effect.
41534157
# CleanupStaleUDPSvcConntrack: true
@@ -4533,6 +4537,11 @@ data:
45334537
# enabled. This avoids race conditions between kube-proxy and Antrea proxy, with both trying to
45344538
# bind to the same addresses, when proxyAll is enabled while kube-proxy has not been removed.
45354539
disableServiceHealthCheckServer: false
4540+
# The value of the IP address and the port that the AntreaProxy health server binds to. If it is not specified,
4541+
# it will be automatically set to "0.0.0.0:10352" for IPv4-only clusters, or "[::]10352" for IPv6-only and dual-stack
4542+
# clusters. Note that "[::]10352" may act as either IPv6-only or dual-stack depending on the system setting of
4543+
# IPV6_V6ONLY (sysctl: net.ipv6.bindv6only).
4544+
serviceHealthCheckServerBindAddress: ""
45364545
45374546
# IPsec tunnel related configurations.
45384547
ipsec:
@@ -5623,7 +5632,7 @@ spec:
56235632
kubectl.kubernetes.io/default-container: antrea-agent
56245633
# Automatically restart Pods with a RollingUpdate if the ConfigMap changes
56255634
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
5626-
checksum/config: a7959b53cad321c489dc702dfd46ca38cc648c22c35224cded1d3f5791d12313
5635+
checksum/config: 24994b82cfcb5a9cbf05108b5bb2d4376891d6b1c3b823ec1639604ad5982711
56275636
checksum/ipsec-secret: d0eb9c52d0cd4311b6d252a951126bf9bea27ec05590bed8a394f0f792dcb2a4
56285637
labels:
56295638
app: antrea
@@ -5915,7 +5924,7 @@ spec:
59155924
annotations:
59165925
# Automatically restart Pod if the ConfigMap changes
59175926
# See https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments
5918-
checksum/config: a7959b53cad321c489dc702dfd46ca38cc648c22c35224cded1d3f5791d12313
5927+
checksum/config: 24994b82cfcb5a9cbf05108b5bb2d4376891d6b1c3b823ec1639604ad5982711
59195928
labels:
59205929
app: antrea
59215930
component: antrea-controller

0 commit comments

Comments
 (0)