summaryrefslogtreecommitdiffstats
path: root/kubernetes/dcaegen2-services/resources
diff options
context:
space:
mode:
authorJack Lucas <jflos@sonoris.net>2021-11-01 16:54:12 -0400
committerJack Lucas <jflos@sonoris.net>2021-11-19 10:05:00 -0500
commitec09fd5a219e49e1be9eaddf9e2cb2f7f5d2f662 (patch)
tree109677364dc1281a6b2400d51ed93608ab7ebad1 /kubernetes/dcaegen2-services/resources
parent4eb609904c7882b95ff1122b911bbe42feaaee21 (diff)
[DCAEGEN2] Updates for R10
By default, disable all dcaegen2 components except config-binding-service, healthcheck, and ves-openapi-manager. Fix DNS name for the ONAP consul instance. Move mongodb dependency from dcae-bootstrap to dcae-tcagen2. Fix the generation of the JSON list of expected components for the healthcheck services. (Previously could have a spurious leading ",") Update healthcheck-container version to 2.3.0 for logging enhancements and updated base image. Issue-ID: DCAEGEN2-2968 Issue-ID: DCAEGEN2-2958 Issue-ID: DCAEGEN2-2983 Signed-off-by: Jack Lucas <jflos@sonoris.net> Change-Id: I4bcce1d3e43e2e5c7cc2c3179870de72b55d5d2e
Diffstat (limited to 'kubernetes/dcaegen2-services/resources')
-rw-r--r--kubernetes/dcaegen2-services/resources/expected-components.json74
1 files changed, 49 insertions, 25 deletions
diff --git a/kubernetes/dcaegen2-services/resources/expected-components.json b/kubernetes/dcaegen2-services/resources/expected-components.json
index 948c479430..f654ac8dc3 100644
--- a/kubernetes/dcaegen2-services/resources/expected-components.json
+++ b/kubernetes/dcaegen2-services/resources/expected-components.json
@@ -1,28 +1,52 @@
{{/*
-#============LICENSE_START========================================================
-# ================================================================================
-# Copyright (c) 2021 J. F. Lucas. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=========================================================
+ ============LICENSE_START========================================================
+ =================================================================================
+ Copyright (c) 2021 J. F. Lucas. All rights reserved.
+ =================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ =============LICENSE_END=========================================================
*/}}
-[
-{{- $ctx := . }}
-{{- $components := tuple "dcae-hv-ves-collector" "dcae-prh" "dcae-tcagen2" "dcae-ves-collector" }}
-{{- range $i, $v := $components }}
-{{- if index $ctx.Values . "enabled" }}
-{{- if $i }},{{ end }}
-{{ $v | quote | indent 2 }}
+
+{{/*
+
+ This template generates a JSON file with an array containing the names of the
+ components that the healthcheck container always expects to see--that is, the
+ components that are enabled in the top-level values.yaml file.
+
+ The code loops through the list of components ($components) and checks each component's
+ entry in the values.yaml file is set to "enabled". It adds the name of each enabled
+ component to the list.
+
+ There is a bit of Helm trickery here--the code uses a dict ($enabled), because that's
+ apparently the only way to create a variable outside of a range loop that can be updated
+ from within the range loop. The code here generates a list of the components that are
+ enabled in values.yaml, and stores it into the list called "enabled" in the dictionary
+ $enabled.
+
+ Note also the assignment to an otherwise unused variable ($x) in the loop. Without that
+ assignment, the updated value of the $enabled.enabled list would be rendered into the
+ file each time an enabled component is found.
+
+*/}}
+
+{{- $ctx := . -}}
+{{- $components := list "dcae-hv-ves-collector" "dcae-prh" "dcae-tcagen2" "dcae-ves-collector" -}}
+{{- $enabled := dict "enabled" list -}}
+{{- range $components -}}
+ {{- if index $ctx.Values . "enabled" -}}
+ {{- $x:= . | append $enabled.enabled | set $enabled "enabled" -}}
+ {{- end -}}
{{- end -}}
-{{- end }}
-]
+{{- $enabled.enabled | toJson }}
+
+