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

added K8s manifests (wip)

parent 97b7275f
No related branches found
No related tags found
No related merge requests found
apiVersion: v1
kind: ConfigMap
metadata:
name: app-config
data:
PORT: 3000
# MONGODB_URL: mongo-service (from infra repo. Does this work? Or do I have to dynamically set it?)
MONGODB_URL: mongodb://<mongo-service>:27017/todo-app
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-deployment
labels:
app: todo-app
spec:
replicas: 3
strategy:
type: 'RollingUpdate'
selector:
matchLabels:
app: todo-app
template:
metadata:
labels:
app: todo-app
spec:
imagePullSecrets:
- name: 'gitlab-registry-credentials'
containers:
- image: devops-app
name: todo-app-container
ports:
- containerPort: 3000
# imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: app-config
- secretRef:
name: app-secrets
apiVersion: v1
kind: Secret
metadata:
name: app-secrets
type: Opaque
data:
JWT_SECRET: <jwt-secret in base64>
apiVersion: v1
kind: Service
metadata:
name: todo-app-service
spec:
selector:
app: todo-app
ports:
- port: 80
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