From 3e64af95214d8d40f3ab77ff8be908cd6dcf57da Mon Sep 17 00:00:00 2001 From: runyontr <tom@runyon.dev> Date: Wed, 11 Nov 2020 19:37:20 +0000 Subject: [PATCH] test all virtual services --- .gitlab-ci.yml | 3 +-- .../templates/istio/istio-controlplane-helmrelease.yaml | 1 - chart/templates/values.yaml | 2 ++ tests/virtualservices.sh | 9 +++++++++ 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100755 tests/virtualservices.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00e613c88e..b54299c710 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,8 +71,7 @@ package tests: script: # Place kubernetes package test here - echo "Package tests go here" - - curl -v https://kiali.bigbang.dev - - curl -v https://kibana.bigbang.dev + - bash ./tests/virtualservices.sh - kubectl get helmrelease -A after_script: diff --git a/chart/templates/istio/istio-controlplane-helmrelease.yaml b/chart/templates/istio/istio-controlplane-helmrelease.yaml index 566ced4581..6a7bcf9ae6 100644 --- a/chart/templates/istio/istio-controlplane-helmrelease.yaml +++ b/chart/templates/istio/istio-controlplane-helmrelease.yaml @@ -36,7 +36,6 @@ spec: - name: values kind: Secret valuesKey: "istio.yaml" - values: hostname: {{ .Values.hostname }} diff --git a/chart/templates/values.yaml b/chart/templates/values.yaml index 3019814a6c..b34d7b46a7 100644 --- a/chart/templates/values.yaml +++ b/chart/templates/values.yaml @@ -5,6 +5,8 @@ metadata: namespace: {{ .Release.Namespace }} type: generic stringData: + values.yaml: | +{{ toYaml .Values | indent 4}} istio.yaml: | {{ toYaml .Values.istio.values | indent 4 }} gatekeeper.yaml: | diff --git a/tests/virtualservices.sh b/tests/virtualservices.sh new file mode 100755 index 0000000000..8ce5e4474a --- /dev/null +++ b/tests/virtualservices.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +hosts=`kubectl get vs -A -o jsonpath="{ .items[*].spec.hosts[*] }"` + +for host in $hosts; do + curl -vI https://$host +done \ No newline at end of file -- GitLab