Skip to content
Snippets Groups Projects
Commit e20abddd authored by Sam Galson's avatar Sam Galson
Browse files

add per-app couchdb

parent 101b36ed
No related branches found
No related tags found
No related merge requests found
Pipeline #4164 skipped with stage
deployment
.DS_Store
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: couchdb-${CI_ENVIRONMENT_SLUG}
namespace: ${KUBE_NAMESPACE}
labels:
app: couchdb-${CI_ENVIRONMENT_SLUG}
annotations:
kubernetes.io/tls-acme: "true"
kubernetes.io/ingress.class: "nginx"
spec:
tls:
- hosts:
- ${CI_ENVIRONMENT_SLUG}.gateway.xpub.semioticsquares.com
secretName: couchdb-tls-${CI_ENVIRONMENT_SLUG}
rules:
- host: ${CI_ENVIRONMENT_SLUG}.gateway.xpub.semioticsquares.com
http:
paths:
- path: /
backend:
serviceName: couchdb-${CI_ENVIRONMENT_SLUG}
servicePort: 5984
apiVersion: v1
kind: Service
metadata:
name: couchdb-internal-${CI_ENVIRONMENT_SLUG}
namespace: ${KUBE_NAMESPACE}
labels:
app: couchdb-${CI_ENVIRONMENT_SLUG}
spec:
clusterIP: None
ports:
- protocol: TCP
name: couchdb
port: 5984
selector:
app: couchdb-${CI_ENVIRONMENT_SLUG}
apiVersion: v1
kind: Service
metadata:
name: couchdb-${CI_ENVIRONMENT_SLUG}
namespace: ${KUBE_NAMESPACE}
labels:
app: couchdb-${CI_ENVIRONMENT_SLUG}
spec:
type: ClusterIP
ports:
- protocol: TCP
name: couchdb
port: 5984
selector:
app: couchdb-${CI_ENVIRONMENT_SLUG}
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: couchdb-${CI_ENVIRONMENT_SLUG}
namespace: ${KUBE_NAMESPACE}
labels:
app: couchdb-${CI_ENVIRONMENT_SLUG}
track: stable
spec:
replicas: 1
serviceName: couchdb-internal-${CI_ENVIRONMENT_SLUG}
selector:
matchLabels:
app: couchdb-${CI_ENVIRONMENT_SLUG}
template:
metadata:
labels:
app: couchdb-${CI_ENVIRONMENT_SLUG}
spec:
containers:
- name: couchdb
image: couchdb:2.1.1
imagePullPolicy: Always
ports:
- name: couchdb
containerPort: 5984
- name: epmd
containerPort: 4369
- containerPort: 9100
env:
- name: ERL_FLAGS
value: "-name couchdb -setcookie monster"
- name: COUCHDB_USER
valueFrom:
secretKeyRef:
name: couchdb
key: adminUsername
- name: COUCHDB_PASSWORD
valueFrom:
secretKeyRef:
name: couchdb
key: adminPassword
- name: COUCHDB_SECRET
valueFrom:
secretKeyRef:
name: couchdb
key: cookieAuthSecret
livenessProbe:
httpGet:
path: /
port: 5984
readinessProbe:
httpGet:
path: /_up
port: 5984
volumeMounts:
- name: couchdb-${CI_ENVIRONMENT_SLUG}
mountPath: /var/lib/couchdb
volumes:
- name: couchdb-${CI_ENVIRONMENT_SLUG}
volumeClaimTemplates:
- metadata:
name: couchdb-${CI_ENVIRONMENT_SLUG}
labels:
app: couchdb-${CI_ENVIRONMENT_SLUG}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment