crossplane-contrib / provider-upjet-aws

Official AWS Provider for Crossplane by Upbound.
https://marketplace.upbound.io/providers/upbound/provider-aws
Apache License 2.0
138 stars 117 forks source link

[Bug]: AWS API Gateway Provider Crashget #1132

Open robpi opened 5 months ago

robpi commented 5 months ago

Is there an existing issue for this?

Affected Resource(s)

apigateway.aws.upbound.io/v1beta1 - all

Resource MRs required to reproduce the bug

N/A -- This is just an install of the actual API Gateway Provider (v1), 0.47 worked fine.

Steps to Reproduce

What happened?

The pod is in a CrashLoopBackOff state instead of healthy

Relevant Error Output Snippet

These two error messages repeatedly show up in the logs:

W0206 20:53:33.607808       1 reflector.go:539] k8s.io/client-go@v0.29.0/tools/cache/reflector.go:229: failed to list *v1beta1.RestAPI: json: cannot unmarshal number into Go struct field RestAPIParameters.items.spec.forProvider.minimumCompressionSize of type string

E0206 20:53:33.607843       1 reflector.go:147] k8s.io/client-go@v0.29.0/tools/cache/reflector.go:229: Failed to watch *v1beta1.RestAPI: failed to list *v1beta1.RestAPI: json: cannot unmarshal number into Go struct field RestAPIParameters.items.spec.forProvider.minimumCompressionSize of type string

Crossplane Version

v1.14.5-up.1

Provider Version

v1.0

Kubernetes Version

1.28

Kubernetes Distribution

EKS

Additional Info

No response

mbbush commented 5 months ago

I was unable to reproduce this with the steps provided.

Given that provider version 1.0.0 changed the type of spec.forProvider.minimumCompressionSize from number to string, this sure looks like it's somehow related to the conversion webhooks. I suspect it will be necessary to have a v1beta1 RestApi which sets a number value for spec.forProvider.minimumCompressionSize present in the cluster, before doing the upgrade, in order to reproduce this bug, but I have not tried this yet.

cci-nithin commented 5 months ago

Same issue.

W0219 10:21:04.181515 1 reflector.go:539] k8s.io/client-go@v0.29.1/tools/cache/reflector.go:229: failed to list *v1beta1.RestAPI: json: cannot unmarshal number into Go struct field RestAPIParameters.items.spec.forProvider.minimumCompressionSize of type string E0219 10:21:04.181563 1 reflector.go:147] k8s.io/client-go@v0.29.1/tools/cache/reflector.go:229: Failed to watch *v1beta1.RestAPI: failed to list *v1beta1.RestAPI: json: cannot unmarshal number into Go struct field RestAPIParameters.items.spec.forProvider.minimumCompressionSize of type string