Added test environment

This commit is contained in:
Michel ten Voorde
2024-11-05 14:08:53 +01:00
parent 08d53d635e
commit 65279a2947
3 changed files with 52 additions and 0 deletions

38
k8s/deployment-test.yaml Normal file
View File

@@ -0,0 +1,38 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: swiss-test-backend
spec:
replicas: 1
selector:
matchLabels:
app: swiss-test-backend
template:
metadata:
labels:
app: swiss-test-backend
spec:
containers:
- name: swiss-test-backend
image: upquark/swiss-backend:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
env:
# - name: SPRING_PROFILES_ACTIVE
# value: local
- name: DB_URL
valueFrom:
secretKeyRef:
key: host
name: pg-pguser-swiss-test-user
- name: DB_USERNAME
valueFrom:
secretKeyRef:
key: user
name: pg-pguser-swiss-test-user
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
key: password
name: pg-pguser-swiss-test-user

12
k8s/service-test.yaml Normal file
View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: swiss-test-backend
spec:
type: NodePort
selector:
app: swiss-test-backend
ports:
- protocol: TCP
port: 8080
nodePort: 30081