diff options
author | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2024-01-21 14:24:03 +0000 |
---|---|---|
committer | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2024-01-22 14:55:45 +0000 |
commit | 31c61d495474985b8cc3460464f888651d0919ed (patch) | |
tree | 72ac562f9bd64196fda57edd8ca6a62f8877b046 /csit/run-k8s-csit.sh | |
parent | caa7adc30ed054d2a5cfea4a1b9a265d5cfb6785 (diff) |
Add kafka support in K8s CSIT
Issue-ID: POLICY-4402
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I29ef966ed5eb70997574269ff6180f68d754383b
Diffstat (limited to 'csit/run-k8s-csit.sh')
-rwxr-xr-x | csit/run-k8s-csit.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/csit/run-k8s-csit.sh b/csit/run-k8s-csit.sh index 5a3ac3bb..04f0a836 100755 --- a/csit/run-k8s-csit.sh +++ b/csit/run-k8s-csit.sh @@ -46,6 +46,9 @@ POLICY_DISTRIBUTION_CONTAINER="policy-distribution" POLICY_K8S_PPNT_CONTAINER="policy-clamp-ac-k8s-ppnt" POLICY_HTTP_PPNT_CONTAINER="policy-clamp-ac-http-ppnt" POLICY_PF_PPNT_CONTAINER="policy-clamp-ac-pf-ppnt" +KAFKA_CONTAINER="kafka-deployment" +ZK_CONTAINER="zookeeper-deployment" +KAFKA_DIR=${WORKSPACE}/helm/cp-kafka SET_VALUES="" DISTRIBUTION_CSAR=${WORKSPACE}/csit/resources/tests/data/csar @@ -56,6 +59,7 @@ export ROBOT_FILE="" export ROBOT_LOG_DIR=${WORKSPACE}/csit/archives export READINESS_CONTAINERS=() + function spin_microk8s_cluster() { echo "Verify if Microk8s cluster is running.." microk8s version @@ -88,11 +92,19 @@ function spin_microk8s_cluster() { } +function install_kafka() { + echo "Installing Confluent kafka" + kubectl apply -f $KAFKA_DIR/zookeeper.yaml + kubectl apply -f $KAFKA_DIR/kafka.yaml + echo "----------------------------------------" +} + function uninstall_policy() { echo "Removing the policy helm deployment" sudo microk8s helm uninstall csit-policy sudo microk8s helm uninstall prometheus sudo microk8s helm uninstall csit-robot + sudo kubectl delete deploy $ZK_CONTAINER $KAFKA_CONTAINER rm -rf ${WORKSPACE}/helm/policy/Chart.lock if [ "$PROJECT" == "clamp" ] || [ "$PROJECT" == "policy-clamp" ]; then sudo microk8s helm uninstall policy-chartmuseum @@ -349,6 +361,9 @@ fi if [ $OPERATION == "install" ]; then spin_microk8s_cluster if [ "${?}" -eq 0 ]; then + export KAFKA_CONTAINERS=($KAFKA_CONTAINER,$ZK_CONTAINER) + install_kafka + wait_for_pods_running default 300 $KAFKA_CONTAINERS set_project_config echo "Installing policy helm charts in the default namespace" source ${WORKSPACE}/compose/get-k8s-versions.sh |