From 9803028abcd6e6a18e1003211a11f522d526b1e0 Mon Sep 17 00:00:00 2001 From: shivkumar dudhani Date: Wed, 6 Nov 2019 15:40:19 -0800 Subject: [PATCH 1/3] remove unused yamls --- definitions/MutatingWebhookConfiguration.yaml | 21 ------------------- scripts/deploy-controller.sh | 8 ------- 2 files changed, 29 deletions(-) delete mode 100644 definitions/MutatingWebhookConfiguration.yaml diff --git a/definitions/MutatingWebhookConfiguration.yaml b/definitions/MutatingWebhookConfiguration.yaml deleted file mode 100644 index a45fc667c8..0000000000 --- a/definitions/MutatingWebhookConfiguration.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# MutatingWebhookConfiguration document which should be used when placing controller inside the cluster -# This configuration is just an example. Webhook for in-cluster configuration is registered by controller (see webhooks/registration.go). -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: MutatingWebhookConfiguration -metadata: - name: nirmata-kyverno-webhook-cfg - labels: - app: kyverno -webhooks: - - name: webhook.nirmata.kyverno - clientConfig: - service: - name: kyverno-svc - namespace: default - path: "/mutate" - caBundle: ${CA_BUNDLE} - rules: - - operations: [ "CREATE" ] - resources: [ "*/*" ] - apiGroups: [ "*" ] - apiVersions: [ "*" ] diff --git a/scripts/deploy-controller.sh b/scripts/deploy-controller.sh index 5399d4b1f2..89a3822d00 100755 --- a/scripts/deploy-controller.sh +++ b/scripts/deploy-controller.sh @@ -33,10 +33,6 @@ if [ -z "${namespace}" ]; then # controller should be launched locally ${certsGenerator} "--service=${service_name}" "--serverIp=${serverIp}" || exit 2 - echo "Applying webhook..." - kubectl delete -f definitions/MutatingWebhookConfiguration_debug.yaml - kubectl create -f definitions/MutatingWebhookConfiguration_debug.yaml || exit 3 - kubectl delete -f definitions/install.yaml kubectl create -f definitions/install.yaml || exit 3 @@ -59,10 +55,6 @@ else # controller should be launched within a cluster kubectl delete -f crd/deployment.yaml kubectl create -f crd/deployment.yaml || exit 5 - echo "Applying webhook..." - kubectl delete -f crd/MutatingWebhookConfiguration.yaml - kubectl create -f crd/MutatingWebhookConfiguration.yaml || exit 3 - kubectl delete -f crd/crd.yaml kubectl create -f crd/crd.yaml || exit 3 From f33650a3353b52a8e36ee9c63125fa7407e3748a Mon Sep 17 00:00:00 2001 From: shivkumar dudhani Date: Wed, 6 Nov 2019 15:55:55 -0800 Subject: [PATCH 2/3] update name --- samples/best_practices/add_safe-to-evict_annotation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/best_practices/add_safe-to-evict_annotation.yaml b/samples/best_practices/add_safe-to-evict_annotation.yaml index ac468ecbae..9463cf900e 100644 --- a/samples/best_practices/add_safe-to-evict_annotation.yaml +++ b/samples/best_practices/add_safe-to-evict_annotation.yaml @@ -1,7 +1,7 @@ apiVersion: "kyverno.io/v1alpha1" kind: "ClusterPolicy" metadata: - name: "annotate-emptyDir" + name: "annotate-emptydir" annotations: policies.kyverno.io/category: AutoScaling policies.kyverno.io/description: From 6d86bb80d16006cef475523bceeac4d9709146c6 Mon Sep 17 00:00:00 2001 From: shivkumar dudhani Date: Wed, 6 Nov 2019 16:18:16 -0800 Subject: [PATCH 3/3] update policy name in scenario --- .../samples/best_practices/scenario_mutate_safe-to-evict.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/scenarios/samples/best_practices/scenario_mutate_safe-to-evict.yaml b/test/scenarios/samples/best_practices/scenario_mutate_safe-to-evict.yaml index fade477510..d9ada69df9 100644 --- a/test/scenarios/samples/best_practices/scenario_mutate_safe-to-evict.yaml +++ b/test/scenarios/samples/best_practices/scenario_mutate_safe-to-evict.yaml @@ -6,7 +6,7 @@ expected: mutation: patchedresource: test/output/pod-with-emptydir.yaml policyresponse: - policy: annotate-emptyDir + policy: annotate-emptydir resource: kind: Pod apiVersion: v1