From 11da52c32971a2e7cd7158bb32447983b9d97b12 Mon Sep 17 00:00:00 2001
From: shivkumar dudhani <shivkumar@nirmata.com>
Date: Mon, 15 Jul 2019 15:30:28 -0700
Subject: [PATCH] add mode(blockChanges,reportViolation) CRD spec

---
 definitions/install.yaml       | 11 ++++++++++-
 definitions/install_debug.yaml |  9 +++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/definitions/install.yaml b/definitions/install.yaml
index 8e83c014cd..34f3ba78c5 100644
--- a/definitions/install.yaml
+++ b/definitions/install.yaml
@@ -21,7 +21,16 @@ spec:
         spec:
           required:
           - rules
+          # set as required, as we cannot set default yet. check below for more details
+          - mode
           properties:
+            mode:
+              type: string
+              # default can only be set if CustomResourceDefaulting feature gate is enabled
+              # default: blockChanges
+              enum: 
+              - blockChanges 
+              - reportViolation
             rules:
               type: array
               items:
@@ -177,7 +186,7 @@ spec:
       serviceAccountName: kyverno-service-account
       containers:
         - name: kyverno
-          image: nirmata/kyverno:latest
+          image: nirmata/kyverno:dev-testing
           args: ["--filterKind","Nodes,Events,APIService,SubjectAccessReview"]
           ports:
           - containerPort: 443
diff --git a/definitions/install_debug.yaml b/definitions/install_debug.yaml
index 313c348b65..f136f80978 100644
--- a/definitions/install_debug.yaml
+++ b/definitions/install_debug.yaml
@@ -21,7 +21,16 @@ spec:
         spec:
           required:
           - rules
+          # set as required, as we cannot set default yet. check below for more details
+          - mode
           properties:
+            mode:
+              type: string
+              # default can only be set if CustomResourceDefaulting feature gate is enabled
+              # default: blockChanges
+              enum: 
+              - blockChanges 
+              - reportViolation
             rules:
               type: array
               items: