Skip to content
Snippets Groups Projects
Commit 7e5f56e9 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'develop' of https://gitlab.com/teraflow-h2020/controller into...

Merge branch 'develop' of https://gitlab.com/teraflow-h2020/controller into feat/microk8s-deployment
parents 15a3972b ef9372b6
No related branches found
No related tags found
1 merge request!54Release 2.0.0
...@@ -15,15 +15,15 @@ ...@@ -15,15 +15,15 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: l3_attackmitigatorservice name: l3-attackmitigatorservice
spec: spec:
selector: selector:
matchLabels: matchLabels:
app: l3_attackmitigatorservice app: l3-attackmitigatorservice
template: template:
metadata: metadata:
labels: labels:
app: l3_attackmitigatorservice app: l3-attackmitigatorservice
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
...@@ -52,11 +52,11 @@ spec: ...@@ -52,11 +52,11 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: l3_attackmitigatorservice name: l3-attackmitigatorservice
spec: spec:
type: ClusterIP type: ClusterIP
selector: selector:
app: l3_attackmitigatorservice app: l3-attackmitigatorservice
ports: ports:
- name: grpc - name: grpc
port: 10002 port: 10002
......
...@@ -15,15 +15,15 @@ ...@@ -15,15 +15,15 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: l3_centralizedattackdetectorservice name: l3-centralizedattackdetectorservice
spec: spec:
selector: selector:
matchLabels: matchLabels:
app: l3_centralizedattackdetectorservice app: l3-centralizedattackdetectorservice
template: template:
metadata: metadata:
labels: labels:
app: l3_centralizedattackdetectorservice app: l3-centralizedattackdetectorservice
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
...@@ -52,11 +52,11 @@ spec: ...@@ -52,11 +52,11 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: l3_centralizedattackdetectorservice name: l3-centralizedattackdetectorservice
spec: spec:
type: ClusterIP type: ClusterIP
selector: selector:
app: l3_centralizedattackdetectorservice app: l3-centralizedattackdetectorservice
ports: ports:
- name: grpc - name: grpc
port: 10001 port: 10001
......
...@@ -15,15 +15,15 @@ ...@@ -15,15 +15,15 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: l3_distributedattackdetectorservice name: l3-distributedattackdetectorservice
spec: spec:
selector: selector:
matchLabels: matchLabels:
app: l3_distributedattackdetectorservice app: l3-distributedattackdetectorservice
template: template:
metadata: metadata:
labels: labels:
app: l3_distributedattackdetectorservice app: l3-distributedattackdetectorservice
spec: spec:
terminationGracePeriodSeconds: 5 terminationGracePeriodSeconds: 5
containers: containers:
...@@ -52,11 +52,11 @@ spec: ...@@ -52,11 +52,11 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: l3_distributedattackdetectorservice name: l3-distributedattackdetectorservice
spec: spec:
type: ClusterIP type: ClusterIP
selector: selector:
app: l3_distributedattackdetectorservice app: l3-distributedattackdetectorservice
ports: ports:
- name: grpc - name: grpc
port: 10000 port: 10000
......
...@@ -112,8 +112,10 @@ for COMPONENT in $COMPONENTS; do ...@@ -112,8 +112,10 @@ for COMPONENT in $COMPONENTS; do
echo " Deploying '$COMPONENT' component to Kubernetes..." echo " Deploying '$COMPONENT' component to Kubernetes..."
DEPLOY_LOG="$TMP_LOGS_FOLDER/deploy_${COMPONENT}.log" DEPLOY_LOG="$TMP_LOGS_FOLDER/deploy_${COMPONENT}.log"
kubectl --namespace $K8S_NAMESPACE apply -f "$MANIFEST" > "$DEPLOY_LOG" kubectl --namespace $K8S_NAMESPACE apply -f "$MANIFEST" > "$DEPLOY_LOG"
kubectl --namespace $K8S_NAMESPACE scale deployment --replicas=0 ${COMPONENT}service >> "$DEPLOY_LOG"
kubectl --namespace $K8S_NAMESPACE scale deployment --replicas=1 ${COMPONENT}service >> "$DEPLOY_LOG" COMPONENT_OBJNAME=$(echo "${COMPONENT}" | sed "s/\_/-/")
kubectl --namespace $K8S_NAMESPACE scale deployment --replicas=0 ${COMPONENT_OBJNAME}service >> "$DEPLOY_LOG"
kubectl --namespace $K8S_NAMESPACE scale deployment --replicas=1 ${COMPONENT_OBJNAME}service >> "$DEPLOY_LOG"
printf "\n" printf "\n"
done done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment