mirror of
https://github.com/kyverno/kyverno.git
synced 2025-04-15 08:46:36 +00:00
remove comments
This commit is contained in:
parent
1528b7f333
commit
a1d7f984db
4 changed files with 8 additions and 14 deletions
|
@ -310,11 +310,11 @@ spec:
|
|||
containers:
|
||||
- name: kyverno
|
||||
image: nirmata/kyverno:latest
|
||||
args:
|
||||
customize webhook timout
|
||||
- "--webhooktimeout=4"
|
||||
open one of the profiling flag here
|
||||
- "--cpu=true"
|
||||
# args:
|
||||
# customize webhook timout
|
||||
# - "--webhooktimeout=4"
|
||||
# open one of the profiling flag here
|
||||
# - "--cpu=true"
|
||||
ports:
|
||||
- containerPort: 443
|
||||
env:
|
||||
|
|
6
main.go
6
main.go
|
@ -21,9 +21,8 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
kubeconfig string
|
||||
serverIP string
|
||||
// filterK8Resources string
|
||||
kubeconfig string
|
||||
serverIP string
|
||||
cpu bool
|
||||
memory bool
|
||||
webhookTimeout int
|
||||
|
@ -183,7 +182,6 @@ func init() {
|
|||
flag.IntVar(&webhookTimeout, "webhooktimeout", 2, "timeout for webhook configurations")
|
||||
flag.StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
|
||||
flag.StringVar(&serverIP, "serverIP", "", "IP address where Kyverno controller runs. Only required if out-of-cluster.")
|
||||
// flag.StringVar(&filterK8Resources, "filterK8Resources", "", "k8 resource in format [kind,namespace,name] where policy is not evaluated by the admission webhook. example --filterKind \"[Deployment, kyverno, kyverno]\" --filterKind \"[Deployment, kyverno, kyverno],[Events, *, *]\"")
|
||||
config.LogDefaultFlags()
|
||||
flag.Parse()
|
||||
}
|
||||
|
|
|
@ -55,8 +55,6 @@ type NamespaceController struct {
|
|||
queue workqueue.RateLimitingInterface
|
||||
// Resource manager, manages the mapping for already processed resource
|
||||
rm resourceManager
|
||||
// filter the resources defined in the list
|
||||
// filterK8Resources []utils.K8Resource
|
||||
// helpers to validate against current loaded configuration
|
||||
configHandler config.Interface
|
||||
}
|
||||
|
@ -234,7 +232,6 @@ func (nsc *NamespaceController) syncNamespace(key string) error {
|
|||
// skip processing namespace if its been filtered
|
||||
// exclude the filtered resources
|
||||
if nsc.configHandler.ToFilter("Namespace", "", namespace.Name) {
|
||||
// if utils.SkipFilteredResources("Namespace", "", namespace.Name, nsc.filterK8Resources) {
|
||||
//TODO: improve the text
|
||||
glog.V(4).Infof("excluding namespace %s as its a filtered resource", namespace.Name)
|
||||
return nil
|
||||
|
|
|
@ -99,8 +99,7 @@ func NewPolicyController(kyvernoClient *kyvernoclient.Clientset, client *client.
|
|||
eventRecorder: eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "policy_controller"}),
|
||||
queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "policy"),
|
||||
webhookRegistrationClient: webhookRegistrationClient,
|
||||
// filterK8Resources: utils.ParseKinds(filterK8Resources),
|
||||
configHandler: configHandler,
|
||||
configHandler: configHandler,
|
||||
}
|
||||
|
||||
pc.pvControl = RealPVControl{Client: kyvernoClient, Recorder: pc.eventRecorder}
|
||||
|
|
Loading…
Add table
Reference in a new issue