diff --git a/K8s/api-deployment.yaml b/K8s/api-deployment.yaml index 1cf224ac3..05c0c5751 100644 --- a/K8s/api-deployment.yaml +++ b/K8s/api-deployment.yaml @@ -69,7 +69,7 @@ spec: value: ctrl - name: TRANSFER_SPEED_MIN value: "10" - image: sodafoundation/multi-cloud-api:latest + image: sodafoundation/multi-cloud-api:RELEASE_VERSION name: api ports: - containerPort: 8089 diff --git a/K8s/block-deployment.yaml b/K8s/block-deployment.yaml index 37374c20b..cae4cd877 100644 --- a/K8s/block-deployment.yaml +++ b/K8s/block-deployment.yaml @@ -56,7 +56,7 @@ spec: value: 0.0.0.0:9091 - name: MICRO_ENVIRONMENT value: k8s - image: sodafoundation/multi-cloud-block:latest + image: sodafoundation/multi-cloud-block:RELEASE_VERSION name: block resources: {} volumeMounts: diff --git a/K8s/dataflow-deployment.yaml b/K8s/dataflow-deployment.yaml index 844e8ad0b..283857bad 100644 --- a/K8s/dataflow-deployment.yaml +++ b/K8s/dataflow-deployment.yaml @@ -60,7 +60,7 @@ spec: value: 0.0.0.0:9091 - name: MICRO_ENVIRONMENT value: k8s - image: sodafoundation/multi-cloud-dataflow:latest + image: sodafoundation/multi-cloud-dataflow:RELEASE_VERSION name: dataflow ports: - containerPort: 8094 diff --git a/K8s/datamover-deployment.yaml b/K8s/datamover-deployment.yaml index 15da8ed2d..a97d554d3 100644 --- a/K8s/datamover-deployment.yaml +++ b/K8s/datamover-deployment.yaml @@ -64,7 +64,7 @@ spec: value: "3600" - name: PARTSIZE value: "5" - image: sodafoundation/multi-cloud-datamover:latest + image: sodafoundation/multi-cloud-datamover:RELEASE_VERSION name: datamover ports: - containerPort: 8093 diff --git a/K8s/file-deployment.yaml b/K8s/file-deployment.yaml index 2a5e62d2d..0661348c3 100644 --- a/K8s/file-deployment.yaml +++ b/K8s/file-deployment.yaml @@ -68,7 +68,7 @@ spec: value: opensds - name: OS_USER_DOMIN_ID value: Default - image: sodafoundation/multi-cloud-file:latest + image: sodafoundation/multi-cloud-file:RELEASE_VERSION name: file ports: - containerPort: 8092 diff --git a/K8s/k8s-cleanup.sh b/K8s/k8s-cleanup.sh index 554d13d21..5a5a4040c 100644 --- a/K8s/k8s-cleanup.sh +++ b/K8s/k8s-cleanup.sh @@ -16,7 +16,7 @@ kubectl delete service dataflow -n soda-multi-cloud kubectl delete deployment zookeeper -n soda-multi-cloud kubectl delete deployment redis -n soda-multi-cloud kubectl delete deployment tidb -n soda-multi-cloud -kubectl delete deployment kafka-svc -n soda-multi-cloud +kubectl delete deployment kafka -n soda-multi-cloud kubectl delete deployment block -n soda-multi-cloud kubectl delete deployment file -n soda-multi-cloud kubectl delete deployment backend -n soda-multi-cloud @@ -34,11 +34,4 @@ kubectl delete configmap tidb-sql -n soda-multi-cloud kubectl delete configmap s3-sql -n soda-multi-cloud kubectl delete configmap yig-sql -n soda-multi-cloud -#Cleanup Configmaps -kubectl delete configmap multicloud-config -n soda-multi-cloud -kubectl delete configmap tidb-config -n soda-multi-cloud -kubectl delete configmap s3-config -n soda-multi-cloud -kubectl delete configmap tidb-sql -n soda-multi-cloud -kubectl delete configmap s3-sql -n soda-multi-cloud -kubectl delete configmap yig-sql -n soda-multi-cloud diff --git a/K8s/kafka-deployment.yaml b/K8s/kafka-deployment.yaml index 4ffec35fe..0b56cc517 100644 --- a/K8s/kafka-deployment.yaml +++ b/K8s/kafka-deployment.yaml @@ -21,7 +21,7 @@ metadata: io.soda.service: kafka name: kafka spec: - replicas: 2 + replicas: 1 selector: matchLabels: io.soda.service: kafka diff --git a/K8s/kafka-service.yaml b/K8s/kafka-service.yaml index 527c986ee..67b95a100 100644 --- a/K8s/kafka-service.yaml +++ b/K8s/kafka-service.yaml @@ -16,6 +16,7 @@ apiVersion: v1 kind: Service metadata: + namespace: soda-multi-cloud labels: io.soda.service: kafka name: kafka diff --git a/K8s/s3-deployment.yaml b/K8s/s3-deployment.yaml index 55f40bd92..0b84f4ce1 100644 --- a/K8s/s3-deployment.yaml +++ b/K8s/s3-deployment.yaml @@ -59,7 +59,7 @@ spec: value: k8s - name: USE_DEFAULT_STORAGE_CLASS value: "1" - image: sodafoundation/multi-cloud-s3:latest + image: sodafoundation/multi-cloud-s3:RELEASE_VERSION name: s3 ports: - containerPort: 8096 diff --git a/K8s/s3api-deployment.yaml b/K8s/s3api-deployment.yaml index cf4f10452..70f43d840 100644 --- a/K8s/s3api-deployment.yaml +++ b/K8s/s3api-deployment.yaml @@ -70,7 +70,7 @@ spec: value: s3 - name: TRANSFER_SPEED_MIN value: "10" - image: sodafoundation/multi-cloud-api:latest + image: sodafoundation/multi-cloud-api:RELEASE_VERSION name: s3api ports: - containerPort: 8090 diff --git a/K8s/soda_scale_service.sh b/K8s/soda_scale_service.sh new file mode 100644 index 000000000..cc8e9dc15 --- /dev/null +++ b/K8s/soda_scale_service.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +# Copyright 2021 The SODA Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +no_of_pods="$1" +service_name="$2" + +if [ "$#" -ne 2 ]; then + printf '%s: error: need 2 arguments, , got %d\n' "$0" "$#" >&2 + exit 1 +fi + +if [ -z "$service_name" ] || [ -z "$no_of_pods" ] +then + echo "Usage : soda_scale_service " + exit 1 +fi +echo "START :: Scaling Service " $service_name to $no_of_pods "instances.." +cmd="kubectl scale --replicas=$2 deployment/$1 -n soda-multi-cloud" +echo "EXECUTING ... $cmd" +bash -c "$cmd" +status=$? +[ $status -eq 0 ] && echo "COMPLETED :: Scaling Service " $service_name to $no_of_pods "instances..." +exit 0 +