diff --git a/k8s-manifests/configmap.yaml b/k8s-manifests/configmap.yaml index a4ba65cceda16cb6fdb72a9fa98c8c4a6c628741..359178a912f06948f61369b38fcf3334b937d8c4 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 bb52499d91b6c6c962a71172c75fc244975a36ee..b8272c2bc6e5669942ee62a0e2bebb9463267b28 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 7635067ab99bf8b02bce80d803d08e0d511c327f..f3386c497c15e21417e525ff9da9606b7e030e06 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 4a69e79411f9e844ef6c3bc223cb38081d5f3970..e37258e245d6139addfe123a42d832ba2f0627d4 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