2021-04-24 23:39:06 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Copyright 2019 The Kubernetes Authors.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
2021-11-06 20:12:13 +00:00
|
|
|
set -euo pipefail
|
2021-04-24 23:39:06 +00:00
|
|
|
|
|
|
|
if ! command -v kind --version &> /dev/null; then
|
|
|
|
echo "kind is not installed. Use the package manager or visit the official site https://kind.sigs.k8s.io/"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
cd $DIR
|
|
|
|
|
|
|
|
echo "Kubernetes cluster:"
|
|
|
|
kubectl get nodes -o wide
|
|
|
|
|
|
|
|
echo -e "Granting permissions to e2e service account..."
|
|
|
|
kubectl create serviceaccount external-secrets-e2e || true
|
|
|
|
kubectl create clusterrolebinding permissive-binding \
|
|
|
|
--clusterrole=cluster-admin \
|
|
|
|
--user=admin \
|
|
|
|
--user=kubelet \
|
|
|
|
--serviceaccount=default:external-secrets-e2e || true
|
|
|
|
|
2022-04-04 19:20:58 +00:00
|
|
|
echo -e "Granting anonymous access to service account issuer discovery"
|
|
|
|
kubectl create clusterrolebinding service-account-issuer-discovery-binding \
|
|
|
|
--clusterrole=system:service-account-issuer-discovery \
|
|
|
|
--group=system:unauthenticated || true
|
|
|
|
|
2022-10-06 17:14:13 +00:00
|
|
|
echo -e "Starting the e2e test pod ${E2E_IMAGE_NAME}:${VERSION}"
|
2021-04-24 23:39:06 +00:00
|
|
|
kubectl run --rm \
|
|
|
|
--attach \
|
|
|
|
--restart=Never \
|
2022-01-21 20:05:37 +00:00
|
|
|
--pod-running-timeout=5m \
|
2023-10-29 20:51:39 +00:00
|
|
|
--labels="app=eso-e2e,azure.workload.identity/use=true" \
|
2023-06-12 10:58:29 +00:00
|
|
|
--env="ACK_GINKGO_DEPRECATIONS=2.9.5" \
|
2022-01-21 20:05:37 +00:00
|
|
|
--env="GINKGO_LABELS=${GINKGO_LABELS:-.*}" \
|
2021-07-12 18:27:48 +00:00
|
|
|
--env="GCP_SM_SA_JSON=${GCP_SM_SA_JSON:-}" \
|
|
|
|
--env="GCP_PROJECT_ID=${GCP_PROJECT_ID:-}" \
|
2021-12-29 12:02:56 +00:00
|
|
|
--env="GCP_GSA_NAME=${GCP_GSA_NAME:-}" \
|
2022-01-24 14:03:15 +00:00
|
|
|
--env="GCP_KSA_NAME=${GCP_KSA_NAME:-}" \
|
2022-01-21 20:05:37 +00:00
|
|
|
--env="GCP_GKE_ZONE=${GCP_GKE_ZONE:-}" \
|
|
|
|
--env="GCP_GKE_CLUSTER=${GCP_GKE_CLUSTER:-}" \
|
2022-10-29 18:15:50 +00:00
|
|
|
--env="AWS_REGION=${AWS_REGION:-}" \
|
2022-01-21 20:05:37 +00:00
|
|
|
--env="AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-}" \
|
|
|
|
--env="AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-}" \
|
2022-10-29 18:15:50 +00:00
|
|
|
--env="AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN:-}" \
|
2022-01-21 20:05:37 +00:00
|
|
|
--env="AWS_SA_NAME=${AWS_SA_NAME:-}" \
|
|
|
|
--env="AWS_SA_NAMESPACE=${AWS_SA_NAMESPACE:-}" \
|
2023-10-29 20:51:39 +00:00
|
|
|
--env="TFC_AZURE_CLIENT_ID=${TFC_AZURE_CLIENT_ID:-}" \
|
|
|
|
--env="TFC_AZURE_CLIENT_SECRET=${TFC_AZURE_CLIENT_SECRET:-}" \
|
|
|
|
--env="TFC_AZURE_TENANT_ID=${TFC_AZURE_TENANT_ID:-}" \
|
|
|
|
--env="TFC_VAULT_URL=${TFC_VAULT_URL:-}" \
|
2021-11-10 13:57:37 +00:00
|
|
|
--env="AKEYLESS_ACCESS_ID=${AKEYLESS_ACCESS_ID:-}" \
|
|
|
|
--env="AKEYLESS_ACCESS_TYPE=${AKEYLESS_ACCESS_TYPE:-}" \
|
|
|
|
--env="AKEYLESS_ACCESS_TYPE_PARAM=${AKEYLESS_ACCESS_TYPE_PARAM:-}" \
|
2021-08-04 09:42:07 +00:00
|
|
|
--env="GITLAB_TOKEN=${GITLAB_TOKEN:-}" \
|
|
|
|
--env="GITLAB_PROJECT_ID=${GITLAB_PROJECT_ID:-}" \
|
2022-09-27 20:08:38 +00:00
|
|
|
--env="GITLAB_ENVIRONMENT=${GITLAB_ENVIRONMENT:-}" \
|
2021-09-07 10:20:09 +00:00
|
|
|
--env="ORACLE_USER_OCID=${ORACLE_USER_OCID:-}" \
|
2021-09-09 22:57:43 +00:00
|
|
|
--env="ORACLE_TENANCY_OCID=${ORACLE_TENANCY_OCID:-}" \
|
|
|
|
--env="ORACLE_REGION=${ORACLE_REGION:-}" \
|
|
|
|
--env="ORACLE_FINGERPRINT=${ORACLE_FINGERPRINT:-}" \
|
|
|
|
--env="ORACLE_KEY=${ORACLE_KEY:-}" \
|
2023-03-16 00:03:52 +00:00
|
|
|
--env="SCALEWAY_API_URL=${SCALEWAY_API_URL:-}" \
|
|
|
|
--env="SCALEWAY_REGION=${SCALEWAY_REGION:-}" \
|
|
|
|
--env="SCALEWAY_PROJECT_ID=${SCALEWAY_PROJECT_ID:-}" \
|
|
|
|
--env="SCALEWAY_ACCESS_KEY=${SCALEWAY_ACCESS_KEY:-}" \
|
|
|
|
--env="SCALEWAY_SECRET_KEY=${SCALEWAY_SECRET_KEY:-}" \
|
2023-07-06 16:01:43 +00:00
|
|
|
--env="DELINEA_TLD=${DELINEA_TLD:-}" \
|
|
|
|
--env="DELINEA_URL_TEMPLATE=${DELINEA_URL_TEMPLATE:-}" \
|
|
|
|
--env="DELINEA_TENANT=${DELINEA_TENANT:-}" \
|
|
|
|
--env="DELINEA_CLIENT_ID=${DELINEA_CLIENT_ID:-}" \
|
|
|
|
--env="DELINEA_CLIENT_SECRET=${DELINEA_CLIENT_SECRET:-}" \
|
2024-07-10 17:32:17 +00:00
|
|
|
--env="SECRETSERVER_USERNAME=${SECRETSERVER_USERNAME:-}" \
|
|
|
|
--env="SECRETSERVER_PASSWORD=${SECRETSERVER_PASSWORD:-}" \
|
|
|
|
--env="SECRETSERVER_URL=${SECRETSERVER_URL:-}" \
|
2022-01-21 20:05:37 +00:00
|
|
|
--env="VERSION=${VERSION}" \
|
2022-05-23 14:14:21 +00:00
|
|
|
--env="TEST_SUITES=${TEST_SUITES}" \
|
2021-04-24 23:39:06 +00:00
|
|
|
--overrides='{ "apiVersion": "v1", "spec":{"serviceAccountName": "external-secrets-e2e"}}' \
|
2022-10-06 17:14:13 +00:00
|
|
|
e2e --image=${E2E_IMAGE_NAME}:${VERSION}
|