X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=helm%2Fdbaas%2Ftemplates%2Fappconfig.yaml;fp=helm%2Fdbaasha%2Ftemplates%2Fhealthchecks.yaml;h=a26e352e8ebaf69cff3b8ed10fc8af7f41932436;hb=f882a9b97ac9dec5dfc2468f3150911e296132dc;hp=ac3575a66d30c950c8514cd2900e13f752e2d34e;hpb=393136323474cc68318eda4a674d91cc6aca0ffc;p=ric-plt%2Fric-dep.git diff --git a/helm/dbaasha/templates/healthchecks.yaml b/helm/dbaas/templates/appconfig.yaml similarity index 56% rename from helm/dbaasha/templates/healthchecks.yaml rename to helm/dbaas/templates/appconfig.yaml index ac3575a..a26e352 100644 --- a/helm/dbaasha/templates/healthchecks.yaml +++ b/helm/dbaas/templates/appconfig.yaml @@ -1,6 +1,6 @@ ################################################################################ -# Copyright (c) 2019 AT&T Intellectual Property. # -# Copyright (c) 2019 Nokia. # +# Copyright (c) 2020 AT&T Intellectual Property. # +# Copyright (c) 2020 Nokia. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. # @@ -14,23 +14,26 @@ # See the License for the specific language governing permissions and # # limitations under the License. # ################################################################################ - +{{ $platformNameSpace := include "common.namespace.platform" . }} +{{ $xAppNameSpace := include "common.namespace.xapp" . }} +{{ $nameSpaceList := list $platformNameSpace $xAppNameSpace }} +{{- range $nameSpaceList }} +{{- $namespace := . }} +--- apiVersion: v1 kind: ConfigMap metadata: - name: {{ template "common.configmapname.dbaasha" . }}-probes - labels: - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaasha" . }} +{{- if eq $namespace $platformNameSpace }} + name: {{ include "common.configmapname.dbaas" $ }}-appconfig +{{- else }} + name: dbaas-appconfig +{{- end }} + namespace: {{ $namespace }} data: - readiness.sh: | - #!/bin/sh - set -eu - CHECK_SERVER="$(timeout -t "$2" redis-cli -p "$1"{{ if .Values.auth }} -a "$AUTH"{{ end }} ping)" - - if [ "$CHECK_SERVER" != "PONG" ]; then - echo "Server check failed with: $CHECK_SERVER" - exit 1 - fi +{{- if $.Values.dbaas.enableHighAvailability }} + DBAAS_SERVICE_SENTINEL_PORT: {{ include "common.serviceport.dbaas.sentinel" . | quote }} + DBAAS_MASTER_NAME: {{ $.Values.dbaas.redis.masterGroupName }} +{{- end }} + DBAAS_SERVICE_HOST: {{ include "common.servicename.dbaas.tcp" $ }}.{{ $platformNameSpace }} + DBAAS_SERVICE_PORT: {{ include "common.serviceport.dbaas.redis" $ | quote }} +{{- end }}