crossplane-contrib / provider-upjet-aws

AWS Provider for Crossplane.
https://marketplace.upbound.io/providers/upbound/provider-family-aws/
Apache License 2.0
148 stars 125 forks source link

[Bug]: Node-Group MR status does not not reflect or update when node-group is upgrading versions #1570

Open whall89 opened 1 week ago

whall89 commented 1 week ago

Is there an existing issue for this?

Affected Resource(s)

eks.aws.upbound.io/v1beta1 -- NodeGroup

Resource MRs required to reproduce the bug

` - name: node-group base: apiVersion: eks.aws.upbound.io/v1beta1 kind: NodeGroup metadata: name: node-group labels: name: node-group cluster: cluster
spec: forProvider: region: us-east-1 clusterNameSelector: matchLabels: name: cluster nodeRoleArnSelector: matchLabels: name: cluster-node-role subnetIdSelector: matchLabels: name: cluster-private-subnet-01 scalingConfig:

Steps to Reproduce

  1. initiate upgrade of node group
  2. kubectl describe nodegroup.eks.aws.upbound.io/cluster-01-node-group
  3. confirm node-group is upgrading in AWS

What happened?

Relevant Error Output Snippet

Name:         cluster-01-node-group
Namespace:
Labels:       cluster=cluster-01
              crossplane.io/claim-name=cluster-01
              crossplane.io/claim-namespace=default
              crossplane.io/composite=cluster-01-XXXXX
              name=cluster-01-node-group
Annotations:  crossplane.io/composition-resource-name: node-group
              crossplane.io/external-create-pending: 2024-11-15T00:36:24Z
              crossplane.io/external-create-succeeded: 2024-11-15T00:36:24Z
              crossplane.io/external-name: cluster-01-node-group
API Version:  eks.aws.upbound.io/v1beta2
Kind:         NodeGroup
Metadata:
  Creation Timestamp:  2024-11-15T00:24:22Z
  Finalizers:
    finalizer.managedresource.crossplane.io
  Generate Name:  cluster-01-XXXXX-
  Generation:     6
  Owner References:
    API Version:           aws.example.org/v1alpha1
    Block Owner Deletion:  true
    Controller:            true
    Kind:                  XEKSCluster
    Name:                  cluster-01-XXXX
    UID:                   XXXXXX-XXXX-XXXX-XXXX
  Resource Version:        196408
  UID:                     XXXXXX-XXXX-XXXX-XXXX
Spec:
  Deletion Policy:  Delete
  For Provider:
    Ami Type:       AL2_x86_64
    Capacity Type:  ON_DEMAND
    Cluster Name:   cluster-01
    Cluster Name Ref:
      Name:  cluster-01
    Cluster Name Selector:
      Match Labels:
        Name:   cluster-01
    Disk Size:  20
    Instance Types:
      t3.micro
    Node Role Arn:  arn:aws:iam::***************:role/cluster-01-node-role
    Node Role Arn Ref:
      Name:  cluster-01-node-role
    Node Role Arn Selector:
      Match Labels:
        Name:  cluster-01-node-role
    Region:    us-east-1
    Scaling Config:
      Desired Size:  10
      Max Size:      10
      Min Size:      1
    Subnet Id Refs:
      Name:  cluster-01-private-subnet-01
    Subnet Id Selector:
      Match Labels:
        Name:  cluster-01-private-subnet-01
    Subnet Ids:
      subnet-08cce6e0ee4860a82
    Tags:
      Name:                         cluster-01-node-group
      Crossplane - Kind:            nodegroup.eks.aws.upbound.io
      Crossplane - Name:            cluster-01-node-group
      Crossplane - Providerconfig:  aws-provider
    Update Config:
      Max Unavailable:  1
    Version:            1.28
  Init Provider:
  Management Policies:
    *
  Provider Config Ref:
    Name:  aws-provider
Status:
  At Provider:
    Ami Type:       AL2_x86_64
    Arn:            arn:aws:eks:us-east-1:***************:nodegroup/cluster-01/cluster-01-node-group/XXXXXX-XXXX-XXXX-XXXX
    Capacity Type:  ON_DEMAND
    Cluster Name:   cluster-01
    Disk Size:      20
    Id:             cluster-01:cluster-01-node-group
    Instance Types:
      t3.micro
    Node Role Arn:    arn:aws:iam::***************:role/cluster-01-node-role
    Release Version:  1.28.13-20241109
    Resources:
      Autoscaling Groups:
        Name:                           eks-cluster-01-node-group-XXXXXX-XXXX-XXXX-XXXX
      Remote Access Security Group Id:
    Scaling Config:
      Desired Size:  10
      Max Size:      10
      Min Size:      1
    Status:          ACTIVE
    Subnet Ids:
      subnet-08cce6e0ee4860a82
    Tags:
      Name:                         cluster-01-node-group
      Crossplane - Kind:            nodegroup.eks.aws.upbound.io
      Crossplane - Name:            cluster-01-node-group
      Crossplane - Providerconfig:  aws-provider
    Tags All:
      Name:                         cluster-01-node-group
      Crossplane - Kind:            nodegroup.eks.aws.upbound.io
      Crossplane - Name:            cluster-01-node-group
      Crossplane - Providerconfig:  aws-provider
    Taint:
    Update Config:
      Max Unavailable:             1
      Max Unavailable Percentage:  0
    Version:                       1.28
  Conditions:
    Last Transition Time:  2024-11-15T21:17:31Z
    Reason:                ReconcileSuccess
    Status:                True
    Type:                  Synced
    Last Transition Time:  2024-11-15T00:38:45Z
    Reason:                Available
    Status:                True
    Type:                  Ready
    Last Transition Time:  2024-11-15T21:17:33Z
    Reason:                Success
    Status:                True
    Type:                  LastAsyncOperation
Events:                    <none>

Crossplane Version

1.18

Provider Version

1.16

Kubernetes Version

1.28

Kubernetes Distribution

EKS

Additional Info

having MR status correctly reflect actual status of AWS resource is important for sequencing upgrades

available status for node-group

status The current status of the managed node group.

Type: String

Valid Values: CREATING | ACTIVE | UPDATING | DELETING | CREATE_FAILED | DELETE_FAILED | DEGRADED