[AAI] Service monitor for scraping prometheus metrics
[oom.git] / kubernetes / aai / components / aai-resources / templates / deployment.yaml
index ae328f5..33aa971 100644 (file)
@@ -1,6 +1,8 @@
+{{/*
 # Copyright (c) 2017 Amdocs, Bell Canada
 # Modifications Copyright (c) 2018 AT&T
 # Modifications Copyright (c) 2020 Nokia
+# 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.
@@ -13,6 +15,7 @@
 # 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.
+*/}}
 
 apiVersion: apps/v1
 kind: Deployment
@@ -26,6 +29,12 @@ metadata:
     heritage: {{ .Release.Service }}
 spec:
   replicas: {{ .Values.replicaCount }}
+  minReadySeconds: {{ .Values.minReadySeconds }}
+  strategy:
+    type: {{ .Values.updateStrategy.type }}
+    rollingUpdate:
+      maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
+      maxSurge: {{ .Values.updateStrategy.maxSurge }}
   selector:
     matchLabels:
       app: {{ include "common.name" . }}
@@ -37,1202 +46,99 @@ 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-cloudInfrastructure",
-              "version": "v11",
-              "url": "/aai/v11/cloud-infrastructure",
+              "serviceName": "_{{ $api_endpoint.name }}",
+              "version": "v{{ $api_version }}",
+              "url": "/aai/v{{ $api_version }}/{{ $api_endpoint.url }}",
               "protocol": "REST",
               "port": "8447",
               "enable_ssl": true,
               "lb_policy":"ip_hash",
               "visualRange": "1",
