From ee4dec11273bc38e800024b91941f46c212bc5c1 Mon Sep 17 00:00:00 2001 From: morenol Date: Fri, 9 Jun 2023 01:30:51 +0000 Subject: [PATCH] chore: remove old connector crd (#3319) Co-authored-by: morenol <22335041+morenol@users.noreply.github.com> --- .../src/client/tableformat/delete.rs | 2 +- .../fluvio-cli/src/client/tableformat/list.rs | 2 +- crates/fluvio-cluster/src/cli/start/k8.rs | 1 - crates/fluvio-cluster/src/cli/start/mod.rs | 4 -- crates/fluvio-cluster/src/start/k8.rs | 10 ---- .../fluvio-sc/src/k8/objects/spu_k8_config.rs | 9 ---- .../test-data/auth_config/policy.json | 3 -- crates/fluvio-test/src/tests/smoke/mod.rs | 1 - k8-util/helm/fluvio-app/Chart.yaml | 2 +- .../fluvio-app/templates/spu-k8-config.yaml | 1 - k8-util/helm/fluvio-app/values.yaml | 1 - k8-util/helm/fluvio-sys/Chart.yaml | 2 +- .../templates/crd_managed_connector.yaml | 52 ------------------- 13 files changed, 4 insertions(+), 86 deletions(-) delete mode 100644 k8-util/helm/fluvio-sys/templates/crd_managed_connector.yaml diff --git a/crates/fluvio-cli/src/client/tableformat/delete.rs b/crates/fluvio-cli/src/client/tableformat/delete.rs index ea50eb4ac9..d082e6f988 100644 --- a/crates/fluvio-cli/src/client/tableformat/delete.rs +++ b/crates/fluvio-cli/src/client/tableformat/delete.rs @@ -15,7 +15,7 @@ use fluvio::metadata::tableformat::TableFormatSpec; #[derive(Debug, Parser)] pub struct DeleteTableFormatOpt { - /// The name of the connector to delete + /// The name of the table format to delete name: String, } diff --git a/crates/fluvio-cli/src/client/tableformat/list.rs b/crates/fluvio-cli/src/client/tableformat/list.rs index b08834e349..74f3032c82 100644 --- a/crates/fluvio-cli/src/client/tableformat/list.rs +++ b/crates/fluvio-cli/src/client/tableformat/list.rs @@ -21,7 +21,7 @@ pub struct ListTableFormatsOpt { } impl ListTableFormatsOpt { - /// Process list connectors cli request + /// Process list table format cli request pub async fn process(self, out: Arc, fluvio: &Fluvio) -> Result<()> { let admin = fluvio.admin().await; let lists = admin.all::().await?; diff --git a/crates/fluvio-cluster/src/cli/start/k8.rs b/crates/fluvio-cluster/src/cli/start/k8.rs index ce70dca6d6..d7b6a4f229 100644 --- a/crates/fluvio-cluster/src/cli/start/k8.rs +++ b/crates/fluvio-cluster/src/cli/start/k8.rs @@ -30,7 +30,6 @@ pub async fn process_k8(opt: StartOpt, platform_version: Version, upgrade: bool) .hide_spinner(false) .upgrade(upgrade) .spu_config(opt.spu_config.as_spu_config()) - .connector_prefixes(opt.connector_prefix) .with_if(opt.skip_checks, |b| b.skip_checks(true)) .use_k8_port_forwarding(opt.k8_config.use_k8_port_forwarding); diff --git a/crates/fluvio-cluster/src/cli/start/mod.rs b/crates/fluvio-cluster/src/cli/start/mod.rs index 5b25089472..a637e9c626 100644 --- a/crates/fluvio-cluster/src/cli/start/mod.rs +++ b/crates/fluvio-cluster/src/cli/start/mod.rs @@ -169,10 +169,6 @@ pub struct StartOpt { /// Service Type #[arg(long)] pub service_type: Option, - - /// Connector Prefix - #[arg(long, value_name = "connector_prefix")] - pub connector_prefix: Vec, } impl StartOpt { diff --git a/crates/fluvio-cluster/src/start/k8.rs b/crates/fluvio-cluster/src/start/k8.rs index 60adcc3065..b768f77022 100644 --- a/crates/fluvio-cluster/src/start/k8.rs +++ b/crates/fluvio-cluster/src/start/k8.rs @@ -311,9 +311,6 @@ pub struct ClusterConfig { #[builder(setter(into), default)] spu_config: SpuConfig, - #[builder(setter(into), default)] - connector_prefixes: Vec, - #[builder(setter(into), default = "TLS_SERVER_SECRET_NAME.to_string()")] tls_server_secret_name: String, @@ -744,13 +741,6 @@ impl ClusterInstaller { install_settings.push(("image.tag", Cow::Borrowed(tag))); } - if !self.config.connector_prefixes.is_empty() { - install_settings.push(( - "connectorPrefixes", - Cow::Owned(self.config.connector_prefixes.join(" ")), - )); - } - // If configured with TLS, copy certs to server if let (TlsPolicy::Verified(server_tls), TlsPolicy::Verified(client_tls)) = ( &self.config.server_tls_policy, diff --git a/crates/fluvio-sc/src/k8/objects/spu_k8_config.rs b/crates/fluvio-sc/src/k8/objects/spu_k8_config.rs index 8cebaf887d..7a2ad40e3f 100644 --- a/crates/fluvio-sc/src/k8/objects/spu_k8_config.rs +++ b/crates/fluvio-sc/src/k8/objects/spu_k8_config.rs @@ -44,7 +44,6 @@ pub struct ScK8Config { pub lb_service_annotations: HashMap, pub service: Option, pub spu_pod_config: PodConfig, - pub connector_prefixes: Vec, } impl ScK8Config { @@ -86,20 +85,12 @@ impl ScK8Config { info!(?spu_pod_config, "spu pod config"); - let connector_prefixes: Vec = - if let Some(prefix_string) = data.remove("connectorPrefixes") { - prefix_string.split(' ').map(|s| s.to_owned()).collect() - } else { - Vec::new() - }; - Ok(Self { image, pod_security_context, lb_service_annotations, service, spu_pod_config, - connector_prefixes, }) } diff --git a/crates/fluvio-sc/test-data/auth_config/policy.json b/crates/fluvio-sc/test-data/auth_config/policy.json index 37b4e7f4ce..23fe0c9d68 100644 --- a/crates/fluvio-sc/test-data/auth_config/policy.json +++ b/crates/fluvio-sc/test-data/auth_config/policy.json @@ -15,9 +15,6 @@ "SpuGroup": [ "All" ], - "ManagedConnector": [ - "All" - ], "SmartModule": [ "All" ], diff --git a/crates/fluvio-test/src/tests/smoke/mod.rs b/crates/fluvio-test/src/tests/smoke/mod.rs index eafaa8e2b2..80ddc336ca 100644 --- a/crates/fluvio-test/src/tests/smoke/mod.rs +++ b/crates/fluvio-test/src/tests/smoke/mod.rs @@ -123,7 +123,6 @@ pub fn smoke(mut test_driver: FluvioTestDriver, mut test_case: TestCase) { ); Some(table_format_process) - // Create a managed connector } else { None }; diff --git a/k8-util/helm/fluvio-app/Chart.yaml b/k8-util/helm/fluvio-app/Chart.yaml index d31e639c72..91fb6d7871 100644 --- a/k8-util/helm/fluvio-app/Chart.yaml +++ b/k8-util/helm/fluvio-app/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v2 name: fluvio-app description: A Helm chart for Fluvio type: application -version: 0.9.2 +version: 0.9.3 diff --git a/k8-util/helm/fluvio-app/templates/spu-k8-config.yaml b/k8-util/helm/fluvio-app/templates/spu-k8-config.yaml index 42f90e8c77..a358e0130e 100644 --- a/k8-util/helm/fluvio-app/templates/spu-k8-config.yaml +++ b/k8-util/helm/fluvio-app/templates/spu-k8-config.yaml @@ -8,4 +8,3 @@ data: spuPodConfig: {{ .Values.spuPod | toJson | quote }} lbServiceAnnotations: {{ .Values.loadBalancer.serviceAnnotations | toJson | quote }} service: {{ .Values.service | toJson | quote }} - connectorPrefixes: {{ .Values.connectorPrefixes }} diff --git a/k8-util/helm/fluvio-app/values.yaml b/k8-util/helm/fluvio-app/values.yaml index 001c84cfdc..d6c7c05baf 100644 --- a/k8-util/helm/fluvio-app/values.yaml +++ b/k8-util/helm/fluvio-app/values.yaml @@ -48,4 +48,3 @@ rbac: serviceAccount: name: fluvio podSecurityContext: {} -connectorPrefixes: nil diff --git a/k8-util/helm/fluvio-sys/Chart.yaml b/k8-util/helm/fluvio-sys/Chart.yaml index 59eb8260bd..b8e7b2c5a7 100644 --- a/k8-util/helm/fluvio-sys/Chart.yaml +++ b/k8-util/helm/fluvio-sys/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v2 name: fluvio-sys description: A Helm chart for Fluvio type: application -version: 0.9.11 +version: 0.9.12 diff --git a/k8-util/helm/fluvio-sys/templates/crd_managed_connector.yaml b/k8-util/helm/fluvio-sys/templates/crd_managed_connector.yaml deleted file mode 100644 index d3f91640ac..0000000000 --- a/k8-util/helm/fluvio-sys/templates/crd_managed_connector.yaml +++ /dev/null @@ -1,52 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: managedconnectors.fluvio.infinyon.com -spec: - group: fluvio.infinyon.com - scope: Namespaced - names: - kind: ManagedConnector - plural: managedconnectors - singular: managedconnector - versions: - - name: v1 - served: true - storage: true - subresources: - status: {} - schema: - openAPIV3Schema: - required: ["spec"] - type: object - properties: - status: - type: object - x-kubernetes-preserve-unknown-fields: true - spec: - type: object - required: ["name", "type"] - properties: - name: - type: string - minimum: 2 - maximum: 100 - type: - type: string - minimum: 2 - maximum: 100 - version: - type: string - minimum: 2 - maximum: 100 - nullable: true - topic: - type: string - minimum: 2 - maximum: 100 - parameters: - type: object - x-kubernetes-preserve-unknown-fields: true - secrets: - type: object - x-kubernetes-preserve-unknown-fields: true