Giter Site home page Giter Site logo

crossplane-tutorial's Introduction

crossplane-tutorial's People

Contributors

irizzant avatar karjack182 avatar lvaylet avatar michaelin avatar royveshovda avatar vfarcic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

crossplane-tutorial's Issues

Issue with azure-v1-sql example

the file azure-sql-v1.yaml has the wrong name for the secret I think my-db-20240114235140-password.
Considering the composition in sql-v1/azure.yaml is referencing my-db-password name.

Files published unintentionally

Hi Master

Maybe I should say 'Hi Main', bad joke sorry.

Even though they are listed in your gitignore, you have published the kubeconfig.yaml and gke_gcloud_auth_plugin_cache.

Is that on purpose ?

Looking forward for the matching video.

AWS - Compositions - Cannot find version 15.3 for postgres

@vfarcic Great work with the tutorials!
I'm currently working through them and adapting where required for specific enterprise constraints.

We encounter an issue under Crossplane Compositions | Tutorial (Part 3) when creating the AWS RDS database ( See [ 1 ] )
It appears Postgres version 15.3 has now dropped off.

crossplane-tutorial/compositions/sql-v1/aws.yaml needs updating to 15.4 or higher.
After this version bump, RDS instance comes up fine ๐Ÿ‘

  - name: rdsinstance
    base:
      apiVersion: rds.aws.upbound.io/v1beta1
      kind: Instance
      spec:
        forProvider:
          region: us-east-1
          dbSubnetGroupNameSelector:
            matchLabels:
              crossplane.io/composite: my-db
          vpcSecurityGroupIdSelector:
            matchLabels:
              crossplane.io/composite: my-db
          instanceClass: db.m5.large
          username: masteruser
          engine: postgres
          engineVersion: "15.4" # Bumping version. InvalidParameterCombination: Cannot find version 15.3 for postgres
          skipFinalSnapshot: true
          publiclyAccessible: true
          allocatedStorage: 200
          passwordSecretRef:
            namespace: crossplane-system
            key: password
            name: my-db-password

You can quicky get the supported engine versions

aws rds describe-db-engine-versions --engine postgres |  jq -r '.DBEngineVersions[].EngineVersion'
11.22
12.15
12.16
12.17
12.18
13.11
13.12
13.13
13.14
14.9
14.10
14.11
**15.4**
15.5
15.6
16.1
16.2

[ 1 ]

crossplane beta trace sql my-db -o wide
NAME                                       RESOURCE                    SYNCED   READY   STATUS
SQL/my-db                                                              True     False   Creating: Unready resources: rdsinstance
โ”œโ”€ VPC/my-db-dxzld                         vpc                         True     True    Available
โ”œโ”€ Subnet/my-db-z6zlj                      subnet-a                    True     True    Available
โ”œโ”€ Subnet/my-db-vplhb                      subnet-b                    True     True    Available
โ”œโ”€ Subnet/my-db-lrpx5                      subnet-c                    True     True    Available
โ”œโ”€ SubnetGroup/my-db-gxwnd                 subnetgroup                 True     True    Available
โ”œโ”€ InternetGateway/my-db-cxrmx             gateway                     True     True    Available
โ”œโ”€ RouteTable/my-db-bm28k                  routeTable                  True     True    Available
โ”œโ”€ Route/my-db-nzjrc                       route                       True     True    Available
โ”œโ”€ MainRouteTableAssociation/my-db-8sc84   mainRouteTableAssociation   True     True    Available
โ”œโ”€ RouteTableAssociation/my-db-rr46p       routeTableAssociation1a     True     True    Available
โ”œโ”€ RouteTableAssociation/my-db-lzmmk       routeTableAssociation1b     True     True    Available
โ”œโ”€ RouteTableAssociation/my-db-wbhnr       routeTableAssociation1c     True     True    Available
โ”œโ”€ SecurityGroup/my-db-gc4sl               securityGroup               True     True    Available
โ”œโ”€ SecurityGroupRule/my-db-vcqff           securityGroupRule           True     True    Available
โ””โ”€ Instance/my-db-gv8xl                    rdsinstance                 True     False   Creating

Status:
  At Provider:
  Conditions:
    Last Transition Time:  2024-05-01T10:58:22Z
    Reason:                ReconcileSuccess
    Status:                True
    Type:                  Synced
    Last Transition Time:  2024-05-01T10:58:22Z
    Reason:                Creating
    Status:                False
    Type:                  Ready
    Last Transition Time:  2024-05-01T11:18:56Z
    Message:               async create failed: failed to create the resource: [{0 creating RDS DB Instance (terraform-20240501111853069300000052): InvalidParameterCombination: Cannot find version 15.3 for postgres
                           status code: 400, request id: 6ebff90e-f75e-4f57-859d-3d0bd9837ef6  []}]
    Reason:                AsyncCreateFailure
    Status:                False
    Type:                  LastAsyncOperation
Events:
  Type     Reason                           Age                 From                                               Message
  ----     ------                           ----                ----                                               -------
  Warning  CannotResolveResourceReferences  28m (x5 over 29m)   managed/rds.aws.upbound.io/v1beta2, kind=instance  cannot resolve references: mg.Spec.ForProvider.VPCSecurityGroupIds: referenced field was empty (referenced resource may not yet be ready)
  Normal   PendingExternalResource          23m (x23 over 27m)  managed/rds.aws.upbound.io/v1beta2, kind=instance  Waiting for external resource existence to be confirmed
  Normal   CreatedExternalResource          2m (x33 over 28m)   managed/rds.aws.upbound.io/v1beta2, kind=instance  Successfully requested creation of external resource

GH CLI using git/ssh

ArgoCD got a SSH_AUTH_SOCCK error after running your setup/00-intro.sh script. By manually changing to https (from git@) instead, everything started to work. I narrowed this down to me using GH CLI with git/ssh protocol. And when I do, this line REPO_URL=$(git config --get remote.origin.url) gives me [email protected].....

I made a workaround for myself changing:
REPO_URL=$(git config --get remote.origin.url)

to

REPO_URL_RAW=$(git config --get remote.origin.url)
REPO_URL=$(echo $REPO_URL_RAW | sed 's/git@/https:\/\//') # replace git@ to https://

A tiny bit tacky, but happy to make a PR with the change. I started with an issue, in case there are better ways of doing this with argocd and ssh/git protocol?

ReconcileError in Intro chapter

Thank Viktor for this amazing tutorial.

I just encountered a ReconcileError in Intro chapter. I followed all steps, but when I want to confirm if claims are resolved and provisioned, the errors came out.

$ kubectl get managed 
NAME                                                    KIND         PROVIDERCONFIG   SYNCED   READY   AGE
object.kubernetes.crossplane.io/silly-demo-deployment   Deployment   cluster-01       False            16m
object.kubernetes.crossplane.io/silly-demo-ingress      Ingress      cluster-01       False            16m
object.kubernetes.crossplane.io/silly-demo-secret       Secret       cluster-01       False            16m
object.kubernetes.crossplane.io/silly-demo-service      Service      cluster-01       False            16m
$ crossplane beta trace clusterclaim cluster-01 --namespace a-team
NAME                                   SYNCED   READY   STATUS
ClusterClaim/cluster-01 (a-team)       True     False   Waiting: Claim is waiting for composite resource to become Ready
โ””โ”€ CompositeCluster/cluster-01-kt9h7   False    -       ReconcileError: cannot select Composition: no compatible Compositions found
$ crossplane beta trace sqlclaim silly-demo-db --namespace a-team
NAME                              SYNCED   READY   STATUS
SQLClaim/silly-demo-db (a-team)   True     False   Waiting: Claim is waiting for composite resource to become Ready
โ””โ”€ SQL/silly-demo-db-gqr2q        False    -       ReconcileError: cannot select Composition: no compatible Compositions found

Gist Part 3 + Video continuity issue

@vfarcic

Found small continuity issue within Gist Part 3 related video

I believe we should use sql-v2 rather than sql-v1 with the change from matchLabels to use matchControllerRef confirmation, otherwise we are just applying the same composition as before...

#####################################
# Resource References and Selectors #
#####################################

cat examples/$HYPERSCALER-vm.yaml

cat compositions/sql-v1/$HYPERSCALER.yaml

cat compositions/sql-v2/$HYPERSCALER.yaml

# kubectl apply --filename compositions/sql-v1 # <-- Should be sql-v2
kubectl apply --filename compositions/sql-v2

kubectl delete --filename examples/$HYPERSCALER-sql-v1.yaml # <-- This is correct

kubectl get managed

awscli2 currently not working in nix-shell (unstable)

There is an error when trying to use awscli2 from nix-shell and the default unstable channel. Switching to the latest release channel did not solve the problem either (3 or 4 of the other packages does not exist in 23.10). Pinning version would probably solve this, but my knowledge in Nix is a bit too limited as of now.

Should be solved very soon, I hope from this PR: NixOS/nixpkgs#296007 (which is already merged)

Status here: https://nixpk.gs/pr-tracker.html?pr=296007

As soon as the status for nixpkgs-unstable goes green, this should not be a problem anymore.

Workaround:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.