diff --git a/.github/scripts/validate-deploy.sh b/.github/scripts/validate-deploy.sh index f1f641a..87227a1 100755 --- a/.github/scripts/validate-deploy.sh +++ b/.github/scripts/validate-deploy.sh @@ -1 +1,22 @@ #!/usr/bin/env bash + +KUBECONFIG=$(cat ./kubeconfig) + +echo "Checking for logdna-agent daemonset" +if ! kubectl get daemonset logdna-agent -n ibm-observe; then + echo "logdna-agent daemonset not found" + exit 1 +fi + +echo "Checking logdna-agent pod status" +if ! kubectl rollout status daemonset/logdna-agent -n ibm-observe; then + echo "daemonset/logdna-agent rollout status error" + exit 1 +fi + +echo "Checking for console link" +if ! kubectl get consolelink toolkit-logdna; then + echo "consolelink not found" + kubectl get consolelink + exit 1 +fi diff --git a/module.yaml b/module.yaml index 876105d..b676b01 100644 --- a/module.yaml +++ b/module.yaml @@ -26,6 +26,11 @@ versions: refs: - source: github.com/cloud-native-toolkit/terraform-ibm-resource-group version: ">= 2.1.0" + - id: sysdig_bind + refs: + - source: github.com/cloud-native-toolkit/terraform-ibm-sysdig-bind + version: ">= 1.0.0" + optional: true variables: - name: cluster_id moduleRef: @@ -52,6 +57,11 @@ versions: moduleRef: id: resource_group output: name + - name: sync + moduleRef: + id: sysdig_bind + output: sync + optional: true - name : region scope: global - name : private_endpoint diff --git a/test/stages/stage1-cluster.tf b/test/stages/stage1-cluster.tf index f866418..a41f231 100644 --- a/test/stages/stage1-cluster.tf +++ b/test/stages/stage1-cluster.tf @@ -15,3 +15,9 @@ module "dev_cluster" { cos_id = "" login = true } + +resource null_resource write_kubeconfig { + provisioner "local-exec" { + command = "echo '${module.dev_cluster.platform.kubeconfig}' > ${path.cwd}/kubeconfig" + } +}