From 06618740e7bbe6193c76573dc1663734339ea0c9 Mon Sep 17 00:00:00 2001 From: Cody Rivera Date: Thu, 30 May 2024 20:37:00 -0500 Subject: [PATCH] Convert vstatefulset to v_stateful_set Signed-off-by: Cody Rivera --- deploy.sh | 12 +++++++++--- deploy/{vstatefulset => v_stateful_set}/crd.yaml | 0 .../deploy_local.yaml | 2 +- deploy/{vstatefulset => v_stateful_set}/rbac.yaml | 0 .../v_stateful_set.yaml} | 0 ...et_controller.rs => v_stateful_set_controller.rs} | 0 6 files changed, 10 insertions(+), 4 deletions(-) rename deploy/{vstatefulset => v_stateful_set}/crd.yaml (100%) rename deploy/{vstatefulset => v_stateful_set}/deploy_local.yaml (90%) rename deploy/{vstatefulset => v_stateful_set}/rbac.yaml (100%) rename deploy/{vstatefulset/vstatefulset.yaml => v_stateful_set/v_stateful_set.yaml} (100%) rename src/{vstatefulset_controller.rs => v_stateful_set_controller.rs} (100%) diff --git a/deploy.sh b/deploy.sh index f6d58bcdd..784782745 100755 --- a/deploy.sh +++ b/deploy.sh @@ -15,7 +15,7 @@ app=$1 registry=$2 if [ "$app" != "zookeeper" ] && [ "$app" != "rabbitmq" ] && [ "$app" != "fluent" ]\ - && [ "$app" != "vstatefulset" ]; then + && [ "$app" != "v_stateful_set" ]; then echo -e "${RED}The first argument has to be one of: zookeeper, rabbitmq, fluent.${NC}" exit 1 fi @@ -25,11 +25,17 @@ if [ "$registry" != "remote" ] && [ "$registry" != "local" ]; then exit 2 fi +if [ "$app" == "v_stateful_set" ]; then + app_ns="vstatefulset" +else + app_ns=$app +fi + ## use imperative management for CRDs since metadata for PodTemplateSpec is too long. if cd deploy/$1 && kubectl create -f crd.yaml && kubectl apply -f rbac.yaml && kubectl apply -f deploy_$registry.yaml; then echo "" - echo -e "${GREEN}The $app controller is deployed in your Kubernetes cluster in namespace \"$app\"." - echo -e "Run \"kubectl get pod -n $app\" to check the controller pod." + echo -e "${GREEN}The $app controller is deployed in your Kubernetes cluster in namespace \"$app_ns\"." + echo -e "Run \"kubectl get pod -n $app_ns\" to check the controller pod." echo -e "Run \"kubectl apply -f deploy/$app/$app.yaml\" to deploy the cluster custom resource(s).${NC}" else echo "" diff --git a/deploy/vstatefulset/crd.yaml b/deploy/v_stateful_set/crd.yaml similarity index 100% rename from deploy/vstatefulset/crd.yaml rename to deploy/v_stateful_set/crd.yaml diff --git a/deploy/vstatefulset/deploy_local.yaml b/deploy/v_stateful_set/deploy_local.yaml similarity index 90% rename from deploy/vstatefulset/deploy_local.yaml rename to deploy/v_stateful_set/deploy_local.yaml index ef2a5b0e0..b3585d8ca 100644 --- a/deploy/vstatefulset/deploy_local.yaml +++ b/deploy/v_stateful_set/deploy_local.yaml @@ -16,7 +16,7 @@ spec: app.kubernetes.io/name: vstatefulset-controller spec: containers: - - image: local/vstatefulset-controller:v0.1.0 + - image: local/v_stateful_set-controller:v0.1.0 imagePullPolicy: IfNotPresent name: controller serviceAccountName: vstatefulset-controller diff --git a/deploy/vstatefulset/rbac.yaml b/deploy/v_stateful_set/rbac.yaml similarity index 100% rename from deploy/vstatefulset/rbac.yaml rename to deploy/v_stateful_set/rbac.yaml diff --git a/deploy/vstatefulset/vstatefulset.yaml b/deploy/v_stateful_set/v_stateful_set.yaml similarity index 100% rename from deploy/vstatefulset/vstatefulset.yaml rename to deploy/v_stateful_set/v_stateful_set.yaml diff --git a/src/vstatefulset_controller.rs b/src/v_stateful_set_controller.rs similarity index 100% rename from src/vstatefulset_controller.rs rename to src/v_stateful_set_controller.rs