72 lines
1.8 KiB
YAML
72 lines
1.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: couchdb
|
|
namespace: obsidian
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: couchdb
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: couchdb
|
|
spec:
|
|
containers:
|
|
- name: couchdb
|
|
image: couchdb:3
|
|
env:
|
|
- name: COUCHDB_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: couchdb-secret
|
|
key: COUCHDB_USER
|
|
- name: COUCHDB_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: couchdb-secret
|
|
key: COUCHDB_PASSWORD
|
|
- name: COUCHDB_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: couchdb-secret
|
|
key: COUCHDB_SECRET
|
|
ports:
|
|
- containerPort: 5984
|
|
name: http
|
|
volumeMounts:
|
|
- name: couchdb-data
|
|
mountPath: /opt/couchdb/data
|
|
- name: couchdb-config
|
|
mountPath: /opt/couchdb/etc/local.d/livesync.ini
|
|
subPath: livesync.ini
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /_up
|
|
port: 5984
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /_up
|
|
port: 5984
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 256Mi
|
|
volumes:
|
|
- name: couchdb-data
|
|
persistentVolumeClaim:
|
|
claimName: couchdb-data
|
|
- name: couchdb-config
|
|
configMap:
|
|
name: couchdb-config
|