Skip to content

Commit

Permalink
Remove intro
Browse files Browse the repository at this point in the history
  • Loading branch information
vfarcic committed Dec 24, 2023
1 parent 5406d21 commit 5d1a897
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/aws-creds.conf
/gke_gcloud_auth_plugin_cache
/kubeconfig.yaml
/azure-creds.json
9 changes: 2 additions & 7 deletions destroy/00-intro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ set -e
gum style \
--foreground 212 --border-foreground 212 --border double \
--margin "1 2" --padding "2 4" \
'Destruction of the Introduction chapter.
This script assumes that you jumped straight into this chapter.
If that is not the case (if you are continuing from the previous
chapter), please answer with "No" when asked whether you are
ready to start.'
'Destruction of the Introduction chapter'

gum confirm '
Are you ready to start?
Expand All @@ -34,7 +29,7 @@ Do you have those tools installed?
# Crossplane #
##############

rm a-team/intro.yaml
rm -f a-team/intro.yaml

git add .

Expand Down
7 changes: 1 addition & 6 deletions destroy/01-managed-resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ set -e
gum style \
--foreground 212 --border-foreground 212 --border double \
--margin "1 2" --padding "2 4" \
'Destruction of the Managed Resources chapter.
This script assumes that you jumped straight into this chapter.
If that is not the case (if you are continuing from the previous
chapter), please answer with "No" when asked whether you are
ready to start.'
'Destruction of the Managed Resources chapter'

gum confirm '
Are you ready to start?
Expand Down
12 changes: 12 additions & 0 deletions providers/azure-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: azure.upbound.io/v1beta1
kind: ProviderConfig
metadata:
name: default
spec:
credentials:
source: Secret
secretRef:
namespace: crossplane-system
name: azure-creds
key: creds
2 changes: 1 addition & 1 deletion providers/dot-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Configuration
metadata:
name: crossplane-k8s
spec:
package: xpkg.upbound.io/devops-toolkit/dot-kubernetes:v0.11.12
package: xpkg.upbound.io/devops-toolkit/dot-kubernetes:v0.11.14
16 changes: 16 additions & 0 deletions setup/00-intro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ gum confirm "
Do you have those tools installed?
" || exit 0

rm -f .env

#########################
# Control Plane Cluster #
#########################
Expand Down Expand Up @@ -158,6 +160,20 @@ aws_secret_access_key = $AWS_SECRET_ACCESS_KEY

kubectl apply --filename providers/aws-config.yaml

else

RESOURCE_GROUP=dot-$(date +%Y%m%d%H%M%S)

echo "export RESOURCE_GROUP=$RESOURCE_GROUP" >> .env

export SUBSCRIPTION_ID=$(az account show --query id -o tsv)

az ad sp create-for-rbac --sdk-auth --role Owner --scopes /subscriptions/$SUBSCRIPTION_ID | tee azure-creds.json

kubectl --namespace crossplane-system create secret generic azure-creds --from-file creds=./azure-creds.json

kubectl apply --filename crossplane-config/provider-config-azure-official.yaml

fi

kubectl create namespace a-team
Expand Down

0 comments on commit 5d1a897

Please sign in to comment.