Skip to content

Commit

Permalink
Merge branch 'master' into aks_ci_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kumarashit authored Mar 27, 2021
2 parents c326810 + f9d3d8b commit bfafd6e
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 16 deletions.
2 changes: 1 addition & 1 deletion K8s/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion K8s/block-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion K8s/dataflow-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion K8s/datamover-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion K8s/file-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions K8s/k8s-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

2 changes: 1 addition & 1 deletion K8s/kafka-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ metadata:
io.soda.service: kafka
name: kafka
spec:
replicas: 2
replicas: 1
selector:
matchLabels:
io.soda.service: kafka
Expand Down
1 change: 1 addition & 0 deletions K8s/kafka-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
apiVersion: v1
kind: Service
metadata:
namespace: soda-multi-cloud
labels:
io.soda.service: kafka
name: kafka
Expand Down
2 changes: 1 addition & 1 deletion K8s/s3-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion K8s/s3api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 38 additions & 0 deletions K8s/soda_scale_service.sh
Original file line number Diff line number Diff line change
@@ -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, <service_name> <number_of_instances>, got %d\n' "$0" "$#" >&2
exit 1
fi

if [ -z "$service_name" ] || [ -z "$no_of_pods" ]
then
echo "Usage : soda_scale_service <service_name> <number_of_instances>"
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

0 comments on commit bfafd6e

Please sign in to comment.