From e803153e51f8c5522080134621b26f0d76469e98 Mon Sep 17 00:00:00 2001 From: andrewso <9V5f1FkzI2LD> Date: Sun, 1 Mar 2020 20:57:00 +0000 Subject: [PATCH] [1.03.20] Replica scale back --- configuration/kubernetes/deployment.yaml | 2 +- configuration/pipelines/build.groovy | 12 ++---------- configuration/scripts/deployToKubernetes.sh | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/configuration/kubernetes/deployment.yaml b/configuration/kubernetes/deployment.yaml index d55dacf..e6c6a12 100644 --- a/configuration/kubernetes/deployment.yaml +++ b/configuration/kubernetes/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: RESOURCE_NAME namespace: production spec: - replicas: 0 + replicas: 1 selector: matchLabels: app: RESOURCE_NAME diff --git a/configuration/pipelines/build.groovy b/configuration/pipelines/build.groovy index 812dc87..09e83d9 100644 --- a/configuration/pipelines/build.groovy +++ b/configuration/pipelines/build.groovy @@ -92,16 +92,8 @@ try { } stage('Deploy') { - - sh "kubectl apply -f configuration/kubernetes/deployment.yaml" - sh "kubectl apply -f configuration/kubernetes/service.yaml" - - sh "kubectl get pods" - - sh "kubectl rollout status deployment/${APPLICATION_NAME}" - -// executeShellScript("configuration/scripts/deployToKubernetes.sh", -// env.APPLICATION_NAME) + executeShellScript("configuration/scripts/deployToKubernetes.sh", + env.APPLICATION_NAME) } } } diff --git a/configuration/scripts/deployToKubernetes.sh b/configuration/scripts/deployToKubernetes.sh index e49527e..ae18ff2 100755 --- a/configuration/scripts/deployToKubernetes.sh +++ b/configuration/scripts/deployToKubernetes.sh @@ -7,4 +7,4 @@ kubectl apply -f configuration/kubernetes/service.yaml kubectl get pods -kubectl rollout status deployment/${APPLICATION_NAME} \ No newline at end of file +kubectl rollout status deployment/${APPLICATION_NAME} --namespace=production \ No newline at end of file