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

Up to weave gitops main (including controller-runtime 0.15.0) #3041

Closed
wants to merge 7 commits into from

Conversation

foot
Copy link
Collaborator

@foot foot commented Jul 5, 2023

Deps were updated in OSS in weaveworks/weave-gitops#3811

Controller-runtime 0.15.0 seems to require k8s 0.27, compiling with 0.26:

❯ make build
CGO_ENABLED=1 go build -ldflags "-linkmode external -w" -a -installsuffix cgo -o bin/clusters-service main.go
# sigs.k8s.io/controller-runtime/pkg/internal/source
../../../../go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:56:18: undefined: wait.PollUntilContextCancel
# sigs.k8s.io/controller-runtime/pkg/certwatcher
../../../../go/pkg/mod/sigs.k8s.io/[email protected]/pkg/certwatcher/certwatcher.go:98:18: undefined: wait.PollUntilContextTimeout
make: *** [build] Error 1

From kubernetes/kubernetes@133dd61

After upgrading to 0.27:

❯ make build
CGO_ENABLED=1 go build -ldflags "-linkmode external -w" -a -installsuffix cgo -o bin/clusters-service main.go
# github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1
../../../../go/pkg/mod/github.com/external-secrets/[email protected]/apis/externalsecrets/v1beta1/secretstore_validator.go:25:35: cannot use &GenericStoreValidator{} (value of type *GenericStoreValidator) as admission.CustomValidator value in variable declaration: *GenericStoreValidator does not implement admission.CustomValidator (wrong type for method ValidateCreate)
		have ValidateCreate(context.Context, "k8s.io/apimachinery/pkg/runtime".Object) error
		want ValidateCreate(context.Context, "k8s.io/apimachinery/pkg/runtime".Object) (admission.Warnings, error)
../../../../go/pkg/mod/github.com/external-secrets/[email protected]/apis/externalsecrets/v1beta1/externalsecret_webhook.go:24:17: cannot use &ExternalSecretValidator{} (value of type *ExternalSecretValidator) as admission.CustomValidator value in argument to ctrl.NewWebhookManagedBy(mgr).For(r).WithValidator: *ExternalSecretValidator does not implement admission.CustomValidator (wrong type for method ValidateCreate)
		have ValidateCreate(context.Context, "k8s.io/apimachinery/pkg/runtime".Object) error
		want ValidateCreate(context.Context, "k8s.io/apimachinery/pkg/runtime".Object) (admission.Warnings, error)
../../../../go/pkg/mod/github.com/external-secrets/[email protected]/apis/externalsecrets/v1beta1/secretstore_webhook.go:24:17: cannot use &GenericStoreValidator{} (value of type *GenericStoreValidator) as admission.CustomValidator value in argument to ctrl.NewWebhookManagedBy(mgr).For(c).WithValidator: *GenericStoreValidator does not implement admission.CustomValidator (wrong type for method ValidateCreate)
		have ValidateCreate(context.Context, "k8s.io/apimachinery/pkg/runtime".Object) error
		want ValidateCreate(context.Context, "k8s.io/apimachinery/pkg/runtime".Object) (admission.Warnings, error)
../../../../go/pkg/mod/github.com/external-secrets/[email protected]/apis/externalsecrets/v1beta1/secretstore_webhook.go:31:17: cannot use &GenericStoreValidator{} (value of type *GenericStoreValidator) as admission.CustomValidator value in argument to ctrl.NewWebhookManagedBy(mgr).For(c).WithValidator: *GenericStoreValidator does not implement admission.CustomValidator (wrong type for method ValidateCreate)
		have ValidateCreate(context.Context, "k8s.io/apimachinery/pkg/runtime".Object) error
		want ValidateCreate(context.Context, "k8s.io/apimachinery/pkg/runtime".Object) (admission.Warnings, error)
# sigs.k8s.io/cluster-api/api/v1beta1
../../../../go/pkg/mod/sigs.k8s.io/[email protected]/api/v1beta1/machine_webhook.go:45:27: cannot use &Machine{} (value of type *Machine) as admission.Validator value in variable declaration: *Machine does not implement admission.Validator (wrong type for method ValidateCreate)
		have ValidateCreate() error
		want ValidateCreate() (admission.Warnings, error)
../../../../go/pkg/mod/sigs.k8s.io/[email protected]/api/v1beta1/machinedeployment_webhook.go:56:27: cannot use &MachineDeployment{} (value of type *MachineDeployment) as admission.Validator value in variable declaration: *MachineDeployment does not implement admission.Validator (wrong type for method ValidateCreate)
		have ValidateCreate() error
		want ValidateCreate() (admission.Warnings, error)
