Skip to content

dmaganto/crossplane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crossplane

The aim of this repository is to test crossplane and create set of resources to remember in the future how it works.

How it works

architecture

Install crossplane

kubectl create namespace crossplane-system
helm repo add crossplane-stable <https://charts.crossplane.io/stable>
helm repo update

helm install crossplane --namespace crossplane-system crossplane-stable/crossplane

Configure credentials

Create a file credentials.txt:

[default]
aws_access_key_id = <aws_access_key>
aws_secret_access_key = <aws_secret_key>
kubectl create secret \
generic aws-secret \
-n crossplane-system \
--from-file=creds=./credentials.txt

Install provider AWS

You have two options, oficial crossplane or aws contrib

cat <<EOF | kubectl apply -f -
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-aws
spec:
  package: xpkg.upbound.io/crossplane-contrib/provider-aws:v0.33.0
EOF
cat <<EOF | kubectl apply -f -
apiVersion: aws.crossplane.io/v1beta1
kind: ProviderConfig
metadata:
  name: provider-config-aws
spec:
  credentials:
    secretRef:
      namespace: crossplane-system
      name: aws-secret
      key: creds
    source: Secret
  endpoint:
    url:
      dynamic:
        host: amazonaws.com
        protocol: https
      type: Dynamic
EOF

Notes

  1. Create composition

  2. Create the CRD (a.k.a XRD) that using prior composition 1

  3. Create the XMR using composition 1 and XRD 2 (non namespaced)

  4. Create another XMR using composition 1 and XRD 2 (non namespaced)

  5. Create claim using composition 1 and XRD 2 (namespaced)

  6. Create composition with parameters

  7. Create claim using composition 7 and XRD 2 (namespaced)

  8. Create composition with parameters and labels

  9. Create claim using composition 9 and XRD 2 (namespaced) with proper label --> works

  10. Create claim using composition 9 and XRD 2 (namespaced) with no proper label --> doesn't work

  11. Create claim using composition 9 and XRD 2 (namespaced) without labels --> works

  12. Import DynamoDB table already exists in AWS

  13. Import S3 table already exists in AWS

  14. Create isolated DynamoDB table MR

  15. Create isolated S3 MR

Documentation

Useful commands

k get composite -A #get all composites (resource created throught composition)

About

repository to test crossplane

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published