From f1ba99638e43cc874c73d4183c904c94721a9977 Mon Sep 17 00:00:00 2001 From: Franco Date: Wed, 21 Aug 2024 12:54:17 -0300 Subject: [PATCH] Update CRDs --- ...icy.giantswarm.io_automatedexceptions.yaml | 23 ++++-- .../bases/policy.giantswarm.io_policies.yaml | 58 ++++++++++++++ .../policy.giantswarm.io_policyconfigs.yaml | 51 ++++++++++++ ...y.giantswarm.io_policyexceptiondrafts.yaml | 23 +++--- ...policy.giantswarm.io_policyexceptions.yaml | 80 +++++++++++++++++++ .../policy.giantswarm.io_policymanifests.yaml | 30 +++---- 6 files changed, 235 insertions(+), 30 deletions(-) create mode 100644 config/crd/bases/policy.giantswarm.io_policies.yaml create mode 100644 config/crd/bases/policy.giantswarm.io_policyconfigs.yaml create mode 100644 config/crd/bases/policy.giantswarm.io_policyexceptions.yaml diff --git a/config/crd/bases/policy.giantswarm.io_automatedexceptions.yaml b/config/crd/bases/policy.giantswarm.io_automatedexceptions.yaml index e77cb488..bf791e60 100644 --- a/config/crd/bases/policy.giantswarm.io_automatedexceptions.yaml +++ b/config/crd/bases/policy.giantswarm.io_automatedexceptions.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.14.0 name: automatedexceptions.policy.giantswarm.io spec: group: policy.giantswarm.io @@ -11,6 +11,8 @@ spec: kind: AutomatedException listKind: AutomatedExceptionList plural: automatedexceptions + shortNames: + - autopolex singular: automatedexception scope: Namespaced versions: @@ -21,14 +23,19 @@ spec: API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -53,10 +60,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic namespaces: items: type: string type: array + x-kubernetes-list-type: atomic required: - kind - names diff --git a/config/crd/bases/policy.giantswarm.io_policies.yaml b/config/crd/bases/policy.giantswarm.io_policies.yaml new file mode 100644 index 00000000..dfe4605b --- /dev/null +++ b/config/crd/bases/policy.giantswarm.io_policies.yaml @@ -0,0 +1,58 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: policies.policy.giantswarm.io +spec: + group: policy.giantswarm.io + names: + kind: Policy + listKind: PolicyList + plural: policies + shortNames: + - gspol + - gspolicy + singular: policy + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Policy is the Schema for the Policies API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: PolicySpec defines the desired state of Policy + properties: + defaultPolicyState: + type: string + type: object + status: + description: PolicyStatus defined the desired state of Policy + properties: + actualPolicyState: + type: string + targetPolicyState: + type: string + type: object + type: object + served: true + storage: true diff --git a/config/crd/bases/policy.giantswarm.io_policyconfigs.yaml b/config/crd/bases/policy.giantswarm.io_policyconfigs.yaml new file mode 100644 index 00000000..5d28150d --- /dev/null +++ b/config/crd/bases/policy.giantswarm.io_policyconfigs.yaml @@ -0,0 +1,51 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: policyconfigs.policy.giantswarm.io +spec: + group: policy.giantswarm.io + names: + kind: PolicyConfig + listKind: PolicyConfigList + plural: policyconfigs + shortNames: + - gspolconfig + singular: policyconfig + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: PolicyConfig is the Schema for the PolicyConfigs API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: PolicyConfigSpec defines the desired state of PolicyConfig + properties: + policyName: + type: string + policyState: + type: string + type: object + type: object + served: true + storage: true diff --git a/config/crd/bases/policy.giantswarm.io_policyexceptiondrafts.yaml b/config/crd/bases/policy.giantswarm.io_policyexceptiondrafts.yaml index a8b1ee17..bcfad7ee 100644 --- a/config/crd/bases/policy.giantswarm.io_policyexceptiondrafts.yaml +++ b/config/crd/bases/policy.giantswarm.io_policyexceptiondrafts.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.14.0 name: policyexceptiondrafts.policy.giantswarm.io spec: group: policy.giantswarm.io @@ -23,14 +23,19 @@ spec: API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -55,10 +60,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic namespaces: items: type: string type: array + x-kubernetes-list-type: atomic required: - kind - names @@ -72,5 +79,3 @@ spec: type: object served: true storage: true - subresources: - status: {} diff --git a/config/crd/bases/policy.giantswarm.io_policyexceptions.yaml b/config/crd/bases/policy.giantswarm.io_policyexceptions.yaml new file mode 100644 index 00000000..435f55a2 --- /dev/null +++ b/config/crd/bases/policy.giantswarm.io_policyexceptions.yaml @@ -0,0 +1,80 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: policyexceptions.policy.giantswarm.io +spec: + group: policy.giantswarm.io + names: + kind: PolicyException + listKind: PolicyExceptionList + plural: policyexceptions + shortNames: + - gspolex + singular: policyexception + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: PolicyException is the Schema for the policyexceptions API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: PolicyExceptionSpec defines the desired state of PolicyException + properties: + policies: + description: Policies defines the list of policies to be excluded + items: + type: string + type: array + targets: + description: Targes defines the list of target workloads where the + exceptions will be applied + items: + description: Target defines a resource to which a PolicyException + applies + properties: + kind: + type: string + names: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - kind + - names + - namespaces + type: object + type: array + required: + - policies + - targets + type: object + type: object + served: true + storage: true diff --git a/config/crd/bases/policy.giantswarm.io_policymanifests.yaml b/config/crd/bases/policy.giantswarm.io_policymanifests.yaml index dda7ad49..06e9b2db 100644 --- a/config/crd/bases/policy.giantswarm.io_policymanifests.yaml +++ b/config/crd/bases/policy.giantswarm.io_policymanifests.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.14.0 name: policymanifests.policy.giantswarm.io spec: group: policy.giantswarm.io @@ -22,14 +22,19 @@ spec: description: PolicyManifest is the Schema for the policymanifests API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -51,10 +56,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic namespaces: items: type: string type: array + x-kubernetes-list-type: atomic required: - kind - names @@ -72,10 +79,12 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic namespaces: items: type: string type: array + x-kubernetes-list-type: atomic required: - kind - names @@ -86,14 +95,7 @@ spec: description: Foo is an example field of PolicyManifest. Edit policymanifest_types.go to remove/update type: string - required: - - args - - automatedExceptions - - exceptions - - mode type: object type: object served: true storage: true - subresources: - status: {}