crossplane-contrib / provider-civo

Apache License 2.0
22 stars 22 forks source link

Can't create new pool in civo with crossplane #41

Open Dross86 opened 1 year ago

Dross86 commented 1 year ago

Hi,

I have created two pools using a sample yaml and it has worked correctly. When I try to add a third pool from the same yaml it doesn't get created. However, when I do a describe of civokubernetes, the cluster status shows the 3 pools. I share below the yaml used and the result of describe civokubernetes:

cluster.yaml:

kind: CivoKubernetes
apiVersion: cluster.civo.crossplane.io/v1alpha1
metadata:
  name: lab
spec:
  name: lab
  pools:
    - id: "8382e422-dcdd-461f-afb4-2ab67f171c3e"
      count: 2
      size: g3.k3s.small
    - id: "8482f422-dcdd-461g-afb4-2ab67f171c3e"
      count: 1
      size: g3.k3s.small
    - id: "8582g422-dcdd-461h-afb4-2ab67f171c3e"
      count: 3
      size: g3.k3s.small
  version: "1.22.2-k3s1"
  connectionDetails:
    connectionSecretNamePrefix: "cluster-details"
    connectionSecretNamespace: "default"
  providerConfigRef:
    name: civo-provider

kubectl describe civokubernetes lab:

Name:         lab
Namespace:    
Labels:       app.kubernetes.io/instance=civo
Annotations:  crossplane.io/external-name: lab
API Version:  cluster.civo.crossplane.io/v1alpha1
Kind:         CivoKubernetes
Metadata:
  Creation Timestamp:  2023-01-31T14:37:12Z
  Finalizers:
    finalizer.managedresource.crossplane.io
  Generation:  9
  Managed Fields:
    API Version:  cluster.civo.crossplane.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          f:crossplane.io/external-name:
        f:finalizers:
          .:
          v:"finalizer.managedresource.crossplane.io":
    Manager:      crossplane-civo-provider
    Operation:    Update
    Time:         2023-01-31T14:37:12Z
    API Version:  cluster.civo.crossplane.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        .:
        f:atProvider:
        f:conditions:
        f:message:
    Manager:      crossplane-civo-provider
    Operation:    Update
    Subresource:  status
    Time:         2023-02-01T09:08:43Z
    API Version:  cluster.civo.crossplane.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:kubectl.kubernetes.io/last-applied-configuration:
        f:labels:
          .:
          f:app.kubernetes.io/instance:
      f:spec:
        .:
        f:cni:
        f:connectionDetails:
          .:
          f:connectionSecretNamePrefix:
          f:connectionSecretNamespace:
        f:name:
        f:pools:
        f:providerConfigRef:
          .:
          f:name:
        f:version:
    Manager:         argocd-controller
    Operation:       Update
    Time:            2023-02-03T12:38:24Z
  Resource Version:  4521009
  UID:               86edb30b-745d-4179-ade4-007885026a19
Spec:
  Cni:  flannel
  Connection Details:
    Connection Secret Name Prefix:  cluster-details
    Connection Secret Namespace:    default
  Name:                             lab
  Pools:
    Count:  2
    Id:     8382e422-dcdd-461f-afb4-2ab67f171c3e
    Size:   g3.k3s.small
    Count:  1
    Id:     8482f422-dcdd-461g-afb4-2ab67f171c3e
    Size:   g3.k3s.small
    Count:  1
    Id:     8482g422-dcdd-461h-afb4-2ab67f171c3e
    Size:   g3.k3s.small
  Provider Config Ref:
    Name:   civo-provider
  Version:  1.22.2-k3s1
Status:
  At Provider:
  Conditions:
    Last Transition Time:  2023-01-31T14:37:13Z
    Reason:                ReconcileSuccess
    Status:                True
    Type:                  Synced
    Last Transition Time:  2023-02-01T09:08:43Z
    Reason:                Available
    Status:                True
    Type:                  Ready
  Message:                 Cluster is active
Events:                    <none>

Do you know if there is a problem with creating more pools from crossplane or if I'm doing something wrong?

sanzoghenzo commented 10 months ago

Hi, late to the party, but I found out that the "size" names have changed to g4s.kube.small.

It's a pity that this provider doesn't get much attention in updates and new features, Civo is a really great service...