From e74a5c803c2d2b441c3879461fed7ff9764130d3 Mon Sep 17 00:00:00 2001 From: Arsh Sharma <56963264+RinkiyaKeDad@users.noreply.github.com> Date: Wed, 7 Jul 2021 00:04:06 +0530 Subject: [PATCH] adding a note to deprecate name in favour of names (#2096) Signed-off-by: RinkiyaKeDad --- charts/kyverno/crds/crds.yaml | 28 +++++++++++-------- .../crds/kyverno.io_clusterpolicies.yaml | 14 ++++++---- definitions/crds/kyverno.io_policies.yaml | 14 ++++++---- definitions/install.yaml | 28 +++++++++++-------- definitions/install_debug.yaml | 28 +++++++++++-------- pkg/api/kyverno/v1/policy_types.go | 1 + 6 files changed, 65 insertions(+), 48 deletions(-) diff --git a/charts/kyverno/crds/crds.yaml b/charts/kyverno/crds/crds.yaml index c0c9c810ed..b741d37dd1 100644 --- a/charts/kyverno/crds/crds.yaml +++ b/charts/kyverno/crds/crds.yaml @@ -145,9 +145,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array @@ -388,9 +389,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array @@ -1730,9 +1732,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array @@ -1973,9 +1976,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array diff --git a/definitions/crds/kyverno.io_clusterpolicies.yaml b/definitions/crds/kyverno.io_clusterpolicies.yaml index ffce82251f..2574725048 100644 --- a/definitions/crds/kyverno.io_clusterpolicies.yaml +++ b/definitions/crds/kyverno.io_clusterpolicies.yaml @@ -147,9 +147,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array @@ -390,9 +391,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array diff --git a/definitions/crds/kyverno.io_policies.yaml b/definitions/crds/kyverno.io_policies.yaml index f957fc7da7..60a3137f5a 100644 --- a/definitions/crds/kyverno.io_policies.yaml +++ b/definitions/crds/kyverno.io_policies.yaml @@ -148,9 +148,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array @@ -391,9 +392,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array diff --git a/definitions/install.yaml b/definitions/install.yaml index e07737407e..4cbf87eca3 100644 --- a/definitions/install.yaml +++ b/definitions/install.yaml @@ -165,9 +165,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array @@ -408,9 +409,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array @@ -1778,9 +1780,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array @@ -2021,9 +2024,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array diff --git a/definitions/install_debug.yaml b/definitions/install_debug.yaml index ca9d6832bb..8635893205 100755 --- a/definitions/install_debug.yaml +++ b/definitions/install_debug.yaml @@ -152,9 +152,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array @@ -395,9 +396,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array @@ -1737,9 +1739,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array @@ -1980,9 +1983,10 @@ spec: many characters) and "?" (at least one character). type: string names: - description: Names are the names of the resources. Each - name supports wildcard characters "*" (matches zero - or many characters) and "?" (at least one character). + description: 'Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' items: type: string type: array diff --git a/pkg/api/kyverno/v1/policy_types.go b/pkg/api/kyverno/v1/policy_types.go index b3666d820d..76c0c026a6 100755 --- a/pkg/api/kyverno/v1/policy_types.go +++ b/pkg/api/kyverno/v1/policy_types.go @@ -265,6 +265,7 @@ type ResourceDescription struct { // Names are the names of the resources. Each name supports wildcard characters // "*" (matches zero or many characters) and "?" (at least one character). + // NOTE: "Name" is being deprecated in favor of "Names". // +optional Names []string `json:"names,omitempty" yaml:"names,omitempty"`