diff --git a/.github/workflows/kind.yml b/.github/workflows/kind.yml index 830ac302b5c..669216825a8 100755 --- a/.github/workflows/kind.yml +++ b/.github/workflows/kind.yml @@ -54,8 +54,8 @@ jobs: run: | ./ci/kind/test-e2e-kind.sh --encap-mode encap - test-e2e-encap-proxy: - name: E2e tests on a Kind cluster on Linux with proxy enabled + test-e2e-encap-all-alpha-agent: + name: E2e tests on a Kind cluster on Linux with all alpha features enabled on agent needs: build-antrea-image runs-on: [ubuntu-18.04] steps: @@ -83,7 +83,7 @@ jobs: sudo mv kind /usr/local/bin - name: Run e2e tests run: | - ./ci/kind/test-e2e-kind.sh --encap-mode encap --proxy + ./ci/kind/test-e2e-kind.sh --encap-mode encap --all-alpha-agent test-e2e-noencap: name: E2e tests on a Kind cluster on Linux (noEncap) @@ -116,8 +116,8 @@ jobs: run: | ./ci/kind/test-e2e-kind.sh --encap-mode noEncap - test-e2e-noencap-proxy: - name: E2e tests on a Kind cluster on Linux (noEncap) with proxy enabled + test-e2e-noencap-all-alpha-agent: + name: E2e tests on a Kind cluster on Linux (noEncap) with all alpha features enabled on agent needs: build-antrea-image runs-on: [ubuntu-18.04] steps: @@ -145,7 +145,7 @@ jobs: sudo mv kind /usr/local/bin - name: Run e2e tests run: | - ./ci/kind/test-e2e-kind.sh --encap-mode noEncap --proxy + ./ci/kind/test-e2e-kind.sh --encap-mode noEncap --all-alpha-agent test-e2e-hybrid: name: E2e tests on a Kind cluster on Linux (hybrid) @@ -178,8 +178,8 @@ jobs: run: | ./ci/kind/test-e2e-kind.sh --encap-mode hybrid - test-e2e-hybrid-proxy: - name: E2e tests on a Kind cluster on Linux (hybrid) with proxy enabled + test-e2e-hybrid-all-alpha-agent: + name: E2e tests on a Kind cluster on Linux (hybrid) with all alpha features enabled on agent needs: build-antrea-image runs-on: [ubuntu-18.04] steps: @@ -207,7 +207,7 @@ jobs: sudo mv kind /usr/local/bin - name: Run e2e tests run: | - ./ci/kind/test-e2e-kind.sh --encap-mode hybrid --proxy + ./ci/kind/test-e2e-kind.sh --encap-mode hybrid --all-alpha-agent test-e2e-encap-np: name: E2e tests on a Kind cluster on Linux with Antrea NetworkPolicies enabled diff --git a/build/yamls/antrea-eks.yml b/build/yamls/antrea-eks.yml index 45f2fd02e75..6090d200fb6 100644 --- a/build/yamls/antrea-eks.yml +++ b/build/yamls/antrea-eks.yml @@ -519,6 +519,9 @@ data: antrea-agent.conf: | # FeatureGates is a map of feature names to bools that enable or disable experimental features. featureGates: + # Enable all alpha features in feature gate map. + # See https://github.com/vmware-tanzu/antrea/blob/master/docs/feature-gates.md for list of alpha features. + # AllAlpha: false # Enable antrea proxy which provides ServiceLB for in-cluster services in antrea agent. # It should be enabled on Windows, otherwise NetworkPolicy will not take effect on # Service traffic. @@ -627,7 +630,7 @@ metadata: annotations: {} labels: app: antrea - name: antrea-config-9cf7tk2d9b + name: antrea-config-d762fckf2f namespace: kube-system --- apiVersion: v1 @@ -733,7 +736,7 @@ spec: key: node-role.kubernetes.io/master volumes: - configMap: - name: antrea-config-9cf7tk2d9b + name: antrea-config-d762fckf2f name: antrea-config - name: antrea-controller-tls secret: @@ -950,7 +953,7 @@ spec: operator: Exists volumes: - configMap: - name: antrea-config-9cf7tk2d9b + name: antrea-config-d762fckf2f name: antrea-config - hostPath: path: /etc/cni/net.d diff --git a/build/yamls/antrea-gke.yml b/build/yamls/antrea-gke.yml index 4e25e25c95e..61c75fae090 100644 --- a/build/yamls/antrea-gke.yml +++ b/build/yamls/antrea-gke.yml @@ -519,6 +519,9 @@ data: antrea-agent.conf: | # FeatureGates is a map of feature names to bools that enable or disable experimental features. featureGates: + # Enable all alpha features in feature gate map. + # See https://github.com/vmware-tanzu/antrea/blob/master/docs/feature-gates.md for list of alpha features. + # AllAlpha: false # Enable antrea proxy which provides ServiceLB for in-cluster services in antrea agent. # It should be enabled on Windows, otherwise NetworkPolicy will not take effect on # Service traffic. @@ -627,7 +630,7 @@ metadata: annotations: {} labels: app: antrea - name: antrea-config-mggd25d555 + name: antrea-config-dfk6942486 namespace: kube-system --- apiVersion: v1 @@ -733,7 +736,7 @@ spec: key: node-role.kubernetes.io/master volumes: - configMap: - name: antrea-config-mggd25d555 + name: antrea-config-dfk6942486 name: antrea-config - name: antrea-controller-tls secret: @@ -948,7 +951,7 @@ spec: operator: Exists volumes: - configMap: - name: antrea-config-mggd25d555 + name: antrea-config-dfk6942486 name: antrea-config - hostPath: path: /etc/cni/net.d diff --git a/build/yamls/antrea-ipsec.yml b/build/yamls/antrea-ipsec.yml index 1c5405c896e..1d42407ad24 100644 --- a/build/yamls/antrea-ipsec.yml +++ b/build/yamls/antrea-ipsec.yml @@ -519,6 +519,9 @@ data: antrea-agent.conf: | # FeatureGates is a map of feature names to bools that enable or disable experimental features. featureGates: + # Enable all alpha features in feature gate map. + # See https://github.com/vmware-tanzu/antrea/blob/master/docs/feature-gates.md for list of alpha features. + # AllAlpha: false # Enable antrea proxy which provides ServiceLB for in-cluster services in antrea agent. # It should be enabled on Windows, otherwise NetworkPolicy will not take effect on # Service traffic. @@ -627,7 +630,7 @@ metadata: annotations: {} labels: app: antrea - name: antrea-config-ch9mhb526k + name: antrea-config-9fm666d945 namespace: kube-system --- apiVersion: v1 @@ -742,7 +745,7 @@ spec: key: node-role.kubernetes.io/master volumes: - configMap: - name: antrea-config-ch9mhb526k + name: antrea-config-9fm666d945 name: antrea-config - name: antrea-controller-tls secret: @@ -992,7 +995,7 @@ spec: operator: Exists volumes: - configMap: - name: antrea-config-ch9mhb526k + name: antrea-config-9fm666d945 name: antrea-config - hostPath: path: /etc/cni/net.d diff --git a/build/yamls/antrea.yml b/build/yamls/antrea.yml index 7a989be3b15..b3bffaa9dfd 100644 --- a/build/yamls/antrea.yml +++ b/build/yamls/antrea.yml @@ -519,6 +519,9 @@ data: antrea-agent.conf: | # FeatureGates is a map of feature names to bools that enable or disable experimental features. featureGates: + # Enable all alpha features in feature gate map. + # See https://github.com/vmware-tanzu/antrea/blob/master/docs/feature-gates.md for list of alpha features. + # AllAlpha: false # Enable antrea proxy which provides ServiceLB for in-cluster services in antrea agent. # It should be enabled on Windows, otherwise NetworkPolicy will not take effect on # Service traffic. @@ -627,7 +630,7 @@ metadata: annotations: {} labels: app: antrea - name: antrea-config-btd998c7bt + name: antrea-config-59d62hh9h9 namespace: kube-system --- apiVersion: v1 @@ -733,7 +736,7 @@ spec: key: node-role.kubernetes.io/master volumes: - configMap: - name: antrea-config-btd998c7bt + name: antrea-config-59d62hh9h9 name: antrea-config - name: antrea-controller-tls secret: @@ -948,7 +951,7 @@ spec: operator: Exists volumes: - configMap: - name: antrea-config-btd998c7bt + name: antrea-config-59d62hh9h9 name: antrea-config - hostPath: path: /etc/cni/net.d diff --git a/build/yamls/base/conf/antrea-agent.conf b/build/yamls/base/conf/antrea-agent.conf index e373043dd58..1b4b5e1623f 100644 --- a/build/yamls/base/conf/antrea-agent.conf +++ b/build/yamls/base/conf/antrea-agent.conf @@ -1,5 +1,8 @@ # FeatureGates is a map of feature names to bools that enable or disable experimental features. featureGates: +# Enable all alpha features in feature gate map. +# See https://github.com/vmware-tanzu/antrea/blob/master/docs/feature-gates.md for list of alpha features. +# AllAlpha: false # Enable antrea proxy which provides ServiceLB for in-cluster services in antrea agent. # It should be enabled on Windows, otherwise NetworkPolicy will not take effect on # Service traffic. diff --git a/ci/kind/test-e2e-kind.sh b/ci/kind/test-e2e-kind.sh index c40d26ae10f..dd52506692e 100755 --- a/ci/kind/test-e2e-kind.sh +++ b/ci/kind/test-e2e-kind.sh @@ -22,9 +22,9 @@ function echoerr { >&2 echo "$@" } -_usage="Usage: $0 [--encap-mode ] [--proxy] [--np] [--help|-h] +_usage="Usage: $0 [--encap-mode ] [--all-alpha-agent] [--np] [--help|-h] --encap-mode Traffic encapsulation mode. (default is 'encap') - --proxy Enables Antrea proxy. + --all-alpha-agent Enables all alpha features on Antrea Agent in feature gate map. --np Enables Namespaced Antrea NetworkPolicy CRDs and ClusterNetworkPolicy related CRDs. --help, -h Print this message and exit " @@ -47,21 +47,21 @@ function quit { trap "quit" INT EXIT mode="" -proxy=false +alpha_agent=false np=false while [[ $# -gt 0 ]] do key="$1" case $key in - --proxy) - proxy=true - shift - ;; --np) np=true shift ;; + --all-alpha-agent) + alpha_agent=true + shift + ;; --encap-mode) mode="$2" shift 2 @@ -78,13 +78,13 @@ esac done manifest_args="" -if $proxy; then - manifest_args="$manifest_args --proxy" -fi if $np; then # See https://github.com/vmware-tanzu/antrea/issues/897 manifest_args="$manifest_args --np --tun vxlan" fi +if $alpha_agent; then + manifest_args="$manifest_args --all-alpha-agent" +fi function run_test { current_mode=$1 diff --git a/hack/generate-manifest.sh b/hack/generate-manifest.sh index 7b04c964b1b..e87cecc43c3 100755 --- a/hack/generate-manifest.sh +++ b/hack/generate-manifest.sh @@ -27,7 +27,7 @@ Generate a YAML manifest for Antrea using Kustomize and print it to stdout. --kind Generate a manifest appropriate for running Antrea in a Kind cluster --cloud Generate a manifest appropriate for running Antrea in Public Cloud --ipsec Generate a manifest with IPSec encryption of tunnel traffic enabled - --proxy Generate a manifest with Antrea proxy enabled + --all-alpha-agent Generate a manifest with all alpha features enabled on Antrea Agent --np Generate a manifest with Namespaced Antrea NetworkPolicy CRDs and ClusterNetworkPolicy related CRDs enabled --keep Debug flag which will preserve the generated kustomization.yml --tun (geneve|vxlan|gre|stt) Choose encap tunnel type from geneve, gre, stt and vxlan (default is geneve) @@ -51,7 +51,7 @@ function print_help { MODE="dev" KIND=false IPSEC=false -PROXY=false +ALPHA_AGENT=false NP=false KEEP=false ENCAP_MODE="" @@ -83,8 +83,8 @@ case $key in IPSEC=true shift ;; - --proxy) - PROXY=true + --all-alpha-agent) + ALPHA_AGENT=true shift ;; --np) @@ -170,8 +170,8 @@ if $IPSEC; then sed -i.bak -E "s/^[[:space:]]*#[[:space:]]*tunnelType[[:space:]]*:[[:space:]]*[a-z]+[[:space:]]*$/tunnelType: gre/" antrea-agent.conf fi -if $PROXY; then - sed -i.bak -E "s/^[[:space:]]*#[[:space:]]*AntreaProxy[[:space:]]*:[[:space:]]*[a-z]+[[:space:]]*$/ AntreaProxy: true/" antrea-agent.conf +if $ALPHA_AGENT; then + sed -i.bak -E "s/^[[:space:]]*#[[:space:]]*AllAlpha[[:space:]]*:[[:space:]]*[a-z]+[[:space:]]*$/ AllAlpha: true/" antrea-agent.conf fi if $NP; then diff --git a/test/e2e/README.md b/test/e2e/README.md index f3e304b628d..c8798b4d7f3 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -132,7 +132,14 @@ also need to copy the Antrea manifest to the master Docker container: ./hack/generate-manifest.sh --kind | docker exec -i kind-control-plane dd of=/root/antrea.yml go test -v github.com/vmware-tanzu/antrea/test/e2e -provider=kind ``` +### Running e2e tests specific to an alpha feature on Agent +[Alpha feature list](/docs/feature-gates.md) provides the details of the features supported in Antrea. +If you would like run a feature specific e2e test, you may use following commands: +```bash +./hack/generate-manifest.sh --kind --all-alpha-agent | docker exec -i kind-control-plane dd of=/root/antrea.yml +go test -v github.com/vmware-tanzu/antrea/test/e2e -provider=kind -run +``` ## Running the performance test To run all benchmarks, without the standard e2e tests: ```bash