From c0b6cd26cccecddca2a728111dfd8d6ae283ead1 Mon Sep 17 00:00:00 2001 From: Lleyton Gray Date: Tue, 28 Nov 2023 03:00:20 -0800 Subject: [PATCH] feat: Update deployment CRDs to include new ExitNodeProvisioner --- deploy/crd/exit-node-provisioner.yaml | 64 +++++++++++++++++++++++++++ deploy/crd/kustomization.yaml | 2 +- src/crdgen.rs | 5 ++- 3 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 deploy/crd/exit-node-provisioner.yaml diff --git a/deploy/crd/exit-node-provisioner.yaml b/deploy/crd/exit-node-provisioner.yaml new file mode 100644 index 0000000..8483124 --- /dev/null +++ b/deploy/crd/exit-node-provisioner.yaml @@ -0,0 +1,64 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: exitnodeprovisioners.chisel-operator.io +spec: + group: chisel-operator.io + names: + categories: [] + kind: ExitNodeProvisioner + plural: exitnodeprovisioners + shortNames: [] + singular: exitnodeprovisioner + scope: Namespaced + versions: + - additionalPrinterColumns: [] + name: v1 + schema: + openAPIV3Schema: + description: Auto-generated derived type for ExitNodeProvisionerSpec via `CustomResource` + properties: + spec: + description: ExitNodeProvisioner is a custom resource that represents a Chisel exit node provisioner on a cloud provider. + oneOf: + - required: + - DigitalOcean + - required: + - Linode + - required: + - AWS + properties: + AWS: + properties: + auth: + type: string + required: + - auth + type: object + DigitalOcean: + properties: + auth: + description: Reference to a secret containing the DigitalOcean API token, under the token key + type: string + region: + description: Region ID of the DigitalOcean datacenter to provision the exit node in + type: string + required: + - auth + - region + type: object + Linode: + properties: + auth: + type: string + required: + - auth + type: object + type: object + required: + - spec + title: ExitNodeProvisioner + type: object + served: true + storage: true + subresources: {} diff --git a/deploy/crd/kustomization.yaml b/deploy/crd/kustomization.yaml index 91f1409..c8c5506 100644 --- a/deploy/crd/kustomization.yaml +++ b/deploy/crd/kustomization.yaml @@ -1,3 +1,3 @@ resources: - exit-node.yaml - \ No newline at end of file + - exit-node-provisioner.yaml diff --git a/src/crdgen.rs b/src/crdgen.rs index 7df0cef..9c86709 100644 --- a/src/crdgen.rs +++ b/src/crdgen.rs @@ -4,8 +4,9 @@ mod cloud; mod ops; fn main() { - print!("{}", serde_yaml::to_string(&ops::ExitNode::crd()).unwrap()); - print!( + println!("{}", serde_yaml::to_string(&ops::ExitNode::crd()).unwrap()); + println!("---"); + println!( "{}", serde_yaml::to_string(&ops::ExitNodeProvisioner::crd()).unwrap() )