Skip to content

Commit

Permalink
feat: implements svm controller
Browse files Browse the repository at this point in the history
Signed-off-by: Nilekh Chaudhari <[email protected]>

Kubernetes-commit: 9161302e7fd3a5fb055b2f2572c6e1228240bb51
  • Loading branch information
nilekhc authored and k8s-publishing-bot committed Jan 4, 2024
1 parent b0efa42 commit 02f2134
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion features/known_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ const (
// The feature is disabled in Beta by default because
// it will only be turned on for selected control plane component(s).
WatchListClient Feature = "WatchListClient"

// owner: @nilekhc
// alpha: v1.30
InformerResourceVersion Feature = "InformerResourceVersion"
)

// defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys.
Expand All @@ -45,5 +49,6 @@ const (
// After registering with the binary, the features are, by default, controllable using environment variables.
// For more details, please see envVarFeatureGates implementation.
var defaultKubernetesFeatureGates = map[Feature]FeatureSpec{
WatchListClient: {Default: false, PreRelease: Beta},
WatchListClient: {Default: false, PreRelease: Beta},
InformerResourceVersion: {Default: false, PreRelease: Alpha},
}
6 changes: 6 additions & 0 deletions tools/cache/shared_informer.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import (
"k8s.io/utils/clock"

"k8s.io/klog/v2"

clientgofeaturegate "k8s.io/client-go/features"
)

// SharedInformer provides eventually consistent linkage of its
Expand Down Expand Up @@ -409,6 +411,10 @@ func (v *dummyController) HasSynced() bool {
}

func (v *dummyController) LastSyncResourceVersion() string {
if clientgofeaturegate.FeatureGates().Enabled(clientgofeaturegate.InformerResourceVersion) {
return v.informer.LastSyncResourceVersion()
}

return ""
}

Expand Down

0 comments on commit 02f2134

Please sign in to comment.