diff --git a/.github/workflows/kind-e2e.yaml b/.github/workflows/kind-e2e.yaml index edfa0135e0ce..32bb6b2469c0 100644 --- a/.github/workflows/kind-e2e.yaml +++ b/.github/workflows/kind-e2e.yaml @@ -95,6 +95,7 @@ jobs: - kourier - kourier-tls - istio + - istio-ambient - contour # Disabled due to consistent failures # - gateway_istio @@ -117,6 +118,11 @@ jobs: - ingress: istio namespace-resources: virtualservices + - ingress: istio-ambient + namespace-resources: virtualservices + ingress-class: istio + ambient: 1 + - ingress: kourier-tls ingress-class: kourier enable-tls: 1 @@ -134,6 +140,7 @@ jobs: KIND: 1 INGRESS_CLASS: ${{ matrix.ingress-class || matrix.ingress }}.ingress.networking.knative.dev ENABLE_TLS: ${{ matrix.enable-tls || 0 }} + AMBIENT: ${{ matrix.ambient || 0 }} steps: - name: Set up Go 1.19.x diff --git a/test/config/ytt/ambient/istio-injection.yaml b/test/config/ytt/ambient/istio-injection.yaml new file mode 100644 index 000000000000..e72748bad739 --- /dev/null +++ b/test/config/ytt/ambient/istio-injection.yaml @@ -0,0 +1,24 @@ +#@ load("@ytt:overlay", "overlay") +#@ load("@ytt:data", "data") +#@ load("helpers.lib.yaml", "subset") + +#@ def namespaces(): +#@ names = [ +#@ data.values.serving.namespaces.system, +#@ data.values.serving.namespaces.test.default, +#@ data.values.serving.namespaces.test.alternate, +#@ data.values.serving.namespaces.test.tls, +#@ ] +#@ matches = [] +#@ for name in names: +#@ matches.append(subset(name=name, kind="Namespace")) +#@ end +#@ return overlay.or_op(*matches) +#@ end + +#@overlay/match by=namespaces(), expects="1+" +--- +#@overlay/match-child-defaults missing_ok=True +metadata: + labels: + istio.io/dataplane-mode: ambient diff --git a/test/config/ytt/ambient/kapp-order.yaml b/test/config/ytt/ambient/kapp-order.yaml new file mode 100644 index 000000000000..320e5f6f4628 --- /dev/null +++ b/test/config/ytt/ambient/kapp-order.yaml @@ -0,0 +1,22 @@ +#! ztunnel have to be deployed before istio-cni-node. +#! TODO: Remove this ordering if https://github.com/istio/istio/issues/45781 was solved. + +#@ load("@ytt:overlay", "overlay") +#@ load("helpers.lib.yaml", "subset", "label_subset") + +#@overlay/match by=subset(kind="DaemonSet", name="ztunnel"), expects="1+" +--- +metadata: + #@overlay/match missing_ok=True + annotations: + #@overlay/match missing_ok=True + kapp.k14s.io/change-group: "ztunnel" + +#@overlay/match by=subset(kind="DaemonSet", name="istio-cni-node"), expects="1+" +--- +metadata: + #@overlay/match missing_ok=True + #@overlay/match-child-defaults missing_ok=True + annotations: + kapp.k14s.io/change-group: "istio-cni-node" + kapp.k14s.io/change-rule: "upsert after upserting ztunnel" diff --git a/test/e2e-common.sh b/test/e2e-common.sh index 93c7e90bfd05..242d984b698d 100644 --- a/test/e2e-common.sh +++ b/test/e2e-common.sh @@ -36,6 +36,7 @@ export SHORT=0 export ENABLE_HA=0 export ENABLE_TLS=${ENABLE_TLS:-0} export MESH=0 +export AMBIENT=${AMBIENT:-0} export PERF=0 export KIND=${KIND:-0} export CLUSTER_DOMAIN=${CLUSTER_DOMAIN:-cluster.local} @@ -302,6 +303,10 @@ function install() { YTT_FILES+=("${REPO_ROOT_DIR}/test/config/ytt/mesh") fi + if ((AMBIENT)); then + YTT_FILES+=("${REPO_ROOT_DIR}/test/config/ytt/ambient") + fi + if (( ENABLE_HA )); then YTT_FILES+=("${E2E_YAML_DIR}/test/config/chaosduck/chaosduck.yaml") YTT_FILES+=("${REPO_ROOT_DIR}/test/config/ytt/ha") diff --git a/test/e2e-networking-library.sh b/test/e2e-networking-library.sh index eaa428d1a71e..39b6f2497263 100644 --- a/test/e2e-networking-library.sh +++ b/test/e2e-networking-library.sh @@ -103,7 +103,11 @@ function net_istio_file_url() { local profile="istio-ci-no-mesh" if (( KIND )); then - profile="istio-kind-no-mesh" + if (( AMBIENT )); then + profile="istio-kind-ambient" + else + profile="istio-kind-no-mesh" + fi elif (( MESH )); then profile="istio-ci-mesh" fi