From 51e2b0d978efd87381d5709efd06eefbd7a1a2b4 Mon Sep 17 00:00:00 2001 From: Shuting Zhao Date: Tue, 3 Nov 2020 14:08:45 -0800 Subject: [PATCH] change severity fields to lower case --- charts/kyverno/crds/crds.yaml | 24 +++++++++---------- charts/kyverno/templates/clusterrole.yaml | 6 +++++ ...yverno.io_clusterreportchangerequests.yaml | 6 ++--- .../crds/kyverno.io_reportchangerequests.yaml | 6 ++--- .../policy.k8s.io_clusterpolicyreports.yaml | 6 ++--- .../crds/policy.k8s.io_policyreports.yaml | 6 ++--- definitions/install.yaml | 24 +++++++++---------- definitions/install_debug.yaml | 24 +++++++++---------- .../v1alpha1/policyreport_types.go | 8 +++---- 9 files changed, 58 insertions(+), 52 deletions(-) diff --git a/charts/kyverno/crds/crds.yaml b/charts/kyverno/crds/crds.yaml index 193050cec0..ed31bb8100 100644 --- a/charts/kyverno/crds/crds.yaml +++ b/charts/kyverno/crds/crds.yaml @@ -475,9 +475,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check @@ -808,9 +808,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check @@ -1465,9 +1465,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check @@ -1798,9 +1798,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check diff --git a/charts/kyverno/templates/clusterrole.yaml b/charts/kyverno/templates/clusterrole.yaml index 2f27846027..b7f4781cf4 100644 --- a/charts/kyverno/templates/clusterrole.yaml +++ b/charts/kyverno/templates/clusterrole.yaml @@ -98,6 +98,12 @@ rules: - patch - update - watch +- apiGroups: + - 'apiextensions.k8s.io' + resources: + - customresourcedefinitions + verbs: + - delete --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/definitions/crds/kyverno.io_clusterreportchangerequests.yaml b/definitions/crds/kyverno.io_clusterreportchangerequests.yaml index e6a4067fef..19cbc74a5e 100644 --- a/definitions/crds/kyverno.io_clusterreportchangerequests.yaml +++ b/definitions/crds/kyverno.io_clusterreportchangerequests.yaml @@ -202,9 +202,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check diff --git a/definitions/crds/kyverno.io_reportchangerequests.yaml b/definitions/crds/kyverno.io_reportchangerequests.yaml index 11f83d5e7b..4e7d17d8e6 100644 --- a/definitions/crds/kyverno.io_reportchangerequests.yaml +++ b/definitions/crds/kyverno.io_reportchangerequests.yaml @@ -202,9 +202,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check diff --git a/definitions/crds/policy.k8s.io_clusterpolicyreports.yaml b/definitions/crds/policy.k8s.io_clusterpolicyreports.yaml index 1044e7bd74..f137e08e7e 100644 --- a/definitions/crds/policy.k8s.io_clusterpolicyreports.yaml +++ b/definitions/crds/policy.k8s.io_clusterpolicyreports.yaml @@ -204,9 +204,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check diff --git a/definitions/crds/policy.k8s.io_policyreports.yaml b/definitions/crds/policy.k8s.io_policyreports.yaml index e13c7991a7..0405228516 100644 --- a/definitions/crds/policy.k8s.io_policyreports.yaml +++ b/definitions/crds/policy.k8s.io_policyreports.yaml @@ -203,9 +203,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check diff --git a/definitions/install.yaml b/definitions/install.yaml index 176e952efa..f977be9ebc 100755 --- a/definitions/install.yaml +++ b/definitions/install.yaml @@ -480,9 +480,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check @@ -813,9 +813,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check @@ -1470,9 +1470,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check @@ -1803,9 +1803,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check diff --git a/definitions/install_debug.yaml b/definitions/install_debug.yaml index d7e3860438..4085774493 100755 --- a/definitions/install_debug.yaml +++ b/definitions/install_debug.yaml @@ -480,9 +480,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check @@ -813,9 +813,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check @@ -1470,9 +1470,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check @@ -1803,9 +1803,9 @@ spec: severity: description: Severity indicates policy severity enum: - - High - - Low - - Medium + - high + - low + - medium type: string status: description: Status indicates the result of the policy rule check diff --git a/pkg/api/policyreport/v1alpha1/policyreport_types.go b/pkg/api/policyreport/v1alpha1/policyreport_types.go index d6ec05a82c..0ca7a28362 100755 --- a/pkg/api/policyreport/v1alpha1/policyreport_types.go +++ b/pkg/api/policyreport/v1alpha1/policyreport_types.go @@ -64,10 +64,10 @@ type PolicyReportSummary struct { type PolicyStatus string // PolicySeverity has one of the following values: -// - High -// - Low -// - Medium -// +kubebuilder:validation:Enum=High;Low;Medium +// - high +// - low +// - medium +// +kubebuilder:validation:Enum=high;low;medium type PolicySeverity string // PolicyReportResult provides the result for an individual policy