diff options
author | Jack Lucas <jflos@sonoris.net> | 2022-03-08 13:35:24 -0500 |
---|---|---|
committer | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2022-03-15 13:40:32 +0000 |
commit | 1e184219318a6a386a16a6ae3ac3771205b81724 (patch) | |
tree | bc2d98f7ee029f6acea6da0a971413c20f1e7143 /kubernetes | |
parent | 4830e66d51450883839a7198ea0108376449b66e (diff) |
[DCAEGEN2] Fix check for log directory path
Fix bug in dcaegen2-services-common deployment
template that caused a nil pointer error when
values.yaml for a dcaegen2 microservice did not
have a log.path entry.
Issue-ID: DCAEGEN2-3093
Signed-off-by: Jack Lucas <jflos@sonoris.net>
Change-Id: I3874fd4c4327b487f3a9bf7d95e747d86a320998
Diffstat (limited to 'kubernetes')
-rw-r--r-- | kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl b/kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl index ef49f8c5d4..ef846034d0 100644 --- a/kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl +++ b/kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl @@ -1,7 +1,7 @@ {{/* #============LICENSE_START======================================================== # ================================================================================ -# Copyright (c) 2021 J. F. Lucas. All rights reserved. +# Copyright (c) 2021-2022 J. F. Lucas. All rights reserved. # Copyright (c) 2021 AT&T Intellectual Property. All rights reserved. # Copyright (c) 2021 Nokia. All rights reserved. # Copyright (c) 2021 Nordix Foundation. @@ -176,7 +176,7 @@ The Deployment always includes a single Pod, with a container that uses the DCAE microservice image. The Deployment Pod may also include a logging sidecar container. -The sidecar is included if .Values.logDirectory is set. The +The sidecar is included if .Values.log.path is set. The logging sidecar and the DCAE microservice container share a volume where the microservice logs are written. @@ -222,7 +222,8 @@ policies: */}} {{- define "dcaegen2-services-common.microserviceDeployment" -}} -{{- $logDir := default "" .Values.log.path -}} +{{- $log := default dict .Values.log -}} +{{- $logDir := default "" $log.path -}} {{- $certDir := default "" .Values.certDirectory . -}} {{- $tlsServer := default "" .Values.tlsServer -}} {{- $commonRelease := print (include "common.release" .) -}} |