Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Failing to convert AutoScalingGroup.launchTemplate from list to array #1394

Open
1 task done
josegonzalez opened this issue Jul 9, 2024 · 6 comments
Open
1 task done
Labels
bug Something isn't working needs:triage

Comments

@josegonzalez
Copy link

josegonzalez commented Jul 9, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

  • autoscaling.aws.upbound.io/v1beta3 - AutoscalingGroup

Resource MRs required to reproduce the bug

apiVersion: autoscaling.aws.upbound.io/v1beta1
kind: AutoscalingGroup
metadata:
  name: "dev-us-east-1-private-consul"
  namespace: "dev"
  labels:
    name: "dev-us-east-1-private-consul"
    environment: "dev"
    region: "us-east-1"
spec:
  forProvider:
    # prettier-ignore
    desiredCapacity: 3
    # prettier-ignore
    maxSize: 3
    # prettier-ignore
    minSize: 3
    launchTemplate:
      - version: "$Latest"
        idSelector:
          matchLabels:
            name: "dev-us-east-1-private-consul"
            environment: "dev"
            region: "us-east-1"
    region: "us-east-1"
    tag:
      - key: Name
        value: "dev-us-east-1-private-consul"
      - key: environment
        value: "dev"
      - key: managed-by
        value: crossplane
    vpcZoneIdentifierSelector:
      matchLabels:
        subnet-type: "private"
        environment: "dev"
        vpc-name: "dev-us-east-1"

Steps to Reproduce

Apply the above manifest (with a matching template/subnet)

What happened?

Missing launchTemplate property on the converted v1beta3 resource.

Relevant Error Output Snippet

Message:               create failed: async create failed: failed to create the resource: [{0 creating Auto Scaling Group (dev-us-east-1-private-consul): operation error Auto Scaling: CreateAutoScalingGroup, https response error StatusCode: 400, RequestID: 7ebe95af-e405-4fcb-9a7a-dc53a888d835, api error ValidationError: Valid requests must contain either LaunchTemplate, LaunchConfigurationName, InstanceId or MixedInstancesPolicy parameter.  []}]

Spec


Spec:
  Deletion Policy:  Delete
  For Provider:
    Desired Capacity:  3
    Max Size:          3
    Min Size:          3
    Region:            us-east-1
    Tag:
      Key:    Name
      Value:  dev-us-east-1-private-consul
      Key:    environment
      Value:  dev
      Key:    managed-by
      Value:  crossplane
    Vpc Zone Identifier:
      subnet-12345
      subnet-67890
      subnet-45678
    Vpc Zone Identifier Refs:
      Name:  dev-us-east-1c-private
      Name:  dev-us-east-1b-private
      Name:  dev-us-east-1a-private
    Vpc Zone Identifier Selector:
      Match Labels:
        environment:  dev
        subnet-type:  private
        vpc-name:     dev-us-east-1
  Init Provider:
  Management Policies:
    *
  Provider Config Ref:
    Name:  default

Crossplane Version

1.16.0

Provider Version

1.8.0

Kubernetes Version

Client Version: v1.30.1 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.29.4-eks-036c24b

Kubernetes Distribution

EKS

Additional Info

Works fine if I manually change it and switch to the v1beta3 resource myself with the requisite resource changes.

See https://crossplane.slack.com/archives/C05E0UE46S2/p1720556633009269 for more discussion.

Maybe related: #1332

@josegonzalez josegonzalez added bug Something isn't working needs:triage labels Jul 9, 2024
@turkenf
Copy link
Collaborator

turkenf commented Jul 9, 2024

Since the launchTemplate field is an object in the v1beta3 version, please try without - :

    launchTemplate:
      version: "$Latest"
      idSelector:

@josegonzalez
Copy link
Author

Yeah I'm aware, but I was using the v1beta1 object. That should either:

  • be allowed to work as is
  • be migrated to the correct format

Currently it is silently ignored.

@turkenf
Copy link
Collaborator

turkenf commented Jul 9, 2024

In the example you gave, you used apiVersion: autoscaling.aws.upbound.io/v1beta3, I could not fully understand your issue.

You can continue to use the v1beta1 version as is, and if you have existing resources it should not be affected.

@josegonzalez
Copy link
Author

Sorry that was a typo. I initially used v1beta1, verified it wouldn't update, then was swapping to v1beta3 with the correct changes. I've updated the example to what the resource was from my git repo.

Copy link

github-actions bot commented Oct 9, 2024

This provider repo does not have enough maintainers to address every issue. Since there has been no activity in the last 90 days it is now marked as stale. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

@github-actions github-actions bot added the stale label Oct 9, 2024
@josegonzalez
Copy link
Author

This is still a bug afaik.

@github-actions github-actions bot removed the stale label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs:triage
Projects
None yet
Development

No branches or pull requests

2 participants