This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # setup | |
| if [ ! -f demo-magic.sh ]; then | |
| curl -LO https://github.com/paxtonhare/demo-magic/raw/master/demo-magic.sh | |
| fi | |
| . demo-magic.sh -d #-n | |
| clear | |
| # demo cleanup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| SCORE_COMPOSE_VERSION=$(curl -sL https://api.github.com/repos/score-spec/score-compose/releases/latest | jq -r .tag_name) | |
| wget https://github.com/score-spec/score-compose/releases/download/${SCORE_COMPOSE_VERSION}/score-compose_${SCORE_COMPOSE_VERSION}_linux_amd64.tar.gz | |
| tar -xvf score-compose_${SCORE_COMPOSE_VERSION}_linux_amd64.tar.gz | |
| sudo chmod +x score-compose | |
| sudo mv score-compose /usr/local/bin | |
| rm score-compose_${SCORE_COMPOSE_VERSION}_linux_amd64.tar.gz | |
| rm LICENSE | |
| rm README.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: resourcemanager.cnrm.cloud.google.com/v1beta1 | |
| kind: Project | |
| metadata: | |
| name: gkehubfeaturemembership-asm | |
| spec: | |
| name: Config Connector Sample | |
| organizationRef: | |
| # Replace "${ORG_ID?}" with the numeric ID for your organization | |
| external: "${ORG_ID?}" | |
| billingAccountRef: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # setup | |
| if [ ! -f demo-magic.sh ]; then | |
| curl -LO https://github.com/paxtonhare/demo-magic/raw/master/demo-magic.sh | |
| fi | |
| . demo-magic.sh | |
| clear | |
| # demo cleanup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ORAS_VERSION=0.15.0 | |
| curl -LO https://github.com/oras-project/oras/releases/download/v$ORAS_VERSION/oras_$ORAS_VERSION_linux_amd64.tar.gz | |
| mkdir -p oras-install/ | |
| tar -zxf oras_$ORAS_VERSION_*.tar.gz -C oras-install/ | |
| sudo mv oras-install/oras /usr/local/bin/ | |
| rm -rf oras_$ORAS_VERSION_*.tar.gz oras-install/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NAMESPACE=acm-workshop | |
| mkdir -p ${WORK_DIR}$TENANT_PROJECT_DIR_NAME/$NAMESPACE | |
| cat <<EOF > ${WORK_DIR}$TENANT_PROJECT_DIR_NAME/$NAMESPACE/artifactregistry-charts-reader-workload-identity-user.yaml | |
| apiVersion: iam.cnrm.cloud.google.com/v1beta1 | |
| kind: IAMPartialPolicy | |
| metadata: | |
| name: ${HELM_CHARTS_READER_GSA}-${NAMESPACE} | |
| namespace: ${TENANT_PROJECT_ID} | |
| annotations: | |
| config.kubernetes.io/depends-on: iam.cnrm.cloud.google.com/namespaces/${TENANT_PROJECT_ID}/IAMServiceAccount/${HELM_CHARTS_READER_GSA} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.1-alpine | |
| RUN gcloud components install kubectl | |
| RUN GKEKITCTL_VERSION=v0.1.1-alpha && \ | |
| GKEKITCTL_OS=amd64 && \ | |
| curl -sLSf -o /bin/gkekitctl https://github.com/GoogleCloudPlatform/gke-poc-toolkit/releases/download/${GKEKITCTL_VERSION}/gkekitctl-${GKEKITCTL_OS} && \ | |
| chmod +x /bin/gkekitctl | |
| ENTRYPOINT ["gkekitctl"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| # latest tag | |
| deny[msg] { | |
| input[i].Cmd == "from" | |
| val := split(input[i].Value[0], ":") | |
| count(val) == 1 | |
| msg = sprintf("Line %d: Do not use latest tag with image: %s", [i, val]) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: istio-ingressgateway | |
| namespace: istio-ingress | |
| spec: | |
| type: LoadBalancer | |
| selector: | |
| istio: ingressgateway | |
| ports: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| clusterName=crfa-external | |
| gcloud container clusters create $clusterName \ | |
| --zone=$zone \ | |
| --addons=HttpLoadBalancing,CloudRun \ | |
| --machine-type=n1-standard-2 \ | |
| --num-nodes=3 \ | |
| --enable-stackdriver-kubernetes | |
| gcloud container clusters get-credentials $clusterName \ | |
| --zone $zone | |
NewerOlder