-
Notifications
You must be signed in to change notification settings - Fork 622
Description
/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/[email protected]/api/v1beta2/awscluster_webhook.go:54:12: undefined: webhook.Validator
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/[email protected]/api/v1beta2/awscluster_webhook.go:55:12: undefined: webhook.Defaulter
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/[email protected]/api/v1beta2/awsclustercontrolleridentity_webhook.go:46:12: undefined: webhook.Validator
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/[email protected]/api/v1beta2/awsclustercontrolleridentity_webhook.go:47:12: undefined: webhook.Defaulter
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/[email protected]/api/v1beta2/awsclusterroleidentity_webhook.go:44:12: undefined: webhook.Validator
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/[email protected]/api/v1beta2/awsclusterroleidentity_webhook.go:45:12: undefined: webhook.Defaulter
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/[email protected]/api/v1beta2/awsclusterstaticidentity_webhook.go:44:12: undefined: webhook.Validator
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/[email protected]/api/v1beta2/awsclusterstaticidentity_webhook.go:45:12: undefined: webhook.Defaulter
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/[email protected]/api/v1beta2/awsclustertemplate_webhook.go:38:15: undefined: webhook.Defaulter
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/[email protected]/api/v1beta2/awsclustertemplate_webhook.go:39:15: undefined: webhook.Validator
../../../go/pkg/mod/sigs.k8s.io/cluster-api-provider-aws/[email protected]/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 : 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