Skip to content
Snippets Groups Projects
Commit 21be6167 authored by Dobromir Palushev's avatar Dobromir Palushev
Browse files

updated K8s-manifests

parent d229b591
No related branches found
No related tags found
31 merge requests!36pipeline multiple updates,!35pipeline multiple updates,!33pipeline multiple updates,!32pipeline multiple updates,!30pipeline multiple updates,!28pipeline multiple updates,!27pipeline multiple updates,!26pipeline multiple updates,!25pipeline multiple updates,!24pipeline multiple updates,!23pipeline multiple updates,!22pipeline multiple updates,!21pipeline multiple updates,!20pipeline multiple updates,!19pipeline multiple updates,!18pipeline multiple updates,!17pipeline multiple updates,!16pipeline multiple updates,!15pipeline multiple updates,!14pipeline multiple updates,!12pipeline multiple updates,!11pipeline multiple updates,!10pipeline multiple updates,!9pipeline multiple updates,!8pipeline multiple updates,!7pipeline multiple updates,!6pipeline multiple updates,!5pipeline multiple updates,!4pipeline multiple updates,!3pipeline multiple updates,!2pipeline multiple updates
apiVersion: v1
kind: ConfigMap
metadata:
name: app-config
data:
PORT: 3000
# MONGODB_URL: mongo-service.namespace (from infra repo. Does this work? Or do I have to dynamically set it?)
MONGODB_URL: mongodb://<mongo-service>:27017/todo-app
apiVersion: v1
kind: ConfigMap
metadata:
name: todo-app-config
data:
PORT: 3000
# MONGODB_URL: mongodb://<mongo-service>:27017/todo-app
# mongodb-service.<namespace>?
MONGODB_URL: mongodb-service
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-deployment
name: todo-app-deployment
labels:
app: todo-app
spec:
......@@ -24,8 +24,9 @@ spec:
ports:
- containerPort: 3000
# imagePullPolicy: IfNotPresent
# env for mongodb username and pass?
envFrom:
- configMapRef:
name: app-config
name: todo-app-config
- secretRef:
name: app-secrets
name: todo-app-secrets
apiVersion: networking.k8s.io/v1
kind: Ingress
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.global-static-ip-name: todoapp-ip # staging-todoapp-ip for staging
networking.gke.io/managed-certificates: todoapp-managed-cert # defined in the infrastructure repository
spec:
# rules:
# - http:
# paths:
# - path: /*
# pathType: ImplementationSpecific
# backend:
# serviceName: todo-app-service
# servicePort: 80
defaultBackend:
service:
name: todo-app-service
port:
number: 8080
apiVersion: v1
kind: Secret
metadata:
name: app-secrets
name: todo-app-secrets
type: Opaque
data:
JWT_SECRET: <jwt-secret in base64>
......@@ -2,12 +2,16 @@ apiVersion: v1
kind: Service
metadata:
name: todo-app-service
annotations:
cloud.google.com/app-protocols: '{"https-port":"HTTPS","http-port":"HTTP"}'
spec:
type: NodePort
selector:
app: todo-app
ports:
- port: 8080
- name: https-port
port: 443
targetPort: 3000
- name: http-port
port: 8080
targetPort: 3000
# port for external IP address (that you need to put in your browser)
# nodePort: 30000
# type: LoadBalancer
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