From: Fuss, Areli (af732p) Date: Sun, 19 Jul 2020 15:40:38 +0000 (+0300) Subject: E2T: Prometheus integration X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=cc74286335586d0d1930abf814e5b16f391ec68a;p=ric-plt%2Fric-dep.git E2T: Prometheus integration Add e2term prometheus services discovery Issue-ID: RIC-576 Signed-off-by: Fuss, Areli (af732p) Change-Id: I09498c5bd319af5db887ae1bdac95045204b2403 --- diff --git a/helm/e2term/templates/deployment.yaml b/helm/e2term/templates/deployment.yaml index b2aae0f..1a09e62 100644 --- a/helm/e2term/templates/deployment.yaml +++ b/helm/e2term/templates/deployment.yaml @@ -133,7 +133,9 @@ spec: containerPort: {{ include "common.serviceport.e2term.rmr.data" $topCtx }} - name: "sctp-{{ $key }}" containerPort: 36422 - protocol: SCTP + protocol: SCTP + - name: "prmts-{{ $key }}" + containerPort: {{ include "common.serviceport.e2term.prometheus" $topCtx }} stdin: true tty: true securityContext: diff --git a/helm/e2term/templates/service-prometheus.yaml b/helm/e2term/templates/service-prometheus.yaml new file mode 100644 index 0000000..1810e81 --- /dev/null +++ b/helm/e2term/templates/service-prometheus.yaml @@ -0,0 +1,47 @@ +################################################################################ +# 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. # +################################################################################ +{{- $topCtx := . }} +{{- range keys .Values.e2term }} +{{- $key := . }} +{{- with index $topCtx.Values.e2term . }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename.e2term.prometheus" $topCtx }}-{{ $key }} + namespace: {{ include "common.namespace.platform" $topCtx }} + labels: + app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }} + chart: {{ $topCtx.Chart.Name }}-{{ $topCtx.Chart.Version | replace "+" "_" }} + release: {{ $topCtx.Release.Name }} + heritage: {{ $topCtx.Release.Service }} + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: "/metrics" + prometheus.io/port: {{ include "common.serviceport.e2term.prometheus" $topCtx | quote }} +spec: + type: ClusterIP + ports: + - port: {{ include "common.serviceport.e2term.prometheus" $topCtx }} + protocol: "TCP" + targetPort: "prmts-{{ $key }}" + name: "prmts-{{ $key }}" + selector: + app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }} + release: {{ $topCtx.Release.Name }} +{{- end }} +{{- end }}