From 13cd262a47c6f83f4102073d2060295223f74619 Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Sat, 16 Nov 2024 17:15:31 +0100 Subject: [PATCH] New CRD. --- deploy/crds/vmpools-crd.yaml | 59 ++++++++++++++++++++++++++++++++++++ deploy/crds/vms-crd.yaml | 7 +++++ 2 files changed, 66 insertions(+) create mode 100644 deploy/crds/vmpools-crd.yaml diff --git a/deploy/crds/vmpools-crd.yaml b/deploy/crds/vmpools-crd.yaml new file mode 100644 index 0000000..5f8414f --- /dev/null +++ b/deploy/crds/vmpools-crd.yaml @@ -0,0 +1,59 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: vmpools.vmoperator.jdrupes.org +spec: + group: vmoperator.jdrupes.org + # list of versions supported by this CustomResourceDefinition + versions: + - name: v1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + permissions: + type: array + description: >- + Defines permissions for accessing and manipulating the Pool. + items: + type: object + description: >- + Permissions can be granted to a user or to a role. + oneOf: + - required: + - user + - required: + - role + properties: + user: + type: string + role: + type: string + may: + type: array + items: + type: string + enum: + - start + - stop + - reset + - accessConsole + - "*" + default: [] + required: + - permissions + # either Namespaced or Cluster + scope: Namespaced + names: + # plural name to be used in the URL: /apis/// + plural: vmpools + # singular name to be used as an alias on the CLI and for display + singular: vmpool + # kind is normally the CamelCased singular type. Your resource manifests use this. + kind: VmPool + listKind: VmPoolList diff --git a/deploy/crds/vms-crd.yaml b/deploy/crds/vms-crd.yaml index 93c70cc..5f67b4c 100644 --- a/deploy/crds/vms-crd.yaml +++ b/deploy/crds/vms-crd.yaml @@ -1019,6 +1019,13 @@ spec: - accessConsole - "*" default: [] + pools: + type: array + description: >- + List of pools to which this VM belongs. + items: + type: string + default: [] loggingProperties: type: string description: >-