Skip to content

Instantly share code, notes, and snippets.

View mad01's full-sized avatar
🐨

Alexander Brandstedt mad01

🐨
View GitHub Profile

Creates a kind cluster named "local-dev", deploys crossplane, deploys a locally built provider-kubernetes

make local-deploy

Stop Crossplane

kubectl -n crossplane-system scale deploy crossplane --replicas=0
#!/bin/sh
echo "run script with ./path-duplicates.sh | column -t | sort "
echo "-------------- paths"
echo "$PATH" | tr ':' '\n'
echo ""
echo "--------------"
# turn off filename globbing, and
unable to recognize "eu-west-1-prod-v1/clusterrolebindings/eu2-prod-nginx-controller-nginx-ingress-scoped.yaml": no matches for kind "Cluster" in version "kind.x-k8s.io/v1alpha4"
Error from server (Invalid): error when creating "eu-west-1-prod-v1/clusterrolebindings/eu2-prod-nginx-controller-nginx-ingress-scoped.yaml": CustomResourceDefinition.apiextensions.k8s.io "networksets.crd.projectcalico.org" is invalid: [spec.versions[0].schema.openAPIV3Schema: Required value: schemas are required, spec.preserveUnknownFields: Invalid value: true: cannot set to true, set x-preserve-unknown-fields to true in spec.versions[*].schema instead]
Error from server (Invalid): error when creating "eu-west-1-prod-v1/clusterrolebindings/eu2-prod-nginx-controller-nginx-ingress-scoped.yaml": CustomResourceDefinition.apiextensions.k8s.io "globalnetworksets.crd.projectcalico.org" is invalid: [spec.versions[0].schema.openAPIV3Schema: Required value: schemas are required, spec.preserveUnknownFields: Invalid value: true: cannot set to t
@mad01
mad01 / github-add-webhook.sh
Created March 12, 2021 13:25
Shell script to add webook config for jenkins
#!/bin/bash -
set -o nounset
ORG=foo
REPO=bar
JENKINS_URL="https://jenkins.com/github-webhook/"
PAYLOAD=$(
echo '{"events": ["push", "pull_request"], "config":{"url":"$JENKINS_URL","content_type":"json","secret":"$WEBHOOK_SECRET","insecure_ssl":"0"}}' \
| jq -r \
--arg url "$JENKINS_URL" \
apiVersion: skaffold/v2alpha2
kind: Config
build:
artifacts:
- image: gcr.io/container-registry-259614/demo/istio/backend
context: src/backend
- image: gcr.io/container-registry-259614/demo/istio/frontend
context: src/frontend
- image: gcr.io/container-registry-259614/demo/istio/sleep
context: src/sleep
### Keybase proof
I hereby claim:
* I am mad01 on github.
* I am mad_ (https://keybase.io/mad_) on keybase.
* I have a public key ASCvXCBT4aBRWGp-2V5vNfi6t8BLn55iu-SUoxc9L_jIuQo
To claim this, I am signing this object: