From d67ee5f619ffc965784828eaf34f797aa792619a Mon Sep 17 00:00:00 2001 From: Dobromir Palushev <s28840@bht-berlin.de> Date: Sat, 3 Sep 2022 18:58:08 +0200 Subject: [PATCH] updated logic of the test-job --- k8s-manifests/configmap.yaml | 1 - k8s-manifests/deployment.yaml.tmpl | 5 ++--- k8s-manifests/ingress.yaml.tmpl | 4 ++-- k8s-manifests/service.yaml | 12 ++++++------ 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/k8s-manifests/configmap.yaml b/k8s-manifests/configmap.yaml index a4ba65c..359178a 100644 --- a/k8s-manifests/configmap.yaml +++ b/k8s-manifests/configmap.yaml @@ -3,5 +3,4 @@ kind: ConfigMap metadata: name: todo-app-config data: - PORT: "3000" MONGODB_URL: mongodb-service diff --git a/k8s-manifests/deployment.yaml.tmpl b/k8s-manifests/deployment.yaml.tmpl index bb52499..b8272c2 100644 --- a/k8s-manifests/deployment.yaml.tmpl +++ b/k8s-manifests/deployment.yaml.tmpl @@ -22,9 +22,8 @@ spec: - image: {{image}} name: todo-app-container ports: - - containerPort: 3000 - # imagePullPolicy: IfNotPresent - # env for mongodb username and pass? + - containerPort: 3000 + name: todo-app-container-port envFrom: - configMapRef: name: todo-app-config diff --git a/k8s-manifests/ingress.yaml.tmpl b/k8s-manifests/ingress.yaml.tmpl index 7635067..f3386c4 100644 --- a/k8s-manifests/ingress.yaml.tmpl +++ b/k8s-manifests/ingress.yaml.tmpl @@ -4,7 +4,7 @@ metadata: name: todo-app-ingress annotations: kubernetes.io/ingress.class: "gce" # an external load-balancer - kubernetes.io/ingress.allow-http: "false" # disabling HTTP + # kubernetes.io/ingress.allow-http: "false" # disabling HTTP kubernetes.io/ingress.global-static-ip-name: {{static-ip-name}} # staging-todoapp-ip for staging networking.gke.io/managed-certificates: todoapp-managed-cert # defined in the infrastructure repository spec: @@ -20,4 +20,4 @@ spec: service: name: todo-app-service port: - number: 8080 + number: 80 diff --git a/k8s-manifests/service.yaml b/k8s-manifests/service.yaml index 4a69e79..e37258e 100644 --- a/k8s-manifests/service.yaml +++ b/k8s-manifests/service.yaml @@ -3,15 +3,15 @@ kind: Service metadata: name: todo-app-service annotations: - cloud.google.com/app-protocols: '{"https-port":"HTTPS","http-port":"HTTP"}' + cloud.google.com/app-protocols: '{"todo-app-https-port":"HTTPS","todo-app-http-port":"HTTP"}' spec: type: NodePort selector: app: todo-app ports: - - name: https-port + - name: todo-app-https-port port: 443 - targetPort: 3000 - - name: http-port - port: 8080 - targetPort: 3000 + targetPort: todo-app-container-port + - name: todo-app-http-port + port: 80 + targetPort: todo-app-container-port -- GitLab