Skip to content

Commit 0d7b871

Browse files
authored
Merge pull request #1504 from nader-ziada/create-cluster-env
Set identity related env vars in create dev cluster
2 parents 2bb6113 + ca23888 commit 0d7b871

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

hack/create-dev-cluster.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ export WORKER_MACHINE_COUNT=${WORKER_MACHINE_COUNT:-2}
5050
export KUBERNETES_VERSION="${KUBERNETES_VERSION:-v1.19.7}"
5151
export CLUSTER_TEMPLATE="${CLUSTER_TEMPLATE:-cluster-template.yaml}"
5252

53+
# identity secret settings.
54+
export AZURE_CLUSTER_IDENTITY_SECRET_NAME="cluster-identity-secret"
55+
export CLUSTER_IDENTITY_NAME=${CLUSTER_IDENTITY_NAME:="cluster-identity"}
56+
export AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE="default"
57+
5358
# Generate SSH key.
5459
SSH_KEY_FILE=${SSH_KEY_FILE:-""}
5560
if [ -z "$SSH_KEY_FILE" ]; then

hack/create-identity-secret.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,5 @@ source "${REPO_ROOT}/hack/ensure-kubectl.sh"
2626
# shellcheck source=hack/parse-prow-creds.sh
2727
source "${REPO_ROOT}/hack/parse-prow-creds.sh"
2828

29-
export AZURE_CLUSTER_IDENTITY_SECRET_NAME="cluster-identity-secret"
30-
export CLUSTER_IDENTITY_NAME=${CLUSTER_IDENTITY_NAME:="cluster-identity"}
31-
export AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE="default"
32-
3329
kubectl create secret generic "${AZURE_CLUSTER_IDENTITY_SECRET_NAME}" --from-literal=clientSecret="${AZURE_CLIENT_SECRET}"
3430
kubectl label secret "${AZURE_CLUSTER_IDENTITY_SECRET_NAME}" "clusterctl.cluster.x-k8s.io/move-hierarchy=true" --overwrite=true

0 commit comments

Comments
 (0)