mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
Updated constants. Added constants for Validating Webhook
This commit is contained in:
parent
d4148b0255
commit
64459a74e3
1 changed files with 37 additions and 11 deletions
|
@ -2,22 +2,48 @@ package config
|
|||
|
||||
const (
|
||||
// These constants MUST be equal to the corresponding names in service definition in definitions/install.yaml
|
||||
KubePolicyDeploymentName = "kube-policy-deployment"
|
||||
KubePolicyNamespace = "kube-system"
|
||||
WebhookServiceName = "kube-policy-svc"
|
||||
WebhookConfigName = "nirmata-kube-policy-webhook-cfg"
|
||||
MutationWebhookName = "webhook.nirmata.kube-policy"
|
||||
|
||||
MutatingWebhookConfigurationName = "kube-policy-mutating-webhook-cfg"
|
||||
MutatingWebhookName = "nirmata.kube-policy.mutating-webhook"
|
||||
|
||||
ValidatingWebhookConfigurationName = "kube-policy-validating-webhook-cfg"
|
||||
ValidatingWebhookName = "nirmata.kube-policy.validating-webhook"
|
||||
|
||||
// Due to kubernetes issue, we must use next literal constants instead of deployment TypeMeta fields
|
||||
// Pull request: https://github.com/kubernetes/kubernetes/pull/63972
|
||||
// When pull request is closed, we should use TypeMeta struct instead of this constants
|
||||
// Issue: https://github.com/kubernetes/kubernetes/pull/63972
|
||||
// When the issue is closed, we should use TypeMeta struct instead of this constants
|
||||
DeploymentKind = "Deployment"
|
||||
DeploymentAPIVersion = "extensions/v1beta1"
|
||||
KubePolicyDeploymentName = "kube-policy-deployment"
|
||||
)
|
||||
|
||||
var (
|
||||
WebhookServicePath = "/mutate"
|
||||
WebhookConfigLabels = map[string]string{
|
||||
MutatingWebhookServicePath = "/mutate"
|
||||
ValidatingWebhookServicePath = "/validate"
|
||||
KubePolicyAppLabels = map[string]string{
|
||||
"app": "kube-policy",
|
||||
}
|
||||
|
||||
SupportedKinds = []string{
|
||||
"ConfigMap",
|
||||
"CronJob",
|
||||
"DaemonSet",
|
||||
"Deployment",
|
||||
"Endpoints",
|
||||
"HorizontalPodAutoscaler",
|
||||
"Ingress",
|
||||
"Job",
|
||||
"LimitRange",
|
||||
"Namespace",
|
||||
"NetworkPolicy",
|
||||
"PersistentVolumeClaim",
|
||||
"PodDisruptionBudget",
|
||||
"PodTemplate",
|
||||
"ResourceQuota",
|
||||
"Secret",
|
||||
"Service",
|
||||
"StatefulSet",
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue