Files

82 lines
2.1 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:
initContainers:
- name: config-copy
image: busybox
command: ["cp", "/cm/livesync.ini", "/local-d/livesync.ini"]
volumeMounts:
- name: couchdb-config
mountPath: /cm
- name: couchdb-local-d
mountPath: /local-d
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-local-d
mountPath: /opt/couchdb/etc/local.d
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
- name: couchdb-local-d
emptyDir: {}