From f1d5b19bbee84f5063a23d6407120e155ce7b60b Mon Sep 17 00:00:00 2001 From: gonzalezzfelipe Date: Mon, 15 Apr 2024 14:58:26 -0300 Subject: [PATCH 1/2] fix: Add throughput tier as option on spec --- bootstrap/crds/main.tf | 9 +++++++++ operator/src/controller.rs | 2 ++ 2 files changed, 11 insertions(+) diff --git a/bootstrap/crds/main.tf b/bootstrap/crds/main.tf index 5af850b..2beff82 100644 --- a/bootstrap/crds/main.tf +++ b/bootstrap/crds/main.tf @@ -27,6 +27,11 @@ resource "kubernetes_manifest" "customresourcedefinition_dbsyncports_demeter_run "name" = "Network" "type" = "string" }, + { + "jsonPath" = ".spec.throughputTier" + "name" = "Throughput Tier" + "type" = "string" + }, { "jsonPath" = ".status.username" "name" = "Username" @@ -48,6 +53,10 @@ resource "kubernetes_manifest" "customresourcedefinition_dbsyncports_demeter_run "network" = { "type" = "string" } + "throughput_tier" = { + "nullable" = true + "type" = "string" + } } "required" = [ "network", diff --git a/operator/src/controller.rs b/operator/src/controller.rs index f849bd1..c7563be 100644 --- a/operator/src/controller.rs +++ b/operator/src/controller.rs @@ -34,11 +34,13 @@ pub static DB_SYNC_PORT_FINALIZER: &str = "dbsyncports.demeter.run"; #[kube(status = "DbSyncPortStatus")] #[kube(printcolumn = r#" {"name": "Network", "jsonPath": ".spec.network", "type": "string"}, + {"name": "Throughput Tier", "jsonPath":".spec.throughputTier", "type": "string"}, {"name": "Username", "jsonPath": ".status.username", "type": "string"}, {"name": "Password", "jsonPath": ".status.password", "type": "string"} "#)] pub struct DbSyncPortSpec { pub network: String, + pub throughput_tier: Option, } #[derive(Deserialize, Serialize, Clone, Debug, JsonSchema)] pub struct DbSyncPortStatus { From af557c072aebfbc51159f04798ec6f430df7c9bf Mon Sep 17 00:00:00 2001 From: gonzalezzfelipe Date: Thu, 18 Apr 2024 15:43:45 -0300 Subject: [PATCH 2/2] Change to camel case --- bootstrap/crds/main.tf | 2 +- operator/src/controller.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap/crds/main.tf b/bootstrap/crds/main.tf index 2beff82..1d4bf53 100644 --- a/bootstrap/crds/main.tf +++ b/bootstrap/crds/main.tf @@ -53,7 +53,7 @@ resource "kubernetes_manifest" "customresourcedefinition_dbsyncports_demeter_run "network" = { "type" = "string" } - "throughput_tier" = { + "throughputTier" = { "nullable" = true "type" = "string" } diff --git a/operator/src/controller.rs b/operator/src/controller.rs index c7563be..3421c25 100644 --- a/operator/src/controller.rs +++ b/operator/src/controller.rs @@ -38,6 +38,7 @@ pub static DB_SYNC_PORT_FINALIZER: &str = "dbsyncports.demeter.run"; {"name": "Username", "jsonPath": ".status.username", "type": "string"}, {"name": "Password", "jsonPath": ".status.password", "type": "string"} "#)] +#[serde(rename_all = "camelCase")] pub struct DbSyncPortSpec { pub network: String, pub throughput_tier: Option,