Skip to content

Allow operators to run with reduced list of platform CRDs #1878

Open
@isco-rodriguez

Description

At the moment, the hypershift operator and the control plane operator have issues when reducing the list of platform CRDs due to corresponding watches

e.g.

hypershift operator logs
{"level":"error","ts":"2022-10-26T14:57:51Z","logger":"controller-runtime.source","msg":"if kind is a CRD, it should be installed before calling Start","kind":"AzureMachineTemplate.infrastructure.cluster.x-k8s.io","error":"no matches for kind \"AzureMachineTemplate\" in version \"infrastructure.cluster.x-k8s.io/v1beta1\"","stacktrace":"sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1\n\t/hypershift/vendor/sigs.k8s.io/controller-runtime/pkg/source/source.go:139\nk8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext\n\t/hypershift/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:233\nk8s.io/apimachinery/pkg/util/wait.poll\n\t/hypershift/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:580\nk8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext\n\t/hypershift/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:545\nsigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1\n\t/hypershift/vendor/sigs.k8s.io/controller-runtime/pkg/source/source.go:132"}

control plane operator logs
{"level":"error","ts":"2022-10-26T17:27:53Z","logger":"setup","msg":"problem running manager","error":"failed to wait for awsendpointservice caches to sync: timed out waiting for cache to be synced","stacktrace":"main.NewStartCommand.func1\n\t/hypershift/control-plane-operator/main.go:415\ngithub.com/spf13/cobra.(*Command).execute\n\t/hypershift/vendor/github.com/spf13/cobra/command.go:860\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/hypershift/vendor/github.com/spf13/cobra/command.go:974\ngithub.com/spf13/cobra.(*Command).Execute\n\t/hypershift/vendor/github.com/spf13/cobra/command.go:902\nmain.main\n\t/hypershift/control-plane-operator/main.go:65\nruntime.main\n\t/usr/lib/golang/src/runtime/proc.go:250"}

we can add a way to specify at the operator level whether you support a particular platform, so we can omit the corresponding watches

Metadata

Labels

lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions