85 lines
1.5 KiB
YAML
85 lines
1.5 KiB
YAML
---
|
||
# Secret – CouchDB credentials
|
||
apiVersion: v1
|
||
kind: Secret
|
||
metadata:
|
||
name: couchdb-credentials
|
||
namespace: couchdb
|
||
type: Opaque
|
||
stringData:
|
||
username: admin
|
||
password: Couchdb01
|
||
url: http://admin:Couchdb01@couchdb.couchdb.svc.cluster.local:5984
|
||
|
||
---
|
||
# Deployment
|
||
apiVersion: apps/v1
|
||
kind: Deployment
|
||
metadata:
|
||
name: aangifte
|
||
namespace: couchdb
|
||
labels:
|
||
app: aangifte
|
||
spec:
|
||
replicas: 1
|
||
selector:
|
||
matchLabels:
|
||
app: aangifte
|
||
template:
|
||
metadata:
|
||
labels:
|
||
app: aangifte
|
||
spec:
|
||
containers:
|
||
- name: aangifte
|
||
image: allardkrings/aangifte
|
||
imagePullPolicy: Always
|
||
ports:
|
||
- containerPort: 8080
|
||
env:
|
||
- name: COUCHDB_URL
|
||
valueFrom:
|
||
secretKeyRef:
|
||
name: couchdb-credentials
|
||
key: url
|
||
resources:
|
||
requests:
|
||
memory: "128Mi"
|
||
cpu: "100m"
|
||
limits:
|
||
memory: "256Mi"
|
||
cpu: "250m"
|
||
|
||
---
|
||
# Service
|
||
apiVersion: v1
|
||
kind: Service
|
||
metadata:
|
||
name: aangifte
|
||
namespace: couchdb
|
||
spec:
|
||
selector:
|
||
app: aangifte
|
||
ports:
|
||
- port: 8080
|
||
targetPort: 8080
|
||
|
||
---
|
||
# IngressRoute
|
||
apiVersion: traefik.io/v1alpha1
|
||
kind: IngressRoute
|
||
metadata:
|
||
name: aangifte
|
||
namespace: couchdb
|
||
spec:
|
||
entryPoints:
|
||
- websecure
|
||
routes:
|
||
- match: Host(`aangifte-prod.allarddcs.nl`)
|
||
kind: Rule
|
||
services:
|
||
- name: aangifte
|
||
port: 8080
|
||
tls:
|
||
certResolver: letsencrypt
|