diff --git a/cmd/provider/main.go b/cmd/provider/main.go index 89cf81f6..b89b6db3 100644 --- a/cmd/provider/main.go +++ b/cmd/provider/main.go @@ -34,6 +34,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/log/zap" xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" @@ -87,6 +88,16 @@ func main() { SyncPeriod: syncInterval, }, + // TODO(slittley): Remove this when kubernetes/kubernetes#112328 or kubernetes/kubernetes#123071 + // is merged and propagated through the chain of dependencies. + Client: client.Options{ + Cache: &client.CacheOptions{ + DisableFor: []client.Object{ + &v1beta1.Workspace{}, + }, + }, + }, + // controller-runtime uses both ConfigMaps and Leases for leader // election by default. Leases expire after 15 seconds, with a // 10 second renewal deadline. We've observed leader loss due to