VictoriaMetrics / operator

Kubernetes operator for Victoria Metrics
Apache License 2.0
426 stars 142 forks source link

operator api usage deprecated autoscaling/v2beta2 blocks update of Azure Kubernetes Service #864

Closed SaschaJohn closed 8 months ago

SaschaJohn commented 8 months ago

Hello VM team,

we're currently doing an upgrade from AKS 1.25 to 1.27. During the upgrade, the service scans for usage of deprecated APIs, that will be removed in the current upgrade path. We came across the error of autoscaling/v2beta2 used from vmoperator which is deprecated since 1.23 and was removed in 1.26.

You already made the operator compatible with https://github.com/VictoriaMetrics/operator/issues/583

However I see a problem in the order of the API usage.

1,25 supports API version supports v2beta2, therefore function IsHPAV2BetaSupported returns true and https://github.com/VictoriaMetrics/operator/blob/bfc521d3b22d696c2244318a2d93a5fee7a93452/controllers/factory/builders.go#L405 takes the beta in favor of the stable version. In 1.26 the beta api was removed. This blocks the upgrade path.

Do you any need to support the beta api? Otherwise I suggest to remove it from the controllers factory builders,

Best

/Sascha

f41gh7 commented 8 months ago

Hello, thanks for detailed bug report @Haleygo can you please take a look?

SaschaJohn commented 8 months ago

Bug fixed in next release after v0.41.1 from 1 Feb 2024. Thank you very much @f41gh7 @Haleygo !