From 69f2bd478154383ec79d0a5b7825438ac5deefb8 Mon Sep 17 00:00:00 2001 From: "Kwiatosz, Krzysztof" Date: Fri, 29 Nov 2024 16:12:11 +0100 Subject: [PATCH] Get rid of dependency to btp-operator's secret --- examples/kyma-on-btp-new-sa/main.tf | 2 +- examples/kyma-on-btp-new-sa/variables.tf | 22 ---------------------- main.tf | 4 ++-- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/examples/kyma-on-btp-new-sa/main.tf b/examples/kyma-on-btp-new-sa/main.tf index 06eebc8..5bc66eb 100644 --- a/examples/kyma-on-btp-new-sa/main.tf +++ b/examples/kyma-on-btp-new-sa/main.tf @@ -46,7 +46,7 @@ module "kyma" { BTP_NEW_SUBACCOUNT_NAME = var.BTP_NEW_SUBACCOUNT_NAME BTP_KYMA_REGION = var.BTP_KYMA_REGION BTP_NEW_SUBACCOUNT_REGION = var.BTP_NEW_SUBACCOUNT_REGION - BTP_KYMA_MODULES = var.BTP_KYMA_MODULES + BTP_KYMA_MODULES = [] BTP_KYMA_CUSTOM_ADMINISTRATORS = var.BTP_KYMA_CUSTOM_ADMINISTRATORS BTP_KYMA_AUTOSCALER_MIN = 1 BTP_KYMA_AUTOSCALER_MAX = 2 diff --git a/examples/kyma-on-btp-new-sa/variables.tf b/examples/kyma-on-btp-new-sa/variables.tf index a36bc19..589736c 100644 --- a/examples/kyma-on-btp-new-sa/variables.tf +++ b/examples/kyma-on-btp-new-sa/variables.tf @@ -56,28 +56,6 @@ variable "BTP_KYMA_REGION" { default = "westeurope" } -variable "BTP_KYMA_MODULES" { - type = list(object({ - name = string - channel = string - })) - default = [ - { - name = "istio" - channel = "fast" - }, - { - name = "api-gateway" - channel = "fast" - }, - { - name = "btp-operator" - channel = "fast" - } - ] - description = "The list of kyma modules to install" -} - variable "BTP_KYMA_CUSTOM_ADMINISTRATORS" { type = list(string) default = [] diff --git a/main.tf b/main.tf index fea7cb0..597a44c 100644 --- a/main.tf +++ b/main.tf @@ -59,8 +59,8 @@ resource "terraform_data" "wait-for-kyma-readiness" { kubectl wait --for condition=established crd/kymas.operator.kyma-project.io --kubeconfig $KUBECONFIG while ! kubectl get kyma default -n kyma-system --kubeconfig $KUBECONFIG; do echo "Waiting for default kyma CR..."; sleep 1; done kubectl wait --for='jsonpath={.status.state}=Ready' kymas.operator.kyma-project.io/default -n kyma-system --kubeconfig $KUBECONFIG --timeout=480s - while ! kubectl get secret sap-btp-operator-clusterid -n kyma-system --kubeconfig $KUBECONFIG; do echo "Waiting for sap-btp-operator-clusterid..."; sleep 1; done - kubectl get secret sap-btp-operator-clusterid -n kyma-system -ojsonpath={.data.INITIAL_CLUSTER_ID} --kubeconfig $KUBECONFIG > cluster_id.txt + while ! kubectl get secret sap-btp-manager -n kyma-system --kubeconfig $KUBECONFIG; do echo "Waiting for sap-btp-manager..."; sleep 1; done + kubectl get secret sap-btp-manager -n kyma-system -ojsonpath={.data.cluster_id} --kubeconfig $KUBECONFIG > cluster_id.txt while ! kubectl get cm shoot-info -n kube-system --kubeconfig $KUBECONFIG; do echo "Waiting for shoot-info cm..."; sleep 1; done kubectl get cm shoot-info -n kube-system -ojsonpath={.data.domain} --kubeconfig $KUBECONFIG > domain.txt )