Skip to content

Commit 4a3b76c

Browse files
authored
Add an Helm chart for Antrea (#3578)
And use the Helm templates (instead of Kustomize) to generate the standard Antrea YAML manifests (which are checked-in and uploaded as release assets). Standard manifests are generated based on Helm values files located under build/yamls/chart-values/, using a new script (./hack/generate-standard-manifests.sh). It is much faster than the old version. While I believe that using Helm directly and specifying YAML values whenever a new manifest needs to be generated would be better, the ./hack/generate-manifest.sh script is kept as-is, but it now uses Helm instead of Kustomize. Documentation for the Helm chart is autogenerated using helm-docs. In a future PR, we will look into the release process for the Helm chart. After that, Helm charts could be added for Antrea components (Flow Aggregator, Flow visibility). For #2641 Signed-off-by: Antonin Bas <abas@vmware.com>
1 parent 14c0384 commit 4a3b76c

93 files changed

Lines changed: 20039 additions & 19748 deletions

File tree

Some content is hidden

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

.github/workflows/go.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,15 @@ jobs:
224224
run: |
225225
sudo npm install -g markdownlint-cli@0.31.1
226226
make markdownlint
227+
- name: Checking whether autogenerated Helm chart documentation is up-to-date
228+
working-directory: build/charts/
229+
run: |
230+
make helm-docs
231+
DIFF=$(git diff .)
232+
if [ -n "$DIFF" ]; then
233+
echo "The Helm chart documentation is out-of-date; please run 'make helm-docs' in 'build/charts/' and commit the changes"
234+
exit 1
235+
fi
227236
228237
benchmark:
229238
needs: check-changes

Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,7 @@ build-scale-simulator:
351351
.PHONY: manifest
352352
manifest:
353353
@echo "===> Generating dev manifest for Antrea <==="
354-
$(CURDIR)/hack/generate-manifest.sh --mode dev > build/yamls/antrea.yml
355-
$(CURDIR)/hack/generate-manifest.sh --mode dev --ipsec > build/yamls/antrea-ipsec.yml
356-
$(CURDIR)/hack/generate-manifest.sh --mode dev --cloud EKS --encap-mode networkPolicyOnly > build/yamls/antrea-eks.yml
357-
$(CURDIR)/hack/generate-manifest.sh --mode dev --cloud GKE --encap-mode noEncap > build/yamls/antrea-gke.yml
358-
$(CURDIR)/hack/generate-manifest.sh --mode dev --cloud AKS --encap-mode networkPolicyOnly > build/yamls/antrea-aks.yml
354+
$(CURDIR)/hack/generate-standard-manifests.sh --mode dev --out build/yamls
359355
$(CURDIR)/hack/generate-manifest-octant.sh --mode dev > build/yamls/antrea-octant.yml
360356
$(CURDIR)/hack/generate-manifest-windows.sh --mode dev > build/yamls/antrea-windows.yml
361357
$(CURDIR)/hack/generate-manifest-flow-aggregator.sh --mode dev > build/yamls/flow-aggregator.yml
@@ -439,12 +435,12 @@ toc:
439435
.PHONE: markdownlint
440436
markdownlint:
441437
@echo "===> Running markdownlint <==="
442-
markdownlint -c .markdownlint-config.yml -i CHANGELOG/ -i CHANGELOG.md -i hack/netpol -i CODE_OF_CONDUCT.md .
438+
markdownlint -c hack/.markdownlint-config.yml -p hack/.markdownlint-ignore .
443439

444440
.PHONE: markdownlint-fix
445441
markdownlint-fix:
446442
@echo "===> Running markdownlint <==="
447-
markdownlint --fix -c .markdownlint-config.yml -i CHANGELOG/ -i CHANGELOG.md -i hack/netpol -i CODE_OF_CONDUCT.md .
443+
markdownlint --fix -c hack/.markdownlint-config.yml -p hack/.markdownlint-ignore .
448444

449445
.PHONY: spelling-fix
450446
spelling-fix:

build/charts/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
USERID := $(shell id -u)
2+
GRPID := $(shell id -g)
3+
4+
.PHONY: helm-docs
5+
helm-docs:
6+
docker run --rm --volume "$(CURDIR):/helm-docs" --user=$(USERID):$(GRPID) jnorwood/helm-docs:v1.7.0

build/charts/antrea/.helmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

build/charts/antrea/Chart.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: v2
2+
name: antrea
3+
type: application
4+
displayName: Antrea
5+
home: https://antrea.io/
6+
version: 1.17.0-dev
7+
appVersion: 1.17.0-dev
8+
kubeVersion: ">= 1.16.0-0"
9+
icon: https://raw.githubusercontent.com/antrea-io/antrea/main/docs/assets/logo/antrea_logo.svg
10+
description: Kubernetes networking based on Open vSwitch
11+
keywords:
12+
- Kubernetes
13+
- CNCF
14+
- Networking
15+
- CNI
16+
- Security
17+
sources:
18+
- https://github.com/antrea-io/antrea

build/charts/antrea/README.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# antrea
2+
3+
![Version: 1.17.0-dev](https://img.shields.io/badge/Version-1.17.0--dev-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.17.0-dev](https://img.shields.io/badge/AppVersion-1.17.0--dev-informational?style=flat-square)
4+
5+
Kubernetes networking based on Open vSwitch
6+
7+
**Homepage:** <https://antrea.io/>
8+
9+
## Source Code
10+
11+
* <https://github.com/antrea-io/antrea>
12+
13+
## Requirements
14+
15+
Kubernetes: `>= 1.16.0-0`
16+
17+
## Values
18+
19+
| Key | Type | Default | Description |
20+
|-----|------|---------|-------------|
21+
| agent.affinity | object | `{}` | Affinity for the antrea-agent Pods. |
22+
| agent.antreaAgent.extraArgs | list | `[]` | Extra command-line arguments for antrea-agent. |
23+
| agent.antreaAgent.extraEnv | object | `{}` | Extra environment variables to be injected into antrea-agent. |
24+
| agent.antreaAgent.extraVolumeMounts | list | `[]` | Additional volumeMounts for the antrea-agent container. |
25+
| agent.antreaAgent.logFileMaxNum | int | `4` | Max number of log files. |
26+
| agent.antreaAgent.logFileMaxSize | int | `100` | Max size in MBs of any single log file. |
27+
| agent.antreaAgent.resources | object | `{"requests":{"cpu":"200m"}}` | Resource requests and limits for the antrea-agent container. |
28+
| agent.antreaIPsec.resources | object | `{"requests":{"cpu":"50m"}}` | Resource requests and limits for the antrea-ipsec container (when IPsec is enabled). |
29+
| agent.antreaOVS.extraArgs | list | `[]` | Extra command-line arguments for antrea-ovs. |
30+
| agent.antreaOVS.logFileMaxNum | int | `4` | Max number of log files. |
31+
| agent.antreaOVS.logFileMaxSize | int | `100` | Max size in MBs of any single log file. |
32+
| agent.antreaOVS.resources | object | `{"requests":{"cpu":"200m"}}` | Resource requests and limits for the antrea-ovs container. |
33+
| agent.apiPort | int | `10350` | Port for the antrea-agent APIServer to serve on. |
34+
| agent.dnsPolicy | string | `"ClusterFirstWithHostNet"` | DNS Policy for the antrea-agent Pods. |
35+
| agent.enablePrometheusMetrics | bool | `true` | Enable metrics exposure via Prometheus. |
36+
| agent.extraVolumes | list | `[]` | Additional volumes for antrea-agent Pods. |
37+
| agent.installCNI.resources | object | `{"requests":{"cpu":"100m"}}` | Resource requests and limits for the install-cni initContainer. |
38+
| agent.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node selector for the antrea-agent Pods. |
39+
| agent.podAnnotations | object | `{}` | Annotations to be added to antrea-agent Pods. |
40+
| agent.podLabels | object | `{}` | Labels to be added to antrea-agent Pods. |
41+
| agent.priorityClassName | string | `"system-node-critical"` | Prority class to use for the antrea-agent Pods. |
42+
| agent.tolerations | list | `[{"key":"CriticalAddonsOnly","operator":"Exists"},{"effect":"NoSchedule","operator":"Exists"},{"effect":"NoExecute","operator":"Exists"}]` | Tolerations for the antrea-agent Pods. |
43+
| agent.updateStrategy | object | `{"type":"RollingUpdate"}` | Update strategy for the antrea-agent DaemonSet. |
44+
| antreaProxy.nodePortAddresses | list | `[]` | String array of values which specifies the host IPv4/IPv6 addresses for NodePort. By default, all host addresses are used. |
45+
| antreaProxy.proxyAll | bool | `false` | Proxy all Service traffic, for all Service types, regardless of where it comes from. |
46+
| antreaProxy.proxyLoadBalancerIPs | bool | `true` | When set to false, AntreaProxy no longer load-balances traffic destined to the External IPs of LoadBalancer Services. |
47+
| antreaProxy.skipServices | list | `[]` | |
48+
| cni.hostBinPath | string | `"/opt/cni/bin"` | Installation path of CNI binaries on the host. |
49+
| cni.plugins | object | `{"bandwidth":true,"portmap":true}` | Chained plugins to use alongside antrea-cni. |
50+
| cni.skipBinaries | list | `[]` | CNI binaries shipped with Antrea for which installation should be skipped. |
51+
| controller.affinity | object | `{}` | Affinity for the antrea-controller Pod. |
52+
| controller.antreaController.extraArgs | list | `[]` | Extra command-line arguments for antrea-controller. |
53+
| controller.antreaController.extraEnv | object | `{}` | Extra environment variables to be injected into antrea-controller. |
54+
| controller.antreaController.logFileMaxNum | int | `4` | Max number of log files. |
55+
| controller.antreaController.logFileMaxSize | int | `100` | Max size in MBs of any single log file. |
56+
| controller.antreaController.resources | object | `{"requests":{"cpu":"200m"}}` | Resource requests and limits for the antrea-controller container. |
57+
| controller.apiPort | int | `10349` | Port for the antrea-controller APIServer to serve on. |
58+
| controller.enablePrometheusMetrics | bool | `true` | Enable metrics exposure via Prometheus. |
59+
| controller.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node selector for the antrea-controller Pod. |
60+
| controller.podAnnotations | object | `{}` | Annotations to be added to antrea-controller Pod. |
61+
| controller.podLabels | object | `{}` | Labels to be added to antrea-controller Pod. |
62+
| controller.priorityClassName | string | `"system-cluster-critical"` | Prority class to use for the antrea-controller Pod. |
63+
| controller.selfSignedCert | bool | `true` | Indicates whether to use auto-generated self-signed TLS certificates. If false, a Secret named "antrea-controller-tls" must be provided with the following keys: ca.crt, tls.crt, tls.key. |
64+
| controller.tolerations | list | `[{"key":"CriticalAddonsOnly","operator":"Exists"},{"effect":"NoSchedule","key":"node-role.kubernetes.io/master"}]` | Tolerations for the antrea-controller Pod. |
65+
| defaultMTU | int | `0` | Default MTU to use for the host gateway interface and the network interface of each Pod. By default, antrea-agent will discover the MTU of the Node's primary interface and adjust it to accommodate for tunnel encapsulation overhead if applicable. |
66+
| egress.exceptCIDRs | list | `[]` | CIDR ranges to which outbound Pod traffic will not be SNAT'd by Egresses. |
67+
| enableBridgingMode | bool | `false` | Enable bridging mode of Pod network on Nodes, in which the Node's transport interface is connected to the OVS bridge. |
68+
| featureGates | object | `{}` | To explicitly enable or disable a FeatureGate and bypass the Antrea defaults, add an entry to the dictionary with the FeatureGate's name as the key and a boolean as the value. |
69+
| flowCollector.activeFlowExportTimeout | string | `"5s"` | timeout after which a flow record is sent to the collector for active flows. |
70+
| flowCollector.collectorAddr | string | `"flow-aggregator.flow-aggregator.svc:4739:tls"` | IPFIX collector address as a string with format <HOST>:[<PORT>][:<PROTO>]. |
71+
| flowCollector.flowPollInterval | string | `"5s"` | Determines how often the flow exporter polls for new connections. |
72+
| flowCollector.idleFlowExportTimeout | string | `"15s"` | timeout after which a flow record is sent to the collector for idle flows. |
73+
| hostGateway | string | `"antrea-gw0"` | Name of the interface antrea-agent will create and use for host <-> Pod communication. |
74+
| image | object | `{"pullPolicy":"IfNotPresent","repository":"projects.registry.vmware.com/antrea/antrea-ubuntu","tag":"latest"}` | Container image to use for Antrea components. |
75+
| ipsec.psk | string | `"changeme"` | Preshared Key (PSK) for IKE authentication. It will be stored in a secret and passed to antrea-agent as an environment variable. |
76+
| kubeAPIServerOverride | string | `""` | Address of Kubernetes apiserver, to override any value provided in kubeconfig or InClusterConfig. |
77+
| logVerbosity | int | `0` | |
78+
| multicastInterfaces | list | `[]` | Names of the interfaces on Nodes that are used to forward multicast traffic. |
79+
| noSNAT | bool | `false` | Whether or not to SNAT (using the Node IP) the egress traffic from a Pod to the external network. |
80+
| nodeIPAM.clusterCIDRs | list | `[]` | CIDR ranges to use when allocating Pod IP addresses. |
81+
| nodeIPAM.enable | bool | `false` | Enable Node IPAM in Antrea |
82+
| nodeIPAM.nodeCIDRMaskSizeIPv4 | int | `24` | Mask size for IPv4 Node CIDR in IPv4 or dual-stack cluster. |
83+
| nodeIPAM.nodeCIDRMaskSizeIPv6 | int | `64` | Mask size for IPv6 Node CIDR in IPv6 or dual-stack cluster. |
84+
| nodeIPAM.serviceCIDR | string | `""` | IPv4 CIDR ranges reserved for Services. |
85+
| nodeIPAM.serviceCIDRv6 | string | `""` | IPv6 CIDR ranges reserved for Services. |
86+
| nodePortLocal.enable | bool | `false` | Enable the NodePortLocal feature. |
87+
| nodePortLocal.portRange | string | `"61000-62000"` | Port range used by NodePortLocal when creating Pod port mappings. |
88+
| ovs.bridgeName | string | `"br-int"` | Name of the OVS bridge antrea-agent will create and use. |
89+
| ovs.hwOffload | bool | `false` | Enable hardware offload for the OVS bridge (required additional configuration). |
90+
| serviceCIDR | string | `""` | IPv4 CIDR range used for Services. Required when AntreaProxy is disabled. |
91+
| serviceCIDRv6 | string | `""` | IPv6 CIDR range used for Services. Required when AntreaProxy is disabled. |
92+
| testing.coverage | bool | `false` | |
93+
| testing.simulator.enable | bool | `false` | |
94+
| tlsCipherSuites | string | `""` | Comma-separated list of cipher suites that will be used by the Antrea APIservers. If empty, the default Go Cipher Suites will be used. See https://golang.org/pkg/crypto/tls/#pkg-constants. |
95+
| tlsMinVersion | string | `""` | TLS min version from: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13. |
96+
| trafficEncapMode | string | `"encap"` | Determines how traffic is encapsulated. It must be one of "encap", "noEncap", "hybrid", or "networkPolicyOnly". |
97+
| trafficEncryptionMode | string | `"none"` | Determines how tunnel traffic is encrypted. Currently encryption only works with encap mode.It must be one of "none", "ipsec", "wireGuard". |
98+
| transportInterface | string | `""` | Name of the interface on Node which is used for tunneling or routing the traffic across Nodes. |
99+
| transportInterfaceCIDRs | list | `[]` | Network CIDRs of the interface on Node which is used for tunneling or routing the traffic across Nodes. |
100+
| tunnelType | string | `"geneve"` | Tunnel protocol used for encapsulating traffic across Nodes. It must be one of "geneve", "vxlan", "gre", "stt". |
101+
| webhooks.labelsMutator.enable | bool | `false` | |
102+
| whereabouts.enable | bool | `false` | |
103+
| wireGuard.port | int | `51820` | Port for WireGuard to send and receive traffic. |
104+
105+
----------------------------------------------
106+
Autogenerated from chart metadata using [helm-docs v1.7.0](https://github.com/norwoodj/helm-docs/releases/v1.7.0)

0 commit comments

Comments
 (0)