aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/aai/components/aai-traversal/templates
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-01-18 11:38:49 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-01-19 08:31:00 +0100
commit331f004f58c40f70ab3b51cd3d504811ad132c3f (patch)
treef83f1202e367f0eaaa4babb6b3bde9a88688d099 /kubernetes/aai/components/aai-traversal/templates
parent552aea3d9fad719414a6ed922de96cf69f0bb5e8 (diff)
[AAI] Templatize MSB services
Instead of "hardcoding" all services, let's generate them with two values and shrink a little bit template. It also simplify the reading of the template. Issue-ID: OOM-2664 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I2a5f181fac93f34e074998aeaf82489f8305de1f
Diffstat (limited to 'kubernetes/aai/components/aai-traversal/templates')
-rw-r--r--kubernetes/aai/components/aai-traversal/templates/deployment.yaml572
1 files changed, 17 insertions, 555 deletions
diff --git a/kubernetes/aai/components/aai-traversal/templates/deployment.yaml b/kubernetes/aai/components/aai-traversal/templates/deployment.yaml
index ab1cb309d8..6f5ac8263b 100644
--- a/kubernetes/aai/components/aai-traversal/templates/deployment.yaml
+++ b/kubernetes/aai/components/aai-traversal/templates/deployment.yaml
@@ -2,6 +2,7 @@
# Copyright (c) 2017 Amdocs, Bell Canada
# Modifications Copyright (c) 2018 AT&T
# Modifications Copyright (c) 2020 Nokia, Orange
+# Modifications Copyright (c) 2021 Orange
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -39,304 +40,34 @@ spec:
name: {{ include "common.name" . }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+ {{- if .Values.global.msbEnabled }}
+ {{ $values := .Values }}
msb.onap.org/service-info: '[
+ {{- range $api_endpoint := $values.aai_enpoints -}}
+ {{- range $api_version := $values.api_list }}
{
- "serviceName": "_aai-generic-query",
- "version": "v11",
- "url": "/aai/v11/search/generic-query",
+ "serviceName": "_{{ $api_endpoint.name }}",
+ "version": "v{{ $api_version }}",
+ "url": "/aai/v{{ $api_version }}/{{ $api_endpoint.url }}",
"protocol": "REST",
"port": "8446",
"enable_ssl": true,
"lb_policy":"ip_hash",
"visualRange": "1",
- "path": "/aai/v11/search/generic-query"
+ "path": "/aai/v{{ $api_version }}/{{ $api_endpoint.url }}"
},
{
- "serviceName": "_aai-generic-query",
- "version": "v12",
- "url": "/aai/v12/search/generic-query",
+ "serviceName": "{{ $api_endpoint.name }}",
+ "version": "v{{ $api_version }}",
+ "url": "/aai/v{{ $api_version }}/{{ $api_endpoint.url }}",
"protocol": "REST",
"port": "8446",
"enable_ssl": true,
"lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v12/search/generic-query"
- },
- {
- "serviceName": "_aai-generic-query",
- "version": "v13",
- "url": "/aai/v13/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v13/search/generic-query"
- },
- {
- "serviceName": "_aai-generic-query",
- "version": "v14",
- "url": "/aai/v14/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v14/search/generic-query"
- },
- {
- "serviceName": "_aai-generic-query",
- "version": "v15",
- "url": "/aai/v15/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v15/search/generic-query"
- },
- {
- "serviceName": "_aai-generic-query",
- "version": "v16",
- "url": "/aai/v16/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v16/search/generic-query"
- },
- {
- "serviceName": "_aai-generic-query",
- "version": "v17",
- "url": "/aai/v17/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v17/search/generic-query"
- },
- {
- "serviceName": "_aai-generic-query",
- "version": "v18",
- "url": "/aai/v18/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v18/search/generic-query"
- },
- {
- "serviceName": "_aai-generic-query",
- "version": "v19",
- "url": "/aai/v19/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v19/search/generic-query"
- },
- {
- "serviceName": "_aai-nodes-query",
- "version": "v11",
- "url": "/aai/v11/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v11/search/nodes-query"
- },
- {
- "serviceName": "_aai-nodes-query",
- "version": "v12",
- "url": "/aai/v12/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v12/search/nodes-query"
- },
- {
- "serviceName": "_aai-nodes-query",
- "version": "v13",
- "url": "/aai/v13/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v13/search/nodes-query"
- },
- {
- "serviceName": "_aai-nodes-query",
- "version": "v14",
- "url": "/aai/v14/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v14/search/nodes-query"
- },
- {
- "serviceName": "_aai-nodes-query",
- "version": "v15",
- "url": "/aai/v15/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v15/search/nodes-query"
- },
- {
- "serviceName": "_aai-nodes-query",
- "version": "v16",
- "url": "/aai/v16/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v16/search/nodes-query"
- },
- {
- "serviceName": "_aai-nodes-query",
- "version": "v17",
- "url": "/aai/v17/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v17/search/nodes-query"
- },
- {
- "serviceName": "_aai-nodes-query",
- "version": "v18",
- "url": "/aai/v18/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v18/search/nodes-query"
- },
- {
- "serviceName": "_aai-nodes-query",
- "version": "v19",
- "url": "/aai/v19/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v19/search/nodes-query"
- },
- {
- "serviceName": "_aai-query",
- "version": "v11",
- "url": "/aai/v11/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v11/query"
- },
- {
- "serviceName": "_aai-query",
- "version": "v12",
- "url": "/aai/v12/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v12/query"
- },
- {
- "serviceName": "_aai-query",
- "version": "v13",
- "url": "/aai/v13/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v13/query"
- },
- {
- "serviceName": "_aai-query",
- "version": "v14",
- "url": "/aai/v14/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v14/query"
- },
- {
- "serviceName": "_aai-query",
- "version": "v15",
- "url": "/aai/v15/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v15/query"
- },
- {
- "serviceName": "_aai-query",
- "version": "v16",
- "url": "/aai/v16/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v16/query"
- },
- {
- "serviceName": "_aai-query",
- "version": "v17",
- "url": "/aai/v17/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v17/query"
- },
- {
- "serviceName": "_aai-query",
- "version": "v18",
- "url": "/aai/v18/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v18/query"
- },
- {
- "serviceName": "_aai-query",
- "version": "v19",
- "url": "/aai/v19/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1",
- "path": "/aai/v19/query"
+ "visualRange": "1"
},
+ {{- end }}
+ {{- end }}
{
"serviceName": "_aai-named-query",
"url": "/aai/search",
@@ -348,276 +79,6 @@ spec:
"path": "/aai/search"
},
{
- "serviceName": "aai-generic-query",
- "version": "v11",
- "url": "/aai/v11/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-generic-query",
- "version": "v12",
- "url": "/aai/v12/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-generic-query",
- "version": "v13",
- "url": "/aai/v13/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-generic-query",
- "version": "v14",
- "url": "/aai/v14/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-generic-query",
- "version": "v15",
- "url": "/aai/v15/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-generic-query",
- "version": "v16",
- "url": "/aai/v16/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-generic-query",
- "version": "v17",
- "url": "/aai/v17/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-generic-query",
- "version": "v18",
- "url": "/aai/v18/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-generic-query",
- "version": "v19",
- "url": "/aai/v19/search/generic-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-nodes-query",
- "version": "v11",
- "url": "/aai/v11/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-nodes-query",
- "version": "v12",
- "url": "/aai/v12/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-nodes-query",
- "version": "v13",
- "url": "/aai/v13/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-nodes-query",
- "version": "v14",
- "url": "/aai/v14/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-nodes-query",
- "version": "v15",
- "url": "/aai/v15/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-nodes-query",
- "version": "v16",
- "url": "/aai/v16/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-nodes-query",
- "version": "v17",
- "url": "/aai/v17/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-nodes-query",
- "version": "v18",
- "url": "/aai/v18/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-nodes-query",
- "version": "v19",
- "url": "/aai/v19/search/nodes-query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-query",
- "version": "v11",
- "url": "/aai/v11/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-query",
- "version": "v12",
- "url": "/aai/v12/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-query",
- "version": "v13",
- "url": "/aai/v13/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-query",
- "version": "v14",
- "url": "/aai/v14/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-query",
- "version": "v15",
- "url": "/aai/v15/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-query",
- "version": "v16",
- "url": "/aai/v16/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-query",
- "version": "v17",
- "url": "/aai/v17/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-query",
- "version": "v18",
- "url": "/aai/v18/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
- "serviceName": "aai-query",
- "version": "v19",
- "url": "/aai/v19/query",
- "protocol": "REST",
- "port": "8446",
- "enable_ssl": true,
- "lb_policy":"ip_hash",
- "visualRange": "1"
- },
- {
"serviceName": "aai-named-query",
"url": "/aai/search",
"protocol": "REST",
@@ -627,6 +88,7 @@ spec:
"visualRange": "1"
}
]'
+ {{- end }}
spec:
hostname: aai-traversal
{{ if .Values.global.initContainers.enabled }}
@@ -653,7 +115,7 @@ spec:
{{- end }}
- --container-name
- aai-schema-service
- {{ end }}
+ {{ end }}
env:
- name: NAMESPACE
valueFrom: