mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-05-17 14:48:49 +00:00
Disable apf in webhook (#120)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
This commit is contained in:
@@ -24,6 +24,8 @@ spec:
|
||||
- "webhook"
|
||||
- "--cert-dir=/tmp"
|
||||
- "--secure-port=6443"
|
||||
# webhook is not hosting any k8s api resource, so it is not subjected to APF feature
|
||||
- "--feature-gates=APIPriorityAndFairness=false"
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
admissionserver "github.com/openshift/generic-admission-server/pkg/cmd/server"
|
||||
"github.com/spf13/cobra"
|
||||
genericapiserver "k8s.io/apiserver/pkg/server"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"open-cluster-management.io/work/pkg/webhook"
|
||||
)
|
||||
|
||||
@@ -31,6 +32,11 @@ func NewAdmissionHook() *cobra.Command {
|
||||
},
|
||||
}
|
||||
|
||||
flags := cmd.Flags()
|
||||
featureGate := utilfeature.DefaultMutableFeatureGate
|
||||
featureGate.AddFlag(flags)
|
||||
o.RecommendedOptions.FeatureGate = featureGate
|
||||
|
||||
o.RecommendedOptions.AddFlags(cmd.Flags())
|
||||
|
||||
return cmd
|
||||
|
||||
Reference in New Issue
Block a user