fi
-RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term"
+RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator"
echo "Deploying RIC Platform components [$RICPLT_COMPONENTS]"
echo "Platform Namespace: $NAMESPACE"
fi
-RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term"
+RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator"
echo "Undeploying RIC Platform components [$RICPLT_COMPONENTS]"
echo "Platform Namespace: $NAMESPACE"
--- /dev/null
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
--- /dev/null
+apiVersion: v1
+description: A1 Helm chart for Kubernetes
+name: a1mediator
+version: 1.0.0
--- /dev/null
+{
+ "controls":[
+ {
+ "name":"admission_control_policy",
+ "description":"various parameters to control admission of dual connection",
+ "message_receives_rmr_type":"DC_ADMISSION_INTERVAL_CONTROL",
+ "message_receives_payload_schema":{
+ "$schema":"http://json-schema.org/draft-07/schema#",
+ "type":"object",
+ "properties":{
+ "enforce":{
+ "type":"boolean",
+ "default":true
+ },
+ "window_length":{
+ "type":"integer",
+ "default":1,
+ "minimum":1,
+ "maximum":60,
+ "description":"Sliding window length (in minutes)"
+ },
+ "blocking_rate":{
+ "type":"number",
+ "default":10,
+ "minimum":1,
+ "maximum":100,
+ "description":"% Connections to block"
+ },
+ "trigger_threshold":{
+ "type":"integer",
+ "default":10,
+ "minimum":1,
+ "description":"Minimum number of events in window to trigger blocking"
+ }
+ },
+ "required":[
+ "enforce",
+ "blocking_rate",
+ "trigger_threshold",
+ "window_length"
+ ],
+ "additionalProperties":false
+ },
+ "message_sends_rmr_type":"DC_ADMISSION_INTERVAL_CONTROL_ACK",
+ "message_sends_payload_schema":{
+ "$schema":"http://json-schema.org/draft-07/schema#",
+ "type":"object",
+ "properties":{
+ "status":{
+ "type":"string",
+ "enum":[
+ "SUCCESS",
+ "FAIL"
+ ]
+ },
+ "message":{
+ "type":"string"
+ }
+ },
+ "required":[
+ "status"
+ ],
+ "additionalProperties":false
+ }
+ }
+ ]
+}
--- /dev/null
+DC_ADMISSION_INTERVAL_CONTROL:20000
+DC_ADMISSION_INTERVAL_CONTROL_ACK:20001
--- /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 -}}
--- /dev/null
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: a1conf
+data:
+ local.rt: |
+ newrt|start
+ rte|20000|ADM_CONTROL_GOES_HERE:4563
+ rte|20001|{{ .Values.rmrservice.name }}:{{ .Values.rmrservice.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 }}
--- /dev/null
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "a1mediator.fullname" . }}
+ labels:
+{{ include "a1mediator.labels" . | indent 4 }}
+spec:
+ replicas: {{ .Values.replicaCount }}
+ selector:
+ matchLabels:
+ app.kubernetes.io/name: {{ include "a1mediator.name" . }}
+ app.kubernetes.io/instance: {{ .Release.Name }}
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/name: {{ include "a1mediator.name" . }}
+ app.kubernetes.io/instance: {{ .Release.Name }}
+ spec:
+ imagePullSecrets:
+ - name: {{ include "common.repositoryCred" . }}
+ containers:
+ - name: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+ volumeMounts:
+ - name: a1conf
+ mountPath: /opt/ricmanifest.json
+ subPath: ricmanifest.json
+ - name: a1conf
+ mountPath: /opt/rmr_string_int_mapping.txt
+ subPath: rmr_string_int_mapping.txt
+ - name: a1conf
+ mountPath: /opt/route/local.rt
+ subPath: local.rt
+ env:
+ - name: PYTHONUNBUFFERED
+ value: "0"
+ - name: RMR_RCV_RETRY_INTERVAL
+ value: "{{ .Values.rmr_timeout_config.rcv_retry_interval_ms }}"
+ - name: RMR_RETRY_TIMES
+ value: "{{ .Values.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 }}
+ protocol: TCP
+
+ livenessProbe:
+ httpGet:
+ path: /ui
+ port: http
+ readinessProbe:
+ httpGet:
+ path: /ui
+ port: http
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ volumes:
+ - name: "a1conf"
+ configMap:
+ name: "a1conf"
--- /dev/null
+# This is the service for A1's external facing HTTP API
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "a1mediator.fullname" . }}
+ labels:
+{{ include "a1mediator.labels" . | indent 4 }}
+
+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
--- /dev/null
+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
+
+# 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
+
--- /dev/null
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+ name: ric-ingress-appmgr
+spec:
+ rules:
+ - host: foo.bar.com
+ http:
+ paths:
+ - path: /appmgr
+ backend:
+ serviceName: r0-appmgr
+ servicePort: 8080
\ No newline at end of file
--- /dev/null
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+ name: ric-ingress
+spec:
+ rules:
+ - host: foo.bar.com
+ http:
+ paths:
+ - path: /appmgr
+ backend:
+ serviceName: r0-appmgr
+ servicePort: 8080
\ No newline at end of file
--- /dev/null
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+ name: ric-ingress-e2mgr
+spec:
+ rules:
+ - host: foo.bar.com
+ http:
+ paths:
+ - path: /e2mgr
+ backend:
+ serviceName: r0-e2mgr
+ servicePort: 3800
\ No newline at end of file
--- /dev/null
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+ name: ric-ingress
+spec:
+ rules:
+ - host: foo.bar.com
+ http:
+ paths:
+ - path: /e2mgr
+ backend:
+ serviceName: r0-e2mgr
+ servicePort: 3800
\ No newline at end of file
--- /dev/null
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+ name: ric-ingress
+spec:
+ rules:
+ - host: foo.bar.com
+ http:
+ paths:
+ - path: /e2mgr
+ backend:
+ serviceName: r0-e2mgr
+ servicePort: 3800
+ - path: /appmgr
+ backend:
+ serviceName: r0-appmgr
+ servicePort: 8080
\ No newline at end of file
--- /dev/null
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+ name: ric-ingress
+spec:
+ rules:
+ - host: foo.bar.com
+ http:
+ paths:
+ - path: /e2mgr
+ backend:
+ serviceName: r0-e2mgr
+ servicePort: 3800
+ - path: /appmgr
+ backend:
+ serviceName: r0-appmgr
+ servicePort: 8080
\ No newline at end of file