../../../../go/pkg/mod/sigs.k8s.io/[email protected]/api/v1beta1/machinedeployment_webhook.go:61:16: assignment mismatch: 2 variables but admission.NewDecoder returns 1 value
../../../../go/pkg/mod/sigs.k8s.io/[email protected]/api/v1beta1/machinehealthcheck_webhook.go:63:27: cannot use &MachineHealthCheck{} (value of type *MachineHealthCheck) as admission.Validator value in variable declaration: *MachineHealthCheck does not implement admission.Validator (wrong type for method ValidateCreate)
		have ValidateCreate() error
		want ValidateCreate() (admission.Warnings, error)
../../../../go/pkg/mod/sigs.k8s.io/[email protected]/api/v1beta1/machineset_webhook.go:45:27: cannot use &MachineSet{} (value of type *MachineSet) as admission.Validator value in variable declaration: *MachineSet does not implement admission.Validator (wrong type for method ValidateCreate)
		have ValidateCreate() error
		want ValidateCreate() (admission.Warnings, error)
# helm.sh/helm/v3/pkg/kube
../../../../go/pkg/mod/helm.sh/helm/[email protected]/pkg/kube/client.go:98:12: cannot use cmdutil.NewFactory(getter) (value of type "k8s.io/kubectl/pkg/cmd/util".Factory) as Factory value in struct literal: "k8s.io/kubectl/pkg/cmd/util".Factory does not implement Factory (missing method OpenAPIGetter)
make: *** [build] Error 1

Cluster api and helm:

❯ make build
CGO_ENABLED=1 go build -ldflags "-linkmode external -w" -a -installsuffix cgo -o bin/clusters-service main.go
# sigs.k8s.io/cluster-api/api/v1beta1
../../../../go/pkg/mod/sigs.k8s.io/[email protected]/api/v1beta1/machine_webhook.go:45:27: cannot use &Machine{} (value of type *Machine) as admission.Validator value in variable declaration: *Machine does not implement admission.Validator (wrong type for method ValidateCreate)
		have ValidateCreate() error
		want ValidateCreate() (admission.Warnings, error)
../../../../go/pkg/mod/sigs.k8s.io/[email protected]/api/v1beta1/machinedeployment_webhook.go:56:27: cannot use &MachineDeployment{} (value of type *MachineDeployment) as admission.Validator value in variable declaration: *MachineDeployment does not implement admission.Validator (wrong type for method ValidateCreate)
		have ValidateCreate() error
		want ValidateCreate() (admission.Warnings, error)
../../../../go/pkg/mod/sigs.k8s.io/[email protected]/api/v1beta1/machinedeployment_webhook.go:61:16: assignment mismatch: 2 variables but admission.NewDecoder returns 1 value
../../../../go/pkg/mod/sigs.k8s.io/[email protected]/api/v1beta1/machinehealthcheck_webhook.go:63:27: cannot use &MachineHealthCheck{} (value of type *MachineHealthCheck) as admission.Validator value in variable declaration: *MachineHealthCheck does not implement admission.Validator (wrong type for method ValidateCreate)
		have ValidateCreate() error
		want ValidateCreate() (admission.Warnings, error)
../../../../go/pkg/mod/sigs.k8s.io/[email protected]/api/v1beta1/machineset_webhook.go:45:27: cannot use &MachineSet{} (value of type *MachineSet) as admission.Validator value in variable declaration: *MachineSet does not implement admission.Validator (wrong type for method ValidateCreate)
		have ValidateCreate() error
		want ValidateCreate() (admission.Warnings, error)
# helm.sh/helm/v3/pkg/kube
../../../../go/pkg/mod/helm.sh/helm/[email protected]/pkg/kube/client.go:98:12: cannot use cmdutil.NewFactory(getter) (value of type "k8s.io/kubectl/pkg/cmd/util".Factory) as Factory value in struct literal: "k8s.io/kubectl/pkg/cmd/util".Factory does not implement Factory (missing method OpenAPIGetter)
make: *** [build] Error 1

@foot foot added the exclude from release notes Use this label to exclude a PR from the release notes label Jul 5, 2023
@foot foot closed this Nov 10, 2023
@foot foot deleted the up-to-weave-gitops-main branch November 10, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude from release notes Use this label to exclude a PR from the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant