mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-28 18:38:40 +00:00
chore: remove v2alpha1 version of policy exceptions (#9211)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
This commit is contained in:
parent
c335670065
commit
d5e5219601
6 changed files with 13 additions and 19 deletions
|
@ -24,7 +24,7 @@ import (
|
|||
// +kubebuilder:object:root=true
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:resource:shortName=polex,categories=kyverno
|
||||
// +kubebuilder:deprecatedversion
|
||||
// +kubebuilder:unservedversion
|
||||
|
||||
// PolicyException declares resources to be excluded from specified policies.
|
||||
type PolicyException kyvernov2beta1.PolicyException
|
||||
|
|
|
@ -42418,8 +42418,7 @@ spec:
|
|||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
- deprecated: true
|
||||
name: v2alpha1
|
||||
- name: v2alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: PolicyException declares resources to be excluded from specified
|
||||
|
@ -43008,7 +43007,7 @@ spec:
|
|||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
served: false
|
||||
storage: false
|
||||
- deprecated: true
|
||||
name: v2beta1
|
||||
|
|
|
@ -609,8 +609,7 @@ spec:
|
|||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
- deprecated: true
|
||||
name: v2alpha1
|
||||
- name: v2alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: PolicyException declares resources to be excluded from specified
|
||||
|
@ -1199,7 +1198,7 @@ spec:
|
|||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
served: false
|
||||
storage: false
|
||||
- deprecated: true
|
||||
name: v2beta1
|
||||
|
|
|
@ -4,7 +4,6 @@ import (
|
|||
"fmt"
|
||||
|
||||
kyvernov2 "github.com/kyverno/kyverno/api/kyverno/v2"
|
||||
kyvernov2alpha1 "github.com/kyverno/kyverno/api/kyverno/v2alpha1"
|
||||
kyvernov2beta1 "github.com/kyverno/kyverno/api/kyverno/v2beta1"
|
||||
"github.com/kyverno/kyverno/cmd/cli/kubectl-kyverno/data"
|
||||
"github.com/kyverno/kyverno/ext/resource/convert"
|
||||
|
@ -15,10 +14,9 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
factory, _ = resourceloader.New(openapiclient.NewComposite(openapiclient.NewLocalCRDFiles(data.Crds(), data.CrdsFolder)))
|
||||
exceptionV2alpha1 = schema.GroupVersion(kyvernov2alpha1.GroupVersion).WithKind("PolicyException")
|
||||
exceptionV2beta1 = schema.GroupVersion(kyvernov2beta1.GroupVersion).WithKind("PolicyException")
|
||||
exceptionV2 = schema.GroupVersion(kyvernov2.GroupVersion).WithKind("PolicyException")
|
||||
factory, _ = resourceloader.New(openapiclient.NewComposite(openapiclient.NewLocalCRDFiles(data.Crds(), data.CrdsFolder)))
|
||||
exceptionV2beta1 = schema.GroupVersion(kyvernov2beta1.GroupVersion).WithKind("PolicyException")
|
||||
exceptionV2 = schema.GroupVersion(kyvernov2.GroupVersion).WithKind("PolicyException")
|
||||
)
|
||||
|
||||
func Load(content []byte) ([]*kyvernov2.PolicyException, error) {
|
||||
|
@ -33,7 +31,7 @@ func Load(content []byte) ([]*kyvernov2.PolicyException, error) {
|
|||
return nil, err
|
||||
}
|
||||
switch gvk {
|
||||
case exceptionV2alpha1, exceptionV2beta1, exceptionV2:
|
||||
case exceptionV2beta1, exceptionV2:
|
||||
exception, err := convert.To[kyvernov2.PolicyException](untyped)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -609,8 +609,7 @@ spec:
|
|||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
- deprecated: true
|
||||
name: v2alpha1
|
||||
- name: v2alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: PolicyException declares resources to be excluded from specified
|
||||
|
@ -1199,7 +1198,7 @@ spec:
|
|||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
served: false
|
||||
storage: false
|
||||
- deprecated: true
|
||||
name: v2beta1
|
||||
|
|
|
@ -42641,8 +42641,7 @@ spec:
|
|||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
- deprecated: true
|
||||
name: v2alpha1
|
||||
- name: v2alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: PolicyException declares resources to be excluded from specified
|
||||
|
@ -43231,7 +43230,7 @@ spec:
|
|||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
served: false
|
||||
storage: false
|
||||
- deprecated: true
|
||||
name: v2beta1
|
||||
|
|
Loading…
Add table
Reference in a new issue