summaryrefslogtreecommitdiffstats
path: root/kubernetes/common
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common')
-rw-r--r--kubernetes/common/cassandra/resources/config/docker-entrypoint.sh4
-rw-r--r--kubernetes/common/common/templates/_affinities.tpl4
-rw-r--r--kubernetes/common/mariadb-galera/templates/statefulset.yaml6
-rwxr-xr-xkubernetes/common/mariadb-init/resources/config/db_init.sh4
4 files changed, 9 insertions, 9 deletions
diff --git a/kubernetes/common/cassandra/resources/config/docker-entrypoint.sh b/kubernetes/common/cassandra/resources/config/docker-entrypoint.sh
index c01d7c6d57..2d30f2e068 100644
--- a/kubernetes/common/cassandra/resources/config/docker-entrypoint.sh
+++ b/kubernetes/common/cassandra/resources/config/docker-entrypoint.sh
@@ -71,7 +71,7 @@ if [ "$1" = 'cassandra' ]; then
start_rpc \
authenticator \
; do
- var="CASSANDRA_${yaml^^}"
+ var="CASSANDRA_$(echo $yaml | tr '[:lower:]' '[:upper:]')"
# eval presents no security issue here because of limited possible values of var
eval val=\$$var
if [ "$val" ]; then
@@ -81,7 +81,7 @@ if [ "$1" = 'cassandra' ]; then
done
for rackdc in dc rack; do
- var="CASSANDRA_${rackdc^^}"
+ var="CASSANDRA_$(echo $rackdc | tr '[:lower:]' '[:upper:]')"
# eval presents no security issue here because of limited possible values of var
eval val=\$$var
if [ "$val" ]; then
diff --git a/kubernetes/common/common/templates/_affinities.tpl b/kubernetes/common/common/templates/_affinities.tpl
index f0802be29d..bf7ae497ca 100644
--- a/kubernetes/common/common/templates/_affinities.tpl
+++ b/kubernetes/common/common/templates/_affinities.tpl
@@ -23,7 +23,7 @@ Return a soft nodeAffinity definition
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
matchExpressions:
- key: {{ .key }}
+ - key: {{ .key }}
operator: In
values:
{{- range .values }}
@@ -40,7 +40,7 @@ Return a hard nodeAffinity definition
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: {{ .key }}
+ - key: {{ .key }}
operator: In
values:
{{- range .values }}
diff --git a/kubernetes/common/mariadb-galera/templates/statefulset.yaml b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
index 7b0d90a9aa..9227e182b6 100644
--- a/kubernetes/common/mariadb-galera/templates/statefulset.yaml
+++ b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
@@ -223,7 +223,7 @@ spec:
{{- end }}
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
{{- if .Values.affinity }}
- affinity: {{- include "common.tplvalues" ( dict "value" .Values.affinity "context" $) | nindent 8 }}
+ affinity: {{- include "common.tplValue" ( dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
@@ -231,10 +231,10 @@ spec:
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.nodeSelector }}
- nodeSelector: {{- include "common.tplvalues" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
+ nodeSelector: {{- include "common.tplValue" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
- tolerations: {{- include "common.tplvalues" (dict "value" .Values.tolerations "context" .) | nindent 8 }}
+ tolerations: {{- include "common.tplValue" (dict "value" .Values.tolerations "context" .) | nindent 8 }}
{{- end }}
volumes:
- name: previous-boot
diff --git a/kubernetes/common/mariadb-init/resources/config/db_init.sh b/kubernetes/common/mariadb-init/resources/config/db_init.sh
index f130bb5118..df7c336405 100755
--- a/kubernetes/common/mariadb-init/resources/config/db_init.sh
+++ b/kubernetes/common/mariadb-init/resources/config/db_init.sh
@@ -21,8 +21,8 @@
set -e
while read DB ; do
- USER_VAR="MYSQL_USER_${DB^^}"
- PASS_VAR="MYSQL_PASSWORD_${DB^^}"
+ USER_VAR="MYSQL_USER_$(echo $DB | tr '[:lower:]' '[:upper:]')"
+ PASS_VAR="MYSQL_PASSWORD_$(echo $DB | tr '[:lower:]' '[:upper:]')"
{{/*
# USER=${!USER_VAR}
# PASS=`echo -n ${!PASS_VAR} | sed -e "s/'/''/g"`