8000 Merge pull request #7318 from cert-manager-bot/cherry-pick-7315-to-re… · cert-manager/cert-manager@e381fb0 · GitHub
[go: up one dir, main page]

Skip to content

Commit e381fb0

Browse files
Merge pull request #7318 from cert-manager-bot/cherry-pick-7315-to-release-1.16
[release-1.16] Revert "Reduce load on the Kubernetes API server and reduce the peak memory use of the cert-manager components by enabling the use of the WatchList (Streaming Lists) feature"
2 parents e358f59 + 514f559 commit e381fb0

File tree

5 files changed

+1
-137
lines changed

5 files changed

+1
-137
lines changed

internal/cainjector/feature/features.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ limitations under the License.
2121
package feature
2222

2323
import (
24-
"k8s.io/apimachinery/pkg/util/runtime"
2524
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
26-
clientfeatures "k8s.io/client-go/features"
2725
"k8s.io/component-base/featuregate"
2826

2927
utilfeature "github.com/cert-manager/cert-manager/pkg/util/feature"
@@ -52,16 +50,6 @@ const (
5250

5351
func init() {
5452
utilruntime.Must(utilfeature.DefaultMutableFeatureGate.Add(cainjectorFeatureGates))
55-
56-
// Register all client-go features with cert-manager's feature gate instance
57-
// and make all client-go feature checks use cert-manager's instance. The
58-
// effect is that client-go features are wired to the existing
59-
// --feature-gates flag just as all other features are. Further, client-go
60-
// features automatically support the existing mechanisms for feature
61-
// enablement metrics and test overrides.
62-
ca := utilfeature.NewClientGoAdapter(utilfeature.DefaultMutableFeatureGate)
63-
runtime.Must(clientfeatures.AddFeaturesToExistingFeatureGates(ca))
64-
clientfeatures.ReplaceFeatureGates(ca)
6553
}
6654

6755
// cainjectorFeatureGates defines all feature gates for the cainjector component.

internal/controller/feature/features.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ package feature
2222

2323
import (
2424
"k8s.io/apimachinery/pkg/util/runtime"
25-
clientfeatures "k8s.io/client-go/features"
2625
"k8s.io/component-base/featuregate"
2726

2827
utilfeature "github.com/cert-manager/cert-manager/pkg/util/feature"
@@ -150,16 +149,6 @@ const (
150149

151150
func init() {
152151
runtime.Must(utilfeature.DefaultMutableFeatureGate.Add(defaultCertManagerFeatureGates))
153-
154-
// Register all client-go features with cert-manager's feature gate instance
155-
// and make all client-go feature checks use cert-manager's instance. The
156-
// effect is that client-go features are wired to the existing
157-
// --feature-gates flag just as all other features are. Further, client-go
158-
// features automatically support the existing mechanisms for feature
159-
// enablement metrics and test overrides.
160-
ca := utilfeature.NewClientGoAdapter(utilfeature.DefaultMutableFeatureGate)
161-
runtime.Must(clientfeatures.AddFeaturesToExistingFeatureGates(ca))
162-
clientfeatures.ReplaceFeatureGates(ca)
163152
}
164153

165154
// defaultCertManagerFeatureGates consists of all known cert-manager feature keys.

internal/webhook/feature/features.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ limitations under the License.
2121
package feature
2222

2323
import (
24-
"k8s.io/apimachinery/pkg/util/runtime"
2524
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
26-
clientfeatures "k8s.io/client-go/features"
2725
"k8s.io/component-base/featuregate"
2826

2927
utilfeature "github.com/cert-manager/cert-manager/pkg/util/feature"
@@ -86,16 +84,6 @@ const (
8684

8785
func init() {
8886
utilruntime.Must(utilfeature.DefaultMutableFeatureGate.Add(webhookFeatureGates))
89-
90-
// Register all client-go features with cert-manager's feature gate instance
91-
// and make all client-go feature checks use cert-manager's instance. The
92-
// effect is that client-go features are wired to the existing
93-
// --feature-gates flag just as all other features are. Further, client-go
94-
// features automatically support the existing mechanisms for feature
95-
// enablement metrics and test overrides.
96-
ca := utilfeature.NewClientGoAdapter(utilfeature.DefaultMutableFeatureGate)
97-
runtime.Must(clientfeatures.AddFeaturesToExistingFeatureGates(ca))
98-
clientfeatures.ReplaceFeatureGates(ca)
9987
}
10088

10189
// webhookFeatureGates defines all feature gates for the webhook component.

make/config/kind/cluster.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818

1919
apiVersion: kind.x-k8s.io/v1alpha4
2020
kind: Cluster
21-
featureGates:
22-
# Enable the WatchList / Streaming Lists feature on the API server.
23-
#
24-
# - https://kind.sigs.k8s.io/docs/user/configuration/#feature-gates
25-
# - https://kubernetes.io/docs/reference/using-api/api-concepts/#streaming-lists
26-
WatchList: true
27-
2821
kubeadmConfigPatches:
2922
- |
3023
kind: ClusterConfiguration
@@ -37,4 +30,4 @@ kubeadmConfigPatches:
3730
networking:
3831
serviceSubnet: 10.0.0.0/16
3932
nodes:
40-
- role: control-plane
33+
- role: control-plane

pkg/util/feature/client_adapter.go

Lines changed: 0 additions & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0