Fix for configmaps
This commit is contained in:
parent
8a4caee0ef
commit
70364e8963
5 changed files with 40 additions and 51 deletions
|
@ -29,6 +29,21 @@ spec:
|
|||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: PUBLIC_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: {{ .Values.publicService.name }}
|
||||
key: url
|
||||
- name: SANDBOX_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: {{ .Values.sandboxService.name }}
|
||||
key: url
|
||||
- name: TRUSTED_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: {{ .Values.service.name }}
|
||||
key: url
|
||||
- name: MYSQL_HOSTNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
|
7
charts/pepper/templates/public-configmap.yaml
Normal file
7
charts/pepper/templates/public-configmap.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Values.publicService.name }}
|
||||
annotations:
|
||||
configmap.fabric8.io/update-on-change: {{ template "fullname" . }}
|
||||
expose.config.fabric8.io/url-key: url
|
7
charts/pepper/templates/sandbox-configmap.yaml
Normal file
7
charts/pepper/templates/sandbox-configmap.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Values.sandboxService.name }}
|
||||
annotations:
|
||||
configmap.fabric8.io/update-on-change: {{ template "fullname" . }}
|
||||
expose.config.fabric8.io/url-key: url
|
7
charts/pepper/templates/trusted-configmap.yaml
Normal file
7
charts/pepper/templates/trusted-configmap.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Values.service.name }}
|
||||
annotations:
|
||||
configmap.fabric8.io/update-on-change: {{ template "fullname" . }}
|
||||
expose.config.fabric8.io/url-key: url
|
|
@ -1,61 +1,14 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
function printHelp {
|
||||
cat <<EOF
|
||||
|
||||
Optional parameters:
|
||||
--trustedUrlBase XXX - sets the trusted url of the instance (default: http://localhost:3000)
|
||||
--sandboxUrlBase XXX - sets the sandbox url of the instance (default: http://localhost:3003)
|
||||
--publicUrlBase XXX - sets the public url of the instance (default: http://localhost:3004)
|
||||
--withProxy - use if Mailtrain is behind an http reverse proxy
|
||||
EOF
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
urlBaseTrusted=http://localhost:3000
|
||||
urlBaseSandbox=http://localhost:3003
|
||||
urlBasePublic=http://localhost:3004
|
||||
wwwProxy=false
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--help)
|
||||
printHelp
|
||||
;;
|
||||
--trustedUrlBase)
|
||||
urlBaseTrusted="$2"
|
||||
shift 2
|
||||
;;
|
||||
--sandboxUrlBase)
|
||||
urlBaseSandbox="$2"
|
||||
shift 2
|
||||
;;
|
||||
--publicUrlBase)
|
||||
urlBasePublic="$2"
|
||||
shift 2
|
||||
;;
|
||||
--withProxy)
|
||||
wwwProxy=true
|
||||
shift 1
|
||||
;;
|
||||
*)
|
||||
echo "Error: unrecognized option $1."
|
||||
printHelp
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
cat > server/config/production.yaml <<EOT
|
||||
www:
|
||||
host: 0.0.0.0
|
||||
proxy: $wwwProxy
|
||||
proxy: true
|
||||
secret: "`pwgen -1`"
|
||||
trustedUrlBase: $urlBaseTrusted
|
||||
sandboxUrlBase: $urlBaseSandbox
|
||||
publicUrlBase: $urlBasePublic
|
||||
trustedUrlBase: $TRUSTED_URL
|
||||
sandboxUrlBase: $SANDBOX_URL
|
||||
publicUrlBase: $PUBLIC_URL
|
||||
|
||||
mysql:
|
||||
host: $MYSQL_HOSTNAME
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue