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]: SSA doesn't delete the fields that are part of another field that goes through version conversion #1628

Open
1 task done
r-nasiri opened this issue Jan 7, 2025 · 1 comment
Labels
bug Something isn't working needs:triage

Comments

@r-nasiri
Copy link

r-nasiri commented Jan 7, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

all resources that have version conversion

Resource MRs required to reproduce the bug

apiVersion: ec2.aws.upbound.io/v1beta2
kind: LaunchTemplate
metadata:
  name: ssa-test1
spec:
  forProvider:
    imageId: ami-074be47313f84fa38
    instanceInitiatedShutdownBehavior: terminate
    instanceType: t3.micro
    name: example
    region: us-west-2
    instanceMarketOptions:
      marketType: spot
      spotOptions:
        maxPrice: "0.06"
    tags:
      example: "true"
  managementPolicies:
  - Create
  - Update
  - Delete
  - Observe
  providerConfigRef:
    name: aws-provider-config         

Steps to Reproduce

  • Create a LaunchTemplate using v1beta2 version as provided in the example using SSA.
  • Make sure the resource is created
  • Remove spotOptions from manifest and update using SSA.
  • MR should not have the spotOptions anymore.

What happened?

when removing a field that was converted from array to object type in new versions, those fields are not removed when using server side apply. If you change the manifest to v1beta1 version(Storage version), it works as expected.

Relevant Error Output Snippet

No response

Crossplane Version

1.16.0

Provider Version

1.18.2

Kubernetes Version

1.29

Kubernetes Distribution

EKS

Additional Info

No response

@r-nasiri r-nasiri added bug Something isn't working needs:triage labels Jan 7, 2025
@mergenci
Copy link
Collaborator

Small discussion in Crossplane Slack: https://crossplane.slack.com/archives/C05T19TB729/p1737383701718359. I asked whether the issue occurred in client-side apply. @r-nasiri replied:

If you use client side apply, it removes the filed as it won't care what is the stored version. it might be something to do with the diff . If I run kubectl diff --server-side when the resource was created using SSA, it doesn't show any changes after removing the filed either

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