ves collector chart adapter to use common chart definitions
Change-Id: Ia75938c0d9b3c8abb9e781f03c91695552e832ec
Signed-off-by: rshacham <rshacham@research.att.com>
diff --git a/RECIPE_EXAMPLE/RIC_AUX_RECIPE_EXAMPLE b/RECIPE_EXAMPLE/RIC_AUX_RECIPE_EXAMPLE
index 68c8e74..73e27f0 100644
--- a/RECIPE_EXAMPLE/RIC_AUX_RECIPE_EXAMPLE
+++ b/RECIPE_EXAMPLE/RIC_AUX_RECIPE_EXAMPLE
@@ -63,7 +63,7 @@
# Override the name using the following option
# nameOverride:
image:
- name:: ric-dash-be
+ name: ric-dash-be
tag: 1.0.5
properties:
e2mgr:
diff --git a/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE b/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE
index d883d05..3f48dc0 100644
--- a/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE
+++ b/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE
@@ -65,7 +65,7 @@
# repositoryOverride:
image:
name: ric-plt-a1
- tag: 0.8.3
+ tag: 0.9.0
rmr_timeout_config:
rcv_retry_interval_ms: 500
rcv_retry_times: 20
@@ -75,8 +75,8 @@
# Use the following option to override the docker registry value
# repositoryOverride:
image:
- name: appmgr
- tag: 1.0.4
+ name: ric-plt-appmgr
+ tag: 0.1.5
@@ -95,8 +95,8 @@
# Use the following option to override the docker registry value
# repositoryOverride:
image:
- name: e2mgr
- tag: 1.6.0
+ name: ric-plt-e2mgr
+ tag: 1.0.0
env:
RIC_ID: "bbbccc-abcd0e/20"
privilegedmode: true
@@ -107,8 +107,8 @@
# Use the following option to override the docker registry value
# repositoryOverride:
image:
- name: e2
- tag: 1.6.0
+ name: ric-plt-e2
+ tag: 1.0.0
env:
print: "1"
privilegedmode: true
@@ -119,22 +119,22 @@
# Use the following option to override the docker registry value
# repositoryOverride:
image:
- name: rtmgr
- tag: 0.0.2
+ name: ric-plt-rtmgr
+ tag: 0.3.1
# Subscription Manager
submgr:
# Use the following option to override the docker registry value
# repositoryOverride:
image:
- name: submgr
- tag: v0.1.0
+ name: ric-plt-submgr
+ tag: 0.5.0
# the service for redirecting to AUX cluster
extsvcplt:
auxip:
# The ip address of the aux cluster ingress controller
- <IP_ADDRESS of the AUX cluster>
+ <IP_ADDRESS of the AUX cluster>
ricip:
# The ip address of the ric cluster ingress controller
- <IP_ADDRESS of the RIC cluster>
+ <IP_ADDRESS of the RIC cluster>
\ No newline at end of file
diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/_helpers.tpl b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/_helpers.tpl
deleted file mode 100644
index ff29c31..0000000
--- a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/_helpers.tpl
+++ /dev/null
@@ -1,50 +0,0 @@
-################################################################################
-# Copyright (c) 2019 AT&T Intellectual Property. #
-# Copyright (c) 2019 Nokia. #
-# #
-# 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. #
-################################################################################
-
-{{/* vim: set filetype=mustache: */}}
-{{/*
-Expand the name of the chart.
-*/}}
-{{- define "vescollector.name" -}}
-{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-
-{{/*
-Create a default fully qualified app name.
-We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
-If release name contains chart name it will be used as a full name.
-*/}}
-{{- define "vescollector.fullname" -}}
-{{- if .Values.fullnameOverride -}}
-{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- $name := default .Chart.Name .Values.nameOverride -}}
-{{- if contains $name .Release.Name -}}
-{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
-{{- else -}}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-{{- end -}}
-{{- end -}}
-
-{{/*
-Create chart name and version as used by the chart label.
-*/}}
-{{- define "vescollector.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-
diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/configmap.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/configmap.yaml
index e0680e6..e770ac8 100644
--- a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/configmap.yaml
+++ b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/configmap.yaml
@@ -19,7 +19,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: dmaap-configmap
+ name: {{ include "common.configmapname.ves" . }}
data:
DMaapConfig.json: |
{
@@ -30,7 +30,7 @@
"class": "HpCambriaOutputStream",
"stripHpId": "true",
"type": "out",
- "cambria.hosts": "message-router:3904"
+ "cambria.hosts": "ricaux-message-router:3904"
}
]
}
\ No newline at end of file
diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ingress-ves.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ingress-ves.yaml
index 6db96de..d46223e 100644
--- a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ingress-ves.yaml
+++ b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ingress-ves.yaml
@@ -1,12 +1,12 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
- name: ric-ingress-ves
+ name: {{ include "common.ingressname.ves" . }}
spec:
rules:
- http:
paths:
- path: /vescollector
backend:
- serviceName: xdcae-ves-collector
+ serviceName: {{ include "common.servicename.ves.http" . }}
servicePort: {{ include "common.serviceport.ves.http.container" . }}
diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml
index 6d79ac7..05040f8 100644
--- a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml
+++ b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml
@@ -20,59 +20,45 @@
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
- name: {{ include "vescollector.fullname" . }}
+ name: {{ include "common.deploymentname.ves" . }}
generation: 1
labels:
- app: dcae-ves-collector
- cfydeployment: ves
- cfynode: ves
- cfynodeinstance: ves_uj48fg
- k8sdeployment: dep-dcae-ves-collector
+ app: {{ include "common.namespace.aux" . }}-{{ include "common.name.ves" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
annotations:
deployment.kubernetes.io/revision: '1'
spec:
replicas: {{ .Values.ves.replicaCount }}
selector:
matchLabels:
- app: dcae-ves-collector
- cfydeployment: ves
- cfynode: ves
- cfynodeinstance: ves_uj48fg
- k8sdeployment: dep-dcae-ves-collector
+ app: {{ include "common.namespace.aux" . }}-{{ include "common.name.ves" . }}
+ release: {{ .Release.Name }}
template:
metadata:
labels:
- app: dcae-ves-collector
- cfydeployment: ves
- cfynode: ves
- cfynodeinstance: ves_uj48fg
- k8sdeployment: dep-dcae-ves-collector
+ app: {{ include "common.namespace.aux" . }}-{{ include "common.name.ves" . }}
+ release: {{ .Release.Name }}
spec:
+ hostname: {{ include "common.name.ves" . }}
volumes:
- name: component-log
emptyDir: {}
- name: dmaap-config-file
configMap:
- name: dmaap-configmap
+ name: {{ include "common.configmapname.ves" . }}
+ imagePullPolicy: {{ include "common.pullPolicy" . }}
+ imagePullSecrets:
+ - name: onap-docker-registry-key
containers:
- - name: {{ include "common.namespace" . }}-{{include "common.name" . }}
+ - name: {{ include "common.containername.ves" . }}
image: {{ .Values.ves.onapRepository }}/{{ .Values.ves.image.name }}:{{ .Values.ves.image.tag }}
ports:
- containerPort: {{ include "common.serviceport.ves.http.container" . }}
protocol: TCP
- containerPort: {{ include "common.serviceport.ves.https.container" . }}
protocol: TCP
- env:
- - name: CONSUL_HOST
- value: consul-server.onap
- - name: CONFIG_BINDING_SERVICE
- value: config-binding-service
- - name: POD_IP
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: status.podIP
- resources: {}
volumeMounts:
- name: component-log
mountPath: "/opt/app/VESCollector/logs/ecomp"
@@ -91,19 +77,4 @@
failureThreshold: 1
terminationMessagePath: "/dev/termination-log"
terminationMessagePolicy: File
- imagePullPolicy: IfNotPresent
- restartPolicy: Always
- terminationGracePeriodSeconds: 30
- dnsPolicy: ClusterFirst
- securityContext: {}
- imagePullSecrets:
- - name: onap-docker-registry-key
- hostname: dcae-ves-collector
- schedulerName: default-scheduler
- strategy:
- type: RollingUpdate
- rollingUpdate:
- maxUnavailable: 1
- maxSurge: 1
- revisionHistoryLimit: 10
- progressDeadlineSeconds: 600
+ restartPolicy: Always
\ No newline at end of file
diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml
index cc66510..c2e137c 100644
--- a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml
+++ b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml
@@ -19,29 +19,25 @@
kind: Service
apiVersion: v1
metadata:
- name: xdcae-ves-collector
+ name: {{ include "common.servicename.ves.http" . }}
labels:
- app: dcae-ves-collector
- cfydeployment: ves
- cfynode: ves
- cfynodeinstance: ves_uj48fg
- k8sdeployment: dep-dcae-ves-collector
+ app: {{ include "common.namespace.aux" . }}-{{ include "common.name.ves" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
spec:
ports:
- - name: xport-t-8080
+ - name: http
protocol: TCP
port: {{ include "common.serviceport.ves.http.container" . }}
targetPort: {{ include "common.serviceport.ves.http.container" . }}
nodePort: {{ include "common.serviceport.ves.http" . }}
- - name: xport-t-8443
+ - name: https
protocol: TCP
port: {{ include "common.serviceport.ves.https.container" . }}
targetPort: {{ include "common.serviceport.ves.https.container" . }}
nodePort: {{ include "common.serviceport.ves.https" . }}
selector:
- app: dcae-ves-collector
- type: NodePort
- sessionAffinity: None
- externalTrafficPolicy: Cluster
-status:
- loadBalancer: {}
+ app: {{ include "common.namespace.aux" . }}-{{ include "common.name.ves" . }}
+ release: {{ .Release.Name }}
+ type: NodePort
\ No newline at end of file
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl b/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl
index 8af2a97..4d82848 100644
--- a/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl
+++ b/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl
@@ -108,6 +108,11 @@
{{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
+{{- define "common.servicename.ves.http" -}}
+ {{- $name := ( include "common.fullname.ves" . ) -}}
+ {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
###################### TCP Service ##################################