diff --git a/.github/scripts/cleanup_cosi_resources.sh b/.github/scripts/cleanup_cosi_resources.sh old mode 100644 new mode 100755 index a45fb0d..aa4121d --- a/.github/scripts/cleanup_cosi_resources.sh +++ b/.github/scripts/cleanup_cosi_resources.sh @@ -41,6 +41,9 @@ log_and_run echo "Deleting Bucket Class and Bucket Claim..." log_and_run kubectl delete -f cosi-examples/bucketclass.yaml || { echo "Bucket Class not found." | tee -a "$LOG_FILE"; } log_and_run kubectl delete -f cosi-examples/bucketclaim.yaml || { echo "Bucket Claim not found." | tee -a "$LOG_FILE"; } +log_and_run echo "Deleting s3-secret-for-cosi secret..." +log_and_run kubectl delete secret s3-secret-for-cosi --namespace=default || { echo "Secret s3-secret-for-cosi not found." | tee -a "$LOG_FILE"; } + log_and_run echo "Deleting COSI CRDs..." log_and_run kubectl delete -k github.com/kubernetes-sigs/container-object-storage-interface-api || { echo "COSI API CRDs not found." | tee -a "$LOG_FILE"; } log_and_run kubectl delete -k github.com/kubernetes-sigs/container-object-storage-interface-controller || { echo "COSI Controller CRDs not found." | tee -a "$LOG_FILE"; } diff --git a/.github/scripts/e2e_test_bucket_creation.sh b/.github/scripts/e2e_test_bucket_creation.sh old mode 100644 new mode 100755 index 2b2a9c8..13eabf4 --- a/.github/scripts/e2e_test_bucket_creation.sh +++ b/.github/scripts/e2e_test_bucket_creation.sh @@ -23,9 +23,9 @@ log_and_run() { # Step 1: Create Account in Vault log_and_run echo "Creating account in Vault container..." -CONTAINER_ID=$(docker ps -qf "name=s3_and_iam_deployment-iam-1") -log_and_run docker exec "$CONTAINER_ID" sh -c "ADMIN_ACCESS_KEY_ID=D4IT2AWSB588GO5J9T00 ADMIN_SECRET_ACCESS_KEY=UEEu8tYlsOGGrgf4DAiSZD6apVNPUWqRiPG0nTB6 ./node_modules/vaultclient/bin/vaultclient create-account --name cosi-account --email cosi-account@scality.local" -log_and_run docker exec "$CONTAINER_ID" sh -c "ADMIN_ACCESS_KEY_ID=D4IT2AWSB588GO5J9T00 ADMIN_SECRET_ACCESS_KEY=UEEu8tYlsOGGrgf4DAiSZD6apVNPUWqRiPG0nTB6 ./node_modules/vaultclient/bin/vaultclient generate-account-access-key --name=cosi-account --accesskey=PBUOB68AVF39EVVAFNFL --secretkey=P+PK+uMB9spUc21huaQoOexqdJoV00tSnl+pc7t7" +CONTAINER_NAME=s3_and_iam_deployment-iam-1 +log_and_run docker exec "$CONTAINER_NAME" sh -c "ADMIN_ACCESS_KEY_ID=D4IT2AWSB588GO5J9T00 ADMIN_SECRET_ACCESS_KEY=UEEu8tYlsOGGrgf4DAiSZD6apVNPUWqRiPG0nTB6 ./node_modules/vaultclient/bin/vaultclient create-account --name cosi-account --email cosi-account@scality.local" +log_and_run docker exec "$CONTAINER_NAME" sh -c "ADMIN_ACCESS_KEY_ID=D4IT2AWSB588GO5J9T00 ADMIN_SECRET_ACCESS_KEY=UEEu8tYlsOGGrgf4DAiSZD6apVNPUWqRiPG0nTB6 ./node_modules/vaultclient/bin/vaultclient generate-account-access-key --name=cosi-account --accesskey=PBUOB68AVF39EVVAFNFL --secretkey=P+PK+uMB9spUc21huaQoOexqdJoV00tSnl+pc7t7" # Retrieve the Host IP Address HOST_IP=$(hostname -I | awk '{print $1}')