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

e2e: fix feature-gates being overridden when specified multiple times #6586

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions hack/generate-manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Generate a YAML manifest for Antrea using Helm and print it to stdout.
--cloud Generate a manifest appropriate for running Antrea in Public Cloud.
--ipsec Generate a manifest with IPsec encryption of tunnel traffic enabled.
--feature-gates A comma-separated list of key=value pairs that describe feature gates, e.g. TrafficControl=true,Egress=false.
This option can be specified multiple times.
--proxy-all Generate a manifest with Antrea proxy with all Service support enabled.
--tun (geneve|vxlan|gre|stt) Choose encap tunnel type from geneve, gre, stt and vxlan (default is geneve).
--on-delete Generate a manifest with antrea-agent's update strategy set to OnDelete.
Expand All @@ -43,6 +44,7 @@ Generate a YAML manifest for Antrea using Helm and print it to stdout.
--multicast-interfaces Multicast interface names (default is empty).
--extra-helm-values-file Optional extra helm values file to override the default config values.
--extra-helm-values Optional extra helm values to override the default config values.
This option can be specified multiple times.
--verbose-log Generate a manifest with increased log-level (level 4) for Antrea agent and controller.
This option will work only in 'dev' mode.
--help, -h Print this message and exit.
Expand Down Expand Up @@ -86,6 +88,7 @@ MULTICAST=false
MULTICAST_INTERFACES=""
HELM_VALUES_FILES=()
HELM_VALUES=()
FEATURE_GATES=()

while [[ $# -gt 0 ]]
do
Expand All @@ -112,7 +115,7 @@ case $key in
shift
;;
--feature-gates)
FEATURE_GATES="$2"
FEATURE_GATES+=("$2")
shift 2
;;
--proxy-all)
Expand Down Expand Up @@ -277,9 +280,11 @@ if [ -n "$MULTICAST_INTERFACES" ]; then
HELM_VALUES+=("multicast.multicastInterfaces={$MULTICAST_INTERFACES}")
fi

IFS=',' read -r -a feature_gates <<< "$FEATURE_GATES"
for feature_gate in "${feature_gates[@]}"; do
HELM_VALUES+=("featureGates.${feature_gate}")
for v in "${FEATURE_GATES[@]}"; do
IFS=',' read -r -a feature_gates <<< "$v"
for feature_gate in "${feature_gates[@]}"; do
HELM_VALUES+=("featureGates.${feature_gate}")
done
done

if $PROXY_ALL; then
Expand Down