diff --git a/deploy_in_kubernetes.sh b/deploy_in_kubernetes.sh index c81bfc5f1ab09fcca601d054a674e356e3b01c93..b6e0c8c1c6590317e1de669e652707a7b4682194 100755 --- a/deploy_in_kubernetes.sh +++ b/deploy_in_kubernetes.sh @@ -112,8 +112,10 @@ for COMPONENT in $COMPONENTS; do echo " Deploying '$COMPONENT' component to Kubernetes..." DEPLOY_LOG="$TMP_LOGS_FOLDER/deploy_${COMPONENT}.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" done diff --git a/manifests/l3_attackmitigatorservice.yaml b/manifests/l3_attackmitigatorservice.yaml index a0d1b329579c688b62a772798f27921b03ae68d8..2240776ebb2e234b58febe9520a4b9e07d42b6d4 100644 --- a/manifests/l3_attackmitigatorservice.yaml +++ b/manifests/l3_attackmitigatorservice.yaml @@ -15,15 +15,15 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: l3_attackmitigatorservice + name: l3-attackmitigatorservice spec: selector: matchLabels: - app: l3_attackmitigatorservice + app: l3-attackmitigatorservice template: metadata: labels: - app: l3_attackmitigatorservice + app: l3-attackmitigatorservice spec: terminationGracePeriodSeconds: 5 containers: @@ -52,11 +52,11 @@ spec: apiVersion: v1 kind: Service metadata: - name: l3_attackmitigatorservice + name: l3-attackmitigatorservice spec: type: ClusterIP selector: - app: l3_attackmitigatorservice + app: l3-attackmitigatorservice ports: - name: grpc port: 10002 diff --git a/manifests/l3_centralizedattackdetectorservice.yaml b/manifests/l3_centralizedattackdetectorservice.yaml index a41e76f2b7cfee3558805edb802ae51faf73f120..fa7ee9dccd99982d35d7f7705e463ecee30c7c9b 100644 --- a/manifests/l3_centralizedattackdetectorservice.yaml +++ b/manifests/l3_centralizedattackdetectorservice.yaml @@ -15,15 +15,15 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: l3_centralizedattackdetectorservice + name: l3-centralizedattackdetectorservice spec: selector: matchLabels: - app: l3_centralizedattackdetectorservice + app: l3-centralizedattackdetectorservice template: metadata: labels: - app: l3_centralizedattackdetectorservice + app: l3-centralizedattackdetectorservice spec: terminationGracePeriodSeconds: 5 containers: @@ -52,11 +52,11 @@ spec: apiVersion: v1 kind: Service metadata: - name: l3_centralizedattackdetectorservice + name: l3-centralizedattackdetectorservice spec: type: ClusterIP selector: - app: l3_centralizedattackdetectorservice + app: l3-centralizedattackdetectorservice ports: - name: grpc port: 10001 diff --git a/manifests/l3_distributedattackdetectorservice.yaml b/manifests/l3_distributedattackdetectorservice.yaml index 537915a39c79987038bb83b0d57fcb8305558c6f..6b28f68dd5e08561eb29e4512af330b26f6408cf 100644 --- a/manifests/l3_distributedattackdetectorservice.yaml +++ b/manifests/l3_distributedattackdetectorservice.yaml @@ -15,15 +15,15 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: l3_distributedattackdetectorservice + name: l3-distributedattackdetectorservice spec: selector: matchLabels: - app: l3_distributedattackdetectorservice + app: l3-distributedattackdetectorservice template: metadata: labels: - app: l3_distributedattackdetectorservice + app: l3-distributedattackdetectorservice spec: terminationGracePeriodSeconds: 5 containers: @@ -52,11 +52,11 @@ spec: apiVersion: v1 kind: Service metadata: - name: l3_distributedattackdetectorservice + name: l3-distributedattackdetectorservice spec: type: ClusterIP selector: - app: l3_distributedattackdetectorservice + app: l3-distributedattackdetectorservice ports: - name: grpc port: 10000