--- /dev/null
+################################################################################
+# 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. #
+################################################################################
+
+dependencies:
+ - name: ric-common
+ version: ~2.0.0
+++ /dev/null
-{{/* vim: set filetype=mustache: */}}
-{{/*
-Expand the name of the chart.
-*/}}
-{{- define "a1mediator.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 "a1mediator.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 "a1mediator.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-
-{{/*
-Common labels
-*/}}
-{{- define "a1mediator.labels" -}}
-app.kubernetes.io/name: {{ include "a1mediator.name" . }}
-helm.sh/chart: {{ include "a1mediator.chart" . }}
-app.kubernetes.io/instance: {{ .Release.Name }}
-{{- if .Chart.AppVersion }}
-app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
-{{- end }}
-app.kubernetes.io/managed-by: {{ .Release.Service }}
-{{- end -}}
+################################################################################
+# 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. #
+################################################################################
+
+---
apiVersion: v1
kind: ConfigMap
metadata:
- name: a1conf
+ name: {{ include "common.configmapname.a1mediator" . }}-a1conf
data:
local.rt: |
newrt|start
- rte|20000|ADM_CONTROL_GOES_HERE:4563
- rte|20001|{{ .Values.rmrservice.name }}:{{ .Values.rmrservice.port }}
+ rte|20000|service-ricxapp-admctrl-rmr:4563
+ rte|20001|{{ include "common.servicename.a1mediator.rmr" .}}:{{ .Values.a1mediator.service.rmr.port }}
newrt|end
rmr_string_int_mapping.txt: {{ tpl (.Files.Get "files/rmr_string_int_mapping.txt") . | quote }}
- ricmanifest.json: {{ tpl (.Files.Get "files/ricmanifest.json") . | quote }}
+ ricmanifest.json: {{ tpl (.Files.Get "files/ricmanifest.json") . | quote }}
\ No newline at end of file
+################################################################################
+# 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. #
+################################################################################
+
+---
apiVersion: apps/v1
kind: Deployment
metadata:
- name: {{ include "a1mediator.fullname" . }}
+ name: {{ include "common.deploymentname.a1mediator" . }}
+ namespace: {{ include "common.namespace" . }}
labels:
-{{ include "a1mediator.labels" . | indent 4 }}
+ app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
spec:
- replicas: {{ .Values.replicaCount }}
+ replicas: {{ .Values.a1mediator.replicaCount }}
selector:
matchLabels:
- app.kubernetes.io/name: {{ include "a1mediator.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
+ app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+ release: {{ .Release.Name }}
template:
metadata:
labels:
- app.kubernetes.io/name: {{ include "a1mediator.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
+ app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+ release: {{ .Release.Name }}
spec:
+ hostname: {{ .Chart.Name }}
imagePullSecrets:
- name: {{ include "common.repositoryCred" . }}
containers:
- name: PYTHONUNBUFFERED
value: "0"
- name: RMR_RCV_RETRY_INTERVAL
- value: "{{ .Values.rmr_timeout_config.rcv_retry_interval_ms }}"
+ value: "{{ .Values.a1mediator.rmr_timeout_config.rcv_retry_interval_ms }}"
- name: RMR_RETRY_TIMES
- value: "{{ .Values.rmr_timeout_config.rcv_retry_times }}"
+ value: "{{ .Values.a1mediator.rmr_timeout_config.rcv_retry_times }}"
image: {{ include "common.repository" . }}/{{ .Values.a1mediator.image.name }}:{{ .Values.a1mediator.image.tag }}
imagePullPolicy: {{ include "common.pullPolicy" . }}
ports:
- name: http
- containerPort: {{ .Values.httpservice.port }}
+ containerPort: {{ .Values.a1mediator.service.http.containerPort }}
+ protocol: TCP
+ - name: rmr
+ containerPort: {{ .Values.a1mediator.service.rmr.containerPort }}
protocol: TCP
-
livenessProbe:
httpGet:
path: /ui
httpGet:
path: /ui
port: http
- resources:
- {{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: "a1conf"
configMap:
- name: "a1conf"
+ name: {{ include "common.configmapname.a1mediator" . }}-a1conf
\ No newline at end of file
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
- name: ric-ingress-a1mediator
+ name: {{ include "common.ingressname.a1mediator" . }}
spec:
rules:
- http:
paths:
- path: /a1mediator
backend:
- serviceName: {{ include "common.servicename.a1mediator" . }}
- servicePort: {{ .Values.httpservice.port }}
+ serviceName: {{ include "common.servicename.a1mediator.http" . }}
+ servicePort: {{ .Values.a1mediator.service.http.port }}
\ No newline at end of file
--- /dev/null
+################################################################################
+# 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. #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "common.servicename.a1mediator.http" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ type: ClusterIP
+ ports:
+ - port: {{ .Values.a1mediator.service.http.port }}
+ protocol: "TCP"
+ name: "http"
+ targetPort: "http"
+ selector:
+ app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+ release: {{ .Release.Name }}
+
--- /dev/null
+################################################################################
+# 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. #
+################################################################################
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "common.servicename.a1mediator.rmr" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ type: ClusterIP
+ ports:
+ - port: {{ .Values.a1mediator.service.rmr.port }}
+ protocol: "TCP"
+ name: "rmr"
+ targetPort: "rmr"
+ selector:
+ app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+ release: {{ .Release.Name }}
+++ /dev/null
-# This is the service for A1's external facing HTTP API
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ include "common.servicename.a1mediator" . }}
- labels:
- app.kubernetes.io/name: {{ include "common.fullname.a1mediator" . }}
- helm.sh/chart: {{ include "common.chart" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
- {{- if .Chart.AppVersion }}
- app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
- {{- end }}
- app.kubernetes.io/managed-by: {{ .Release.Service }}
-
-spec:
- type: {{ .Values.httpservice.type }}
- ports:
- - port: {{ .Values.httpservice.port }}
- targetPort: http
- protocol: TCP
- name: http
- selector:
- app.kubernetes.io/name: {{ include "a1mediator.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
-
----
-# This is the service for rmr between A1 and the xapps
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ .Values.rmrservice.name }}
- labels:
-{{ include "a1mediator.labels" . | indent 4 }}
-
-spec:
- type: {{ .Values.rmrservice.type }}
- ports:
- - port: {{ .Values.rmrservice.port }}
- targetPort: {{ .Values.rmrservice.port }}
- protocol: TCP
- selector:
- app.kubernetes.io/name: {{ include "a1mediator.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
-
----
-# This is the service for the "hidden" port 4561 that rmr listens on for route manager
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ .Values.rmrrtemgrservice.name }}
- labels:
-{{ include "a1mediator.labels" . | indent 4 }}
-
-spec:
- type: {{ .Values.rmrrtemgrservice.type }}
- ports:
- - port: {{ .Values.rmrrtemgrservice.port }}
- targetPort: {{ .Values.rmrrtemgrservice.port }}
- protocol: TCP
- selector:
- app.kubernetes.io/name: {{ include "a1mediator.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
+++ /dev/null
-apiVersion: v1
-kind: Pod
-metadata:
- name: "{{ include "a1mediator.fullname" . }}-test-connection"
- labels:
-{{ include "a1mediator.labels" . | indent 4 }}
- annotations:
- "helm.sh/hook": test-success
-spec:
- containers:
- - name: wget
- image: busybox
- command: ['wget']
- args: ['{{ include "a1mediator.fullname" . }}:{{ .Values.httpservice.port }}']
- restartPolicy: Never
+################################################################################
+# 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. #
+################################################################################
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+
+repository: "nexus3.o-ran-sc.org:10004"
+imagePullPolicy: IfNotPresent
+repositoryCred: docker-reg-cred
+
a1mediator:
replicaCount: 1
image:
- repository: nexus3.o-ran-sc.org:10004
name: ric-plt-a1
tag: 0.8.2
- pullPolicy: IfNotPresent
-
-
-# This is the service for A1's external facing HTTP API
-httpservice:
- port: 10000 # This is hardcoded in a1, probably dangerous to change
- type: ClusterIP
-# This is the service for rmr between A1 and the xapps
-rmrservice:
- name: rmrservice
- port: 4562 # This is hardcoded in a1, probably dangerous to change
- type: ClusterIP
+ service:
+ http:
+ port: 10000
+ containerPort: 10000
+ rmr:
+ port: 4562
+ containerPort: 4562
-# This is the service for the "hidden" port 4561 that rmr listens on for route manager
-rmrrtemgrservice:
- name: rmrrtemgrservice
- port: 4561 # This is hardcoded in rmr, probably dangerous to change
- type: ClusterIP
# these are ENV variables that A1 takes; see docs
-rmr_timeout_config:
- rcv_retry_interval_ms: 500
- rcv_retry_times: 20
+ rmr_timeout_config:
+ rcv_retry_interval_ms: 500
+ rcv_retry_times: 20