diff --git a/deploy/k8s/couchdb-statefulset.yaml b/deploy/k8s/couchdb-statefulset.yaml index 8a49684..8c477f1 100644 --- a/deploy/k8s/couchdb-statefulset.yaml +++ b/deploy/k8s/couchdb-statefulset.yaml @@ -69,12 +69,6 @@ spec: secretKeyRef: name: adopt-a-street-secrets key: COUCHDB_SECRET - - name: NODENAME - value: couchdb@adopt-a-street-couchdb-0.adopt-a-street-couchdb - - name: ERL_FLAGS - value: "+K true +A 4" - - name: COUCHDB_SINGLE_NODE_ENABLED - value: "true" resources: requests: memory: "512Mi" @@ -89,41 +83,18 @@ spec: httpGet: path: /_up port: 5984 - initialDelaySeconds: 30 + initialDelaySeconds: 60 periodSeconds: 10 timeoutSeconds: 5 - failureThreshold: 3 + failureThreshold: 6 readinessProbe: httpGet: path: /_up port: 5984 - initialDelaySeconds: 5 + initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 - failureThreshold: 3 - command: - - sh - - -c - - | - # Create config directory and copy configuration - mkdir -p /opt/couchdb/etc/local.d - echo "[chttpd]" > /opt/couchdb/etc/local.d/10-cluster.ini - echo "bind_address = 0.0.0.0" >> /opt/couchdb/etc/local.d/10-cluster.ini - echo "port = 5984" >> /opt/couchdb/etc/local.d/10-cluster.ini - echo "[couchdb]" >> /opt/couchdb/etc/local.d/10-cluster.ini - echo "single_node = true" >> /opt/couchdb/etc/local.d/10-cluster.ini - echo "enable_cors = true" >> /opt/couchdb/etc/local.d/10-cluster.ini - echo "[cors]" >> /opt/couchdb/etc/local.d/10-cluster.ini - echo "origins = *" >> /opt/couchdb/etc/local.d/10-cluster.ini - echo "credentials = true" >> /opt/couchdb/etc/local.d/10-cluster.ini - echo "headers = accept, authorization, content-type, origin, referer, x-csrf-token" >> /opt/couchdb/etc/local.d/10-cluster.ini - echo "methods = GET, PUT, POST, HEAD, DELETE" >> /opt/couchdb/etc/local.d/10-cluster.ini - echo "max_age = 3600" >> /opt/couchdb/etc/local.d/10-cluster.ini - # Add admin credentials - echo "[admins]" >> /opt/couchdb/etc/local.d/10-cluster.ini - echo "${COUCHDB_USER} = ${COUCHDB_PASSWORD}" >> /opt/couchdb/etc/local.d/10-cluster.ini - # Start CouchDB - exec /opt/couchdb/bin/couchdb + failureThreshold: 6 volumeClaimTemplates: - metadata: