pipeline:
- functionRef:
name: crossplane-contrib-function-kcl
input:
apiVersion: template.fn.crossplane.io/v1beta1
kind: KCLInput
This file contains 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 | |
set -e | |
if [ ! -z "$DEBUG" ] ; then | |
set -x | |
fi | |
REGIONS="us-east-2 | |
us-east-1 |
This file contains 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 | |
NAMESPACE=crossplane-system | |
# Define secret names |
This file contains 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
- step: addon-keyvault-secrets-provider | |
functionRef: | |
name: crossplane-contrib-function-go-templating | |
input: | |
apiVersion: gotemplating.fn.crossplane.io/v1beta1 | |
kind: GoTemplate | |
source: Inline | |
inline: | |
template: | | |
{{ if and (ne $.observed.resources nil) }} |
This file contains 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 | |
items: | |
- apiVersion: ec2.aws.upbound.io/v1beta1 | |
kind: SecurityGroup | |
metadata: | |
name: my-db-b9t8p-scfnc | |
spec: | |
forProvider: | |
description: Allow access to PostgreSQL | |
name: uxp-getting-started |
This file contains 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
## get all managed resources | |
kubectl get managed -l crossplane.io/claim-name=test123 -o yaml >> export.yaml | |
## use only .items[] | |
cat export.yaml | yq e -P '.items' >> temp.yaml | |
## create individual files | |
yq '.[]' temp.yaml -s '"backup_" + .kind +"_"+ .metadata.name' | |
## add paused annotation | |
for file in backup* ; do yq eval '.metadata.annotations += {"crossplane.io/paused": "true"}' -i "$file"; done | |
## apply all files | |
kubectl apply --dry-run=client $(ls backup*.yml | awk ' { print " -f " $1 } ') |
This file contains 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: escalation.pagerduty.crossplane.io/v1alpha1 | |
kind: Policy | |
metadata: | |
annotations: | |
meta.upbound.io/example-id: escalation/v1alpha1/policy | |
labels: | |
testing.upbound.io/example-name: example | |
name: example | |
spec: | |
forProvider: |
This file contains 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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch Package", | |
"type": "go", | |
"request": "launch", |
This file contains 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 | |
set -e | |
## use this script if you what you want to do ;) | |
## check that crossplane is running as minimum with | |
## resources: | |
## limits: | |
## cpu: 2000m | |
## memory: 2Gi |
This file contains 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 | |
set -e | |
uidpath=$(kubectl get cluster.container.gcp.upbound.io/nodepool -o jsonpath='{.metadata.uid}') | |
echo $uidpath | |
kubectl get pods -n crossplane-system | grep "provider-gcp" | awk {'print $1'} | xargs -I% kubectl exec -it % -n crossplane-system -- /bin/bash -c "cd /tmp/$uidpath/; sed -i 's/\"lifecycle\":{\"prevent_destroy\":true},//g' main.tf.json; terraform init; terraform plan" |
NewerOlder