Use --discovery-store instead of overrides for irsa in scenarios

This commit is contained in:
Ole Markus With 2022-04-09 09:06:29 +02:00
parent 38e1c9ec14
commit 296ed9c44c
1 changed files with 4 additions and 6 deletions

View File

@ -50,12 +50,6 @@ if [[ -z "${DISCOVERY_STORE-}" ]]; then
DISCOVERY_STORE="${KOPS_STATE_STORE-}"
fi
if [[ ${KOPS_IRSA-} = true ]]; then
OVERRIDES="${OVERRIDES-} --override=cluster.spec.serviceAccountIssuerDiscovery.discoveryStore=${DISCOVERY_STORE}/${CLUSTER_NAME}/discovery"
OVERRIDES="${OVERRIDES} --override=cluster.spec.serviceAccountIssuerDiscovery.enableAWSOIDCProvider=true"
OVERRIDES="${OVERRIDES} --override=cluster.spec.iam.useServiceAccountExternalPermissions=true"
fi
export GO111MODULE=on
if [[ -z "${AWS_SSH_PRIVATE_KEY_FILE-}" ]]; then
@ -134,6 +128,10 @@ function kops-up() {
K8S_VERSION="$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)"
fi
if [[ ${KOPS_IRSA-} = true ]]; then
create_args="${create_args} --discovery-store=${DISCOVERY_STORE}/${CLUSTER_NAME}/discovery"
fi
${KUBETEST2} \
--up \
--kops-binary-path="${KOPS}" \