From: Todd Malsbary Date: Tue, 8 Mar 2022 00:25:58 +0000 (-0800) Subject: Add chart to deploy IstioOperator resource X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=e554714c7123d5f2244456cf9afed652933fe7b2;hp=fac0cf5da200c458dc6f1e24197152c8959ef9af;p=icn.git Add chart to deploy IstioOperator resource Signed-off-by: Todd Malsbary Change-Id: Ia1ca6cdc9a69ad47c4a5d2d09a23009522df9f22 --- diff --git a/deploy/istio/.helmignore b/deploy/istio/.helmignore new file mode 100644 index 0000000..81285a6 --- /dev/null +++ b/deploy/istio/.helmignore @@ -0,0 +1,24 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +istio.sh +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/deploy/istio/Chart.yaml b/deploy/istio/Chart.yaml new file mode 100644 index 0000000..0beb1ae --- /dev/null +++ b/deploy/istio/Chart.yaml @@ -0,0 +1,5 @@ +# A simple chart to deploy Istio using the Istio operator. +apiVersion: v2 +name: istio +type: application +version: 0.1.0 diff --git a/deploy/istio/istio.sh b/deploy/istio/istio.sh new file mode 100755 index 0000000..ddac47d --- /dev/null +++ b/deploy/istio/istio.sh @@ -0,0 +1,223 @@ +#!/usr/bin/env bash +set -eEux -o pipefail + +SCRIPTDIR="$(readlink -f $(dirname ${BASH_SOURCE[0]}))" +LIBDIR="$(dirname $(dirname ${SCRIPTDIR}))/env/lib" + +source $LIBDIR/common.sh + +BUILDDIR=${SCRIPTDIR/deploy/build} +mkdir -p ${BUILDDIR} + +function test_setup { + clone_istio_repository + + # Create a temporary kubeconfig file for the tests + cluster_name=${CLUSTER_1_NAME:-cluster-1} + local -r cluster_1_kubeconfig="${BUILDDIR}/${cluster_name}.conf" + clusterctl -n metal3 get kubeconfig ${cluster_name} >${cluster_1_kubeconfig} + cluster_name=${CLUSTER_2_NAME:-cluster-2} + local -r cluster_2_kubeconfig="${BUILDDIR}/${cluster_name}.conf" + clusterctl -n metal3 get kubeconfig ${cluster_name} >${cluster_2_kubeconfig} + + # Deploy sleep on cluster-1 + kubectl --kubeconfig=${cluster_1_kubeconfig} create namespace foo + kubectl --kubeconfig=${cluster_1_kubeconfig} label namespace foo istio-injection=enabled + cat <