Add an option to disable anonymous requests to the 5984 port (#8266)

* Add an option to disable anonymous requests

Signed-off-by: Alfredo Matas <amatas@gmail.com>

* Bump version of the chart

Signed-off-by: Alfredo Matas <amatas@gmail.com>
This commit is contained in:
Alfredo Matas
2018-10-08 12:54:13 -07:00
committed by k8s-ci-robot
parent fadddc12f7
commit b6f04fa4c9
3 changed files with 22 additions and 1 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: couchdb
version: 0.2.1
version: 0.2.2
appVersion: 2.2.0
description: A database featuring seamless multi-master sync, that scales from
big data to mobile, with an intuitive HTTP/JSON API and designed for
@@ -61,13 +61,29 @@ spec:
- name: ERL_FLAGS
value: "{{ range $k, $v := .Values.erlangFlags }} -{{ $k }} {{ $v }} {{ end }}"
livenessProbe:
{{- if .Values.couchdbConfig.chttpd.require_valid_user }}
exec:
command:
- sh
- -c
- curl -G --silent --fail -u ${COUCHDB_USER}:${COUCHDB_PASSWORD} http://localhost:5984/
{{- else }}
httpGet:
path: /
port: 5984
{{- end }}
readinessProbe:
{{- if .Values.couchdbConfig.chttpd.require_valid_user }}
exec:
command:
- sh
- -c
- curl -G --silent --fail -u ${COUCHDB_USER}:${COUCHDB_PASSWORD} http://localhost:5984/_up
{{- else }}
httpGet:
path: /_up
port: 5984
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
volumeMounts:
+5
View File
@@ -116,5 +116,10 @@ erlangFlags:
## by a ConfigMap object.
## ref: http://docs.couchdb.org/en/latest/config/index.html
couchdbConfig:
# cluster:
# q: 8 # Create 8 shards for each database
chttpd:
bind_address: any
# chttpd.require_valid_user disables all the anonymous requests to the port
# 5984 when is set to true.
require_valid_user: false