Skip to content

ClusterAPI Provider AWS v2.8.2 incompatible with Controller Runtime v0.20.4 #5446

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

Open
Archisman-Mridha opened this issue Mar 25, 2025 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@Archisman-Mridha
Copy link

/kind bug

What steps did you take and what happened:

I am using both ClusterAPI Provider AWS and Controller Runtime in a Go project.

When I do go mod tidy, it runs successfully and this gets added to my go.mod file :

	sigs.k8s.io/cluster-api-provider-aws/v2 v2.8.2
	sigs.k8s.io/controller-runtime v0.20.4

However, an unexpected error gets thrown while I try to run the Go project :

# sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/v2@v2.8.2/api/v1beta2/awscluster_webhook.go:54:12: undefined: webhook.Validator
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/v2@v2.8.2/api/v1beta2/awscluster_webhook.go:55:12: undefined: webhook.Defaulter
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/v2@v2.8.2/api/v1beta2/awsclustercontrolleridentity_webhook.go:46:12: undefined: webhook.Validator
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/v2@v2.8.2/api/v1beta2/awsclustercontrolleridentity_webhook.go:47:12: undefined: webhook.Defaulter
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/v2@v2.8.2/api/v1beta2/awsclusterroleidentity_webhook.go:44:12: undefined: webhook.Validator
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/v2@v2.8.2/api/v1beta2/awsclusterroleidentity_webhook.go:45:12: undefined: webhook.Defaulter
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/v2@v2.8.2/api/v1beta2/awsclusterstaticidentity_webhook.go:44:12: undefined: webhook.Validator
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/v2@v2.8.2/api/v1beta2/awsclusterstaticidentity_webhook.go:45:12: undefined: webhook.Defaulter
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/v2@v2.8.2/api/v1beta2/awsclustertemplate_webhook.go:38:15: undefined: webhook.Defaulter
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/v2@v2.8.2/api/v1beta2/awsclustertemplate_webhook.go:39:15: undefined: webhook.Validator
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/v2@v2.8.2/api/v1beta2/awsclustertemplate_webhook.go:39:15: too many errors

What did you expect to happen:

I expected :

  • either go mod tidy to error out complaining about incompatible depenedency versions.
  • or the Go project to run properly, since go mod tidy ran successfully.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

The error most probably occurs because of this merged PR : ⚠️ : (go/v4): Replace usage of deprecated webhook.Validator and webhook.Defaulter interfaces in the kubebuilder repository.

Currently, I have added the following in my go.mod file :

replace (
	sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.19.6
)

It'll be nice, if you guys warn users about this somewhere in the README.

Environment:

  • Cluster-api-provider-aws version: v2.8.2
  • GoLang version : 1.24.0
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 25, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

2 participants