-              "path": "/aai/v11/cloud-infrastructure"
+              "path": "/aai/v{{ $api_version }}/{{ $api_endpoint.url }}"
           },
           {
-              "serviceName": "_aai-cloudInfrastructure",
-              "version": "v12",
-              "url": "/aai/v12/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v12/cloud-infrastructure"
-          },
-          {
-              "serviceName": "_aai-cloudInfrastructure",
-              "version": "v13",
-              "url": "/aai/v13/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v13/cloud-infrastructure"
-          },
-          {
-              "serviceName": "_aai-cloudInfrastructure",
-              "version": "v14",
-              "url": "/aai/v14/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v14/cloud-infrastructure"
-          },
-          {
-              "serviceName": "_aai-cloudInfrastructure",
-              "version": "v15",
-              "url": "/aai/v15/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v15/cloud-infrastructure"
-          },
-          {
-              "serviceName": "_aai-cloudInfrastructure",
-              "version": "v16",
-              "url": "/aai/v16/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v16/cloud-infrastructure"
-          },
-          {
-              "serviceName": "_aai-cloudInfrastructure",
-              "version": "v17",
-              "url": "/aai/v17/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v17/cloud-infrastructure"
-          },
-          {
-              "serviceName": "_aai-cloudInfrastructure",
-              "version": "v18",
-              "url": "/aai/v18/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v18/cloud-infrastructure"
-          },
-          {
-              "serviceName": "_aai-cloudInfrastructure",
-              "version": "v19",
-              "url": "/aai/v19/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v19/cloud-infrastructure"
-          },
-          {
-              "serviceName": "_aai-business",
-              "version": "v11",
-              "url": "/aai/v11/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v11/business"
-          },
-          {
-              "serviceName": "_aai-business",
-              "version": "v12",
-              "url": "/aai/v12/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v12/business"
-          },
-          {
-              "serviceName": "_aai-business",
-              "version": "v13",
-              "url": "/aai/v13/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v13/business"
-          },
-          {
-              "serviceName": "_aai-business",
-              "version": "v14",
-              "url": "/aai/v14/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v14/business"
-          },
-          {
-              "serviceName": "_aai-business",
-              "version": "v15",
-              "url": "/aai/v15/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v15/business"
-          },
-          {
-              "serviceName": "_aai-business",
-              "version": "v16",
-              "url": "/aai/v16/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v16/business"
-          },
-          {
-              "serviceName": "_aai-business",
-              "version": "v17",
-              "url": "/aai/v17/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v17/business"
-          },
-          {
-              "serviceName": "_aai-business",
-              "version": "v18",
-              "url": "/aai/v18/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v18/business"
-          },
-          {
-              "serviceName": "_aai-business",
-              "version": "v19",
-              "url": "/aai/v19/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v19/business"
-          },
-          {
-              "serviceName": "_aai-actions",
-              "version": "v11",
-              "url": "/aai/v11/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v11/actions"
-          },
-          {
-              "serviceName": "_aai-actions",
-              "version": "v12",
-              "url": "/aai/v12/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v12/actions"
-          },
-          {
-              "serviceName": "_aai-actions",
-              "version": "v13",
-              "url": "/aai/v13/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v13/actions"
-          },
-          {
-              "serviceName": "_aai-actions",
-              "version": "v14",
-              "url": "/aai/v14/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v14/actions"
-          },
-          {
-              "serviceName": "_aai-actions",
-              "version": "v15",
-              "url": "/aai/v15/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v15/actions"
-          },
-          {
-              "serviceName": "_aai-actions",
-              "version": "v16",
-              "url": "/aai/v16/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v16/actions"
-          },
-          {
-              "serviceName": "_aai-actions",
-              "version": "v17",
-              "url": "/aai/v17/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v17/actions"
-          },
-          {
-              "serviceName": "_aai-actions",
-              "version": "v18",
-              "url": "/aai/v18/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v18/actions"
-          },
-          {
-              "serviceName": "_aai-actions",
-              "version": "v19",
-              "url": "/aai/v19/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v19/actions"
-          },
-          {
-              "serviceName": "_aai-service-design-and-creation",
-              "version": "v11",
-              "url": "/aai/v11/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v11/service-design-and-creation"
-          },
-          {
-              "serviceName": "_aai-service-design-and-creation",
-              "version": "v12",
-              "url": "/aai/v12/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v12/service-design-and-creation"
-          },
-          {
-              "serviceName": "_aai-service-design-and-creation",
-              "version": "v13",
-              "url": "/aai/v13/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v13/service-design-and-creation"
-          },
-          {
-              "serviceName": "_aai-service-design-and-creation",
-              "version": "v14",
-              "url": "/aai/v14/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v14/service-design-and-creation"
-          },
-           {
-              "serviceName": "_aai-service-design-and-creation",
-              "version": "v15",
-              "url": "/aai/v15/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v15/service-design-and-creation"
-          },
-          {
-              "serviceName": "_aai-service-design-and-creation",
-              "version": "v16",
-              "url": "/aai/v16/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v16/service-design-and-creation"
-          },
-          {
-              "serviceName": "_aai-service-design-and-creation",
-              "version": "v17",
-              "url": "/aai/v17/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v17/service-design-and-creation"
-          },
-          {
-              "serviceName": "_aai-service-design-and-creation",
-              "version": "v18",
-              "url": "/aai/v18/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v18/service-design-and-creation"
-          },
-          {
-              "serviceName": "_aai-service-design-and-creation",
-              "version": "v19",
-              "url": "/aai/v19/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v19/service-design-and-creation"
-          },
-          {
-              "serviceName": "_aai-network",
-              "version": "v11",
-              "url": "/aai/v11/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v11/network"
-          },
-          {
-              "serviceName": "_aai-network",
-              "version": "v12",
-              "url": "/aai/v12/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v12/network"
-          },
-          {
-              "serviceName": "_aai-network",
-              "version": "v13",
-              "url": "/aai/v13/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v13/network"
-          },
-          {
-              "serviceName": "_aai-network",
-              "version": "v14",
-              "url": "/aai/v14/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v14/network"
-          },
-          {
-              "serviceName": "_aai-network",
-              "version": "v15",
-              "url": "/aai/v15/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v15/network"
-          },
-          {
-              "serviceName": "_aai-network",
-              "version": "v16",
-              "url": "/aai/v16/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v16/network"
-          },
-          {
-              "serviceName": "_aai-network",
-              "version": "v17",
-              "url": "/aai/v17/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v17/network"
-          },
-          {
-              "serviceName": "_aai-network",
-              "version": "v18",
-              "url": "/aai/v18/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v18/network"
-          },
-          {
-              "serviceName": "_aai-network",
-              "version": "v19",
-              "url": "/aai/v19/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v19/network"
-          },
-          {
-              "serviceName": "_aai-externalSystem",
-              "version": "v11",
-              "url": "/aai/v11/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v11/external-system"
-          },
-          {
-              "serviceName": "_aai-externalSystem",
-              "version": "v12",
-              "url": "/aai/v12/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v12/external-system"
-          },
-          {
-              "serviceName": "_aai-externalSystem",
-              "version": "v13",
-              "url": "/aai/v13/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v13/external-system"
-          },
-          {
-              "serviceName": "_aai-externalSystem",
-              "version": "v14",
-              "url": "/aai/v14/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v14/external-system"
-          },
-          {
-              "serviceName": "_aai-externalSystem",
-              "version": "v15",
-              "url": "/aai/v15/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v15/external-system"
-          },
-          {
-              "serviceName": "_aai-externalSystem",
-              "version": "v16",
-              "url": "/aai/v16/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v16/external-system"
-          },
-          {
-              "serviceName": "_aai-externalSystem",
-              "version": "v17",
-              "url": "/aai/v17/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v17/external-system"
-          },
-          {
-              "serviceName": "_aai-externalSystem",
-              "version": "v18",
-              "url": "/aai/v18/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v18/external-system"
-          },
-          {
-              "serviceName": "_aai-externalSystem",
-              "version": "v19",
-              "url": "/aai/v19/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1",
-              "path": "/aai/v19/external-system"
-          },
-          {
-              "serviceName": "aai-cloudInfrastructure",
-              "version": "v11",
-              "url": "/aai/v11/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-cloudInfrastructure",
-              "version": "v12",
-              "url": "/aai/v12/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-cloudInfrastructure",
-              "version": "v13",
-              "url": "/aai/v13/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-cloudInfrastructure",
-              "version": "v14",
-              "url": "/aai/v14/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-cloudInfrastructure",
-              "version": "v15",
-              "url": "/aai/v15/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-cloudInfrastructure",
-              "version": "v16",
-              "url": "/aai/v16/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-cloudInfrastructure",
-              "version": "v17",
-              "url": "/aai/v17/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-cloudInfrastructure",
-              "version": "v18",
-              "url": "/aai/v18/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-cloudInfrastructure",
-              "version": "v19",
-              "url": "/aai/v19/cloud-infrastructure",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-business",
-              "version": "v11",
-              "url": "/aai/v11/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-business",
-              "version": "v12",
-              "url": "/aai/v12/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-business",
-              "version": "v13",
-              "url": "/aai/v13/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-business",
-              "version": "v14",
-              "url": "/aai/v14/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-business",
-              "version": "v15",
-              "url": "/aai/v15/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-business",
-              "version": "v16",
-              "url": "/aai/v16/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-business",
-              "version": "v17",
-              "url": "/aai/v17/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-business",
-              "version": "v18",
-              "url": "/aai/v18/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-business",
-              "version": "v19",
-              "url": "/aai/v19/business",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-actions",
-              "version": "v11",
-              "url": "/aai/v11/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-actions",
-              "version": "v12",
-              "url": "/aai/v12/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-actions",
-              "version": "v13",
-              "url": "/aai/v13/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-actions",
-              "version": "v14",
-              "url": "/aai/v14/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-actions",
-              "version": "v15",
-              "url": "/aai/v15/actions",
+              "serviceName": "{{ $api_endpoint.name }}",
+              "version": "v{{ $api_version }}",
+              "url": "/aai/v{{ $api_version }}/{{ $api_endpoint.url }}",
               "protocol": "REST",
               "port": "8447",
               "enable_ssl": true,
               "lb_policy":"ip_hash",
               "visualRange": "1"
           },
-          {
-              "serviceName": "aai-actions",
-              "version": "v16",
-              "url": "/aai/v16/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-actions",
-              "version": "v17",
-              "url": "/aai/v17/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-actions",
-              "version": "v18",
-              "url": "/aai/v18/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-actions",
-              "version": "v19",
-              "url": "/aai/v19/actions",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-service-design-and-creation",
-              "version": "v11",
-              "url": "/aai/v11/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-service-design-and-creation",
-              "version": "v12",
-              "url": "/aai/v12/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-service-design-and-creation",
-              "version": "v13",
-              "url": "/aai/v13/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-service-design-and-creation",
-              "version": "v14",
-              "url": "/aai/v14/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-service-design-and-creation",
-              "version": "v15",
-              "url": "/aai/v15/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-service-design-and-creation",
-              "version": "v16",
-              "url": "/aai/v16/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-service-design-and-creation",
-              "version": "v17",
-              "url": "/aai/v17/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-service-design-and-creation",
-              "version": "v18",
-              "url": "/aai/v18/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-service-design-and-creation",
-              "version": "v19",
-              "url": "/aai/v19/service-design-and-creation",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-network",
-              "version": "v11",
-              "url": "/aai/v11/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-network",
-              "version": "v12",
-              "url": "/aai/v12/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-network",
-              "version": "v13",
-              "url": "/aai/v13/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-network",
-              "version": "v14",
-              "url": "/aai/v14/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-network",
-              "version": "v15",
-              "url": "/aai/v15/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-network",
-              "version": "v16",
-              "url": "/aai/v16/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-network",
-              "version": "v17",
-              "url": "/aai/v17/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-network",
-              "version": "v18",
-              "url": "/aai/v18/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-network",
-              "version": "v19",
-              "url": "/aai/v19/network",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-externalSystem",
-              "version": "v11",
-              "url": "/aai/v11/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-externalSystem",
-              "version": "v12",
-              "url": "/aai/v12/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-externalSystem",
-              "version": "v13",
-              "url": "/aai/v13/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-externalSystem",
-              "version": "v14",
-              "url": "/aai/v14/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-externalSystem",
-              "version": "v15",
-              "url": "/aai/v15/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-externalSystem",
-              "version": "v16",
-              "url": "/aai/v16/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-externalSystem",
-              "version": "v17",
-              "url": "/aai/v17/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-externalSystem",
-              "version": "v18",
-              "url": "/aai/v18/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          },
-          {
-              "serviceName": "aai-externalSystem",
-              "version": "v19",
-              "url": "/aai/v19/external-system",
-              "protocol": "REST",
-              "port": "8447",
-              "enable_ssl": true,
-              "lb_policy":"ip_hash",
-              "visualRange": "1"
-          }
+          {{- end }}
+        {{- end }}
           ]'
+      {{- end }}
     spec:
       hostname: aai-resources
-    {{ if .Values.global.initContainers.enabled }}
-      {{ if .Values.global.installSidecarSecurity }}
-      hostAliases:
-      - ip: {{ .Values.global.aaf.serverIp }}
-        hostnames:
-        - {{ .Values.global.aaf.serverHostname }}
-      {{ end }}
-      initContainers:
-      - command:
-      {{ if .Values.global.jobs.migration.enabled }}
+      terminationGracePeriodSeconds: {{ .Values.service.terminationGracePeriodSeconds }}
+      initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
+      - name: {{ include "common.name" . }}-readiness
+        command:
         - /app/ready.py
         args:
+        {{- if .Values.global.jobs.migration.enabled }}
         - --job-name
         - {{ include "common.release" . }}-aai-graphadmin-migration
-      {{  else if .Values.global.jobs.createSchema.enabled  }}
-        - /app/ready.py
-        args:
+        {{- else }}
+          {{- if .Values.global.jobs.createSchema.enabled  }}
         - --job-name
         - {{ include "common.release" . }}-aai-graphadmin-create-db-schema
-      {{  else }}
-        - /app/ready.py
-        args:
+          {{- else }}
         - --container-name
-        {{- if .Values.global.cassandra.localCluster }}
+            {{- if .Values.global.cassandra.localCluster }}
         - aai-cassandra
-        {{- else }}
+            {{- else }}
         - cassandra
-        {{- end }}
+            {{- end }}
         - --container-name
         - aai-schema-service
-      {{  end  }}
+          {{- end }}
+        {{- end }}
         env:
         - name: NAMESPACE
           valueFrom:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        name: {{ include "common.name" . }}-readiness
-      {{ if .Values.global.installSidecarSecurity }}
-      - name: {{ .Values.global.tproxyConfig.name }}
-        image: "{{ include "common.repository" . }}/{{ .Values.global.tproxyConfig.image }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        securityContext:
-          privileged: true
-      {{ end }}
-    {{ end }}
       containers:
       - name: {{ include "common.name" . }}
-        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+        image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        command:
+        - sh
+        args:
+        - -c
+        - |
+          echo "*** retrieve Truststore and Keystore password"
+          export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
+          echo "*** actual launch of AAI Resources"
+          /bin/bash /opt/app/aai-resources/docker-entrypoint.sh
         env:
         - name: LOCAL_USER_ID
           value: {{ .Values.global.config.userId | quote }}
         - name: LOCAL_GROUP_ID
           value: {{ .Values.global.config.groupId | quote }}
-        volumeMounts:
+        - name: POST_JAVA_OPTS
+          value: '-Djavax.net.ssl.trustStore={{ .Values.certInitializer.credsPath }}/truststoreONAPall.jks -Djavax.net.ssl.trustStorePassword={{ .Values.certInitializer.truststorePassword }}'
+        - name: TRUSTORE_ALL_PASSWORD
+          value: {{ .Values.certInitializer.truststorePassword }}
+        - name: INTERNAL_PORT_1
+          value: {{ .Values.service.internalPort | quote }}
+        - name: INTERNAL_PORT_2
+          value: {{ .Values.service.internalPort2 | quote }}
+        - name: INTERNAL_PORT_3
+          value: {{ .Values.service.internalPort3 | quote }}
+        volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
         - mountPath: /etc/localtime
           name: localtime
           readOnly: true
@@ -1246,7 +152,7 @@ spec:
           name: {{ include "common.fullname" . }}-config
           subPath: aaiconfig.properties
         - mountPath: /opt/aai/logroot/AAI-RES
-          name: {{ include "common.fullname" . }}-logs
+          name: logs
         - mountPath: /opt/app/aai-resources/resources/logback.xml
           name: {{ include "common.fullname" . }}-config
           subPath: logback.xml
@@ -1256,14 +162,6 @@ spec:
         - mountPath: /opt/app/aai-resources/resources/etc/auth/realm.properties
           name: {{ include "common.fullname" . }}-config
           subPath: realm.properties
-        {{ if .Values.global.installSidecarSecurity }}
-        - mountPath: /opt/app/aai-resources/resources/etc/auth/aai_policy.json
-          name: {{ include "common.fullname" . }}-aai-policy
-          subPath: aai_policy.json
-        {{ end }}
-        - mountPath: /opt/app/aai-resources/resources/aaf/org.onap.aai.keyfile
-          name: {{ include "common.fullname" . }}-aaf-certs
-          subPath: org.onap.aai.keyfile
         - mountPath: /opt/app/aai-resources/resources/aaf/bath_config.csv
           name: {{ include "common.fullname" . }}-aaf-certs
           subPath: bath_config.csv
@@ -1279,206 +177,86 @@ spec:
         - mountPath: /opt/app/aai-resources/resources/cadi.properties
           name: {{ include "common.fullname" . }}-aaf-properties
           subPath: cadi.properties
-        - mountPath: /opt/app/aai-resources/resources/aaf/org.onap.aai.p12
-          name: {{ include "common.fullname" . }}-aaf-certs
-          subPath: org.onap.aai.p12
-        - mountPath: /opt/app/aai-resources/resources/aaf/truststoreONAPall.jks
-          name: aai-common-aai-auth-mount
-          subPath: truststoreONAPall.jks
         - mountPath: /opt/app/aai-resources/resources/application.properties
           name: {{ include "common.fullname" . }}-config
           subPath: application.properties
         - mountPath: /opt/app/aai-resources/resources/application-keycloak.properties
           name: {{ include "common.fullname" . }}-config
           subPath: application-keycloak.properties
-          {{ $global := . }}
-          {{ range $job := .Values.global.config.auth.files }}
-        - mountPath: /opt/app/aai-resources/resources/etc/auth/{{ . }}
-          name: {{ include "common.fullname" $global }}-auth-truststore-sec
-          subPath: {{ . }}
-          {{ end }}
         ports:
         - containerPort: {{ .Values.service.internalPort }}
         - containerPort: {{ .Values.service.internalPort2 }}
+        - containerPort: {{ .Values.service.internalPort3 }}
+        lifecycle:
+          # wait for active requests (long-running tasks) to be finished
+          # Before the SIGTERM is invoked, Kubernetes exposes a preStop hook in the Pod.
+          preStop:
+            exec:
+              command:
+                - sh
+                - -c
+                - |
+                  while (netstat -an | grep ESTABLISHED | grep -e $INTERNAL_PORT_1 -e $INTERNAL_PORT_2)
+                  do sleep 10
+                  done
         # disable liveness probe when breakpoints set in debugger
         # so K8s doesn't restart unresponsive container
-        {{ if .Values.liveness.enabled }}
+        {{- if .Values.liveness.enabled }}
         livenessProbe:
-          tcpSocket:
+          httpGet:
+            path: /aai/util/echo?action=checkDB
             port: {{ .Values.service.internalPort }}
+            scheme: HTTP{{ (eq "true" (include "common.needTLS" .)) | ternary "S" "" }}
+            httpHeaders:
+            - name: X-FromAppId
+              value: LivenessCheck
+            - name: X-TransactionId
+              value: LiveCheck_TID
+            - name: Accept
+              value: application/json
           initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
           periodSeconds: {{ .Values.liveness.periodSeconds }}
-        {{ end }}
+        {{- end }}
         readinessProbe:
-          tcpSocket:
+          httpGet:
+            path: /aai/util/echo?action=checkDB
             port: {{ .Values.service.internalPort }}
+            scheme: HTTP{{ (eq "true" (include "common.needTLS" .)) | ternary "S" "" }}
+            httpHeaders:
+            - name: X-FromAppId
+              value: ReadinessCheck
+            - name: X-TransactionId
+              value: ReadinessCheck_TID
+            - name: Accept
+              value: application/json
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
-        resources:
-{{ include "common.resources" . }}
+        resources: {{ include "common.resources" . | nindent 12 }}
       {{- if .Values.nodeSelector }}
-      nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
-      {{- end -}}
+      nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
+      {{- end }}
       {{- if .Values.affinity }}
-      affinity:
-{{ toYaml .Values.affinity | indent 8 }}
+      affinity: {{ toYaml .Values.affinity | nindent 8 }}
       {{- end }}
-
       # side car containers
-      - name: filebeat-onap
-        image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        volumeMounts:
-        - mountPath: /usr/share/filebeat/filebeat.yml
-          subPath: filebeat.yml
-          name: filebeat-conf
-        - mountPath: /var/log/onap
-          name: {{ include "common.fullname" . }}-logs
-        - mountPath: /usr/share/filebeat/data
-          name: {{ include "common.fullname" . }}-filebeat
-        resources:
-{{ include "common.resources" . }}
-    {{ if .Values.global.installSidecarSecurity }}
-      - name: {{ .Values.global.rproxy.name }}
-        image: "{{ include "common.repository" . }}/{{ .Values.global.rproxy.image }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        env:
-        - name: CONFIG_HOME
-          value: "/opt/app/rproxy/config"
-        - name: KEY_STORE_PASSWORD
-          value: {{ .Values.sidecar.keyStorePassword }}
-        - name: spring_profiles_active
-          value: {{ .Values.global.rproxy.activeSpringProfiles }}
-        volumeMounts:
-        - name: {{ include "common.fullname" . }}-rproxy-config
-          mountPath: /opt/app/rproxy/config/forward-proxy.properties
-          subPath: forward-proxy.properties
-        - name: {{ include "common.fullname" . }}-rproxy-config
-          mountPath: /opt/app/rproxy/config/primary-service.properties
-          subPath: primary-service.properties
-        - name: {{ include "common.fullname" . }}-rproxy-config
-          mountPath: /opt/app/rproxy/config/reverse-proxy.properties
-          subPath: reverse-proxy.properties
-        - name: {{ include "common.fullname" . }}-rproxy-config
-          mountPath: /opt/app/rproxy/config/cadi.properties
-          subPath: cadi.properties
-        - name: {{ include "common.fullname" . }}-rproxy-log-config
-          mountPath: /opt/app/rproxy/config/logback-spring.xml
-          subPath: logback-spring.xml
-        - name: {{ include "common.fullname" . }}-rproxy-uri-auth-config
-          mountPath: /opt/app/rproxy/config/auth/uri-authorization.json
-          subPath: uri-authorization.json
-        - name: {{ include "common.fullname" . }}-rproxy-auth-config
-          mountPath: /opt/app/rproxy/config/auth/tomcat_keystore
-          subPath: tomcat_keystore
-        - name: {{ include "common.fullname" . }}-rproxy-auth-config
-          mountPath: /opt/app/rproxy/config/auth/client-cert.p12
-          subPath: client-cert.p12
-        - name: {{ include "common.fullname" . }}-rproxy-auth-config
-          mountPath: /opt/app/rproxy/config/auth/aaf_truststore.jks
-          subPath: aaf_truststore.jks
-        - name: {{ include "common.fullname" . }}-rproxy-security-config
-          mountPath: /opt/app/rproxy/config/security/keyfile
-          subPath: keyfile
-        - name: {{ include "common.fullname" . }}-rproxy-auth-config
-          mountPath: /opt/app/rproxy/config/auth/org.onap.aai.p12
-          subPath: org.onap.aai.p12
-        ports:
-        - containerPort: {{ .Values.global.rproxy.port }}
-
-      - name: {{ .Values.global.fproxy.name }}
-        image: "{{ include "common.repository" . }}/{{ .Values.global.fproxy.image }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        env:
-        - name: CONFIG_HOME
-          value: "/opt/app/fproxy/config"
-        - name: KEY_STORE_PASSWORD
-          value: {{ .Values.sidecar.keyStorePassword }}
-        - name: TRUST_STORE_PASSWORD
-          value: {{ .Values.sidecar.trustStorePassword }}
-        - name: spring_profiles_active
-          value: {{ .Values.global.fproxy.activeSpringProfiles }}
-        volumeMounts:
-        - name: {{ include "common.fullname" . }}-fproxy-config
-          mountPath: /opt/app/fproxy/config/fproxy.properties
-          subPath: fproxy.properties
-        - name: {{ include "common.fullname" . }}-fproxy-log-config
-          mountPath: /opt/app/fproxy/config/logback-spring.xml
-          subPath: logback-spring.xml
-        - name: {{ include "common.fullname" . }}-fproxy-auth-config
-          mountPath: /opt/app/fproxy/config/auth/fproxy_truststore
-          subPath: fproxy_truststore
-        - name: {{ include "common.fullname" . }}-fproxy-auth-config
-          mountPath: /opt/app/fproxy/config/auth/tomcat_keystore
-          subPath: tomcat_keystore
-        - name: {{ include "common.fullname" . }}-fproxy-auth-config
-          mountPath: /opt/app/fproxy/config/auth/client-cert.p12
-          subPath: client-cert.p12
-        ports:
-        - containerPort: {{ .Values.global.fproxy.port }}
-    {{ end }}
-
-      volumes:
-      - name: aai-common-aai-auth-mount
-        secret:
-          secretName: aai-common-aai-auth
+      {{ include "common.log.sidecar" . | nindent 6 }}
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
+      volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
       - name: localtime
         hostPath:
           path: /etc/localtime
-      - name: filebeat-conf
-        configMap:
-          name: aai-filebeat
-      - name: {{ include "common.fullname" . }}-logs
-        emptyDir: {}
-      - name: {{ include "common.fullname" . }}-filebeat
+      - name: logs
         emptyDir: {}
+      {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
       - name: {{ include "common.fullname" . }}-config
         configMap:
-         name: {{ include "common.fullname" . }}-configmap
+          name: {{ include "common.fullname" . }}
       - name: {{ include "common.fullname" . }}-aaf-properties
         configMap:
-         name: {{ include "common.fullname" . }}-aaf-props
+          name: {{ include "common.fullname" . }}-aaf-props
       - name: {{ include "common.fullname" . }}-aaf-certs
         secret:
-         secretName: {{ include "common.fullname" . }}-aaf-keys
-      - name: {{ include "common.fullname" . }}-auth-truststore-sec
-        secret:
-         secretName: aai-common-truststore
-         items:
-          {{ range $job := .Values.global.config.auth.files }}
-           - key: {{ . }}
-             path: {{ . }}
-          {{ end }}
-    {{ if .Values.global.installSidecarSecurity }}
-      - name: {{ include "common.fullname" . }}-aai-policy
-        configMap:
-         name: {{ include "common.fullname" . }}-aai-policy-configmap
-      - name: {{ include "common.fullname" . }}-rproxy-config
-        configMap:
-         name: {{ include "common.fullname" . }}-rproxy-config
-      - name: {{ include "common.fullname" . }}-rproxy-log-config
-        configMap:
-         name: {{ include "common.fullname" . }}-rproxy-log-config
-      - name: {{ include "common.fullname" . }}-rproxy-uri-auth-config
-        configMap:
-         name: {{ include "common.fullname" . }}-rproxy-uri-auth-config
-      - name: {{ include "common.fullname" . }}-rproxy-auth-config
-        secret:
-         secretName: {{ include "common.fullname" . }}-rproxy-auth-config
-      - name: {{ include "common.fullname" . }}-rproxy-security-config
-        secret:
-         secretName: {{ include "common.fullname" . }}-rproxy-security-config
-      - name: {{ include "common.fullname" . }}-fproxy-config
-        configMap:
-         name: {{ include "common.fullname" . }}-fproxy-config
-      - name: {{ include "common.fullname" . }}-fproxy-log-config
-        configMap:
-         name: {{ include "common.fullname" . }}-fproxy-log-config
-      - name: {{ include "common.fullname" . }}-fproxy-auth-config
-        secret:
-         secretName: {{ include "common.fullname" . }}-fproxy-auth-config
-    {{ end }}
+          secretName: {{ include "common.fullname" . }}-aaf-keys
       restartPolicy: {{ .Values.restartPolicy }}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"