ansible role update

This commit is contained in:
havelight-ee
2022-12-09 13:38:44 +09:00
parent 8391ca915d
commit 3af7e034fc
890 changed files with 79234 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}-replicaset-entrypoint
labels: {{- include "common.labels.standard" . | nindent 4 }}
data:
replicaset-entrypoint.sh: |-
#!/bin/bash
sleep 5
. /liblog.sh
# Perform adaptations depending on the host name
if [[ $HOSTNAME =~ (.*)-0$ ]]; then
info "Setting node as primary"
export MONGODB_REPLICA_SET_MODE=primary
else
info "Setting node as secondary"
export MONGODB_REPLICA_SET_MODE=secondary
{{- if .Values.usePasswordFile }}
export MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD_FILE="$MONGODB_ROOT_PASSWORD_FILE"
unset MONGODB_ROOT_PASSWORD_FILE
{{- else }}
export MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD="$MONGODB_ROOT_PASSWORD"
unset MONGODB_ROOT_PASSWORD
{{- end }}
fi
exec /entrypoint.sh /run.sh