From: yakiratz Date: Wed, 22 Jul 2020 15:06:50 +0000 (+0300) Subject: [E2Adapter] Adding charts for E2Adapter X-Git-Tag: R5_RC~28 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=33b5656d542bd8e8791c3efbaa4600c5c3fb1e38;hp=35766cc8a70ee08c8cded89dee889d9e11036da5;p=ric-plt%2Fe2mgr.git [E2Adapter] Adding charts for E2Adapter Change-Id: I057235c5c9347117b8851959a822d3389e5659eb Signed-off-by: yakiratz --- diff --git a/tools/e2adapter/Chart.yaml b/tools/e2adapter/Chart.yaml new file mode 100644 index 0000000..d2c9e8d --- /dev/null +++ b/tools/e2adapter/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: e2adapter +version: 0.1.0 diff --git a/tools/e2adapter/charts/ric-common-3.3.2.tgz b/tools/e2adapter/charts/ric-common-3.3.2.tgz new file mode 100644 index 0000000..8a5e1d8 Binary files /dev/null and b/tools/e2adapter/charts/ric-common-3.3.2.tgz differ diff --git a/tools/e2adapter/requirements.yaml b/tools/e2adapter/requirements.yaml new file mode 100644 index 0000000..ba6a220 --- /dev/null +++ b/tools/e2adapter/requirements.yaml @@ -0,0 +1,21 @@ +################################################################################ +# 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: ^3.1.0 + repository: "@local" diff --git a/tools/e2adapter/templates/_helpers.tpl b/tools/e2adapter/templates/_helpers.tpl new file mode 100644 index 0000000..5ff39a7 --- /dev/null +++ b/tools/e2adapter/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "e2adapter.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 "e2adapter.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 "e2adapter.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/tools/e2adapter/templates/configmap.yaml b/tools/e2adapter/templates/configmap.yaml new file mode 100644 index 0000000..f07a75b --- /dev/null +++ b/tools/e2adapter/templates/configmap.yaml @@ -0,0 +1,38 @@ +################################################################################ +# 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: {{ include "common.configmapname.e2adapter" . }}-configuration-configmap + namespace: {{ include "common.namespace.platform" . }} +data: + e2adapter.conf: | + {{- if hasKey .Values "dummyRanConnection" }} + dummyRanConnection = {{ .Values.dummyRanConnection }}; + {{- end }} + {{- if hasKey .Values "e2SctpPort" }} + dummyRanConnection = {{ .Values.e2SctpPort }}; + {{- end }} + {{- if hasKey .Values "e2NodeType" }} + dummyRanConnection = {{ .Values.e2NodeType }}; + {{- end }} + {{- if hasKey .Values "enbType" }} + dummyRanConnection = {{ .Values.enbType }}; + {{- end }} +--- diff --git a/tools/e2adapter/templates/deployment.yaml b/tools/e2adapter/templates/deployment.yaml new file mode 100644 index 0000000..6a0efc4 --- /dev/null +++ b/tools/e2adapter/templates/deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "e2adapter.fullname" . }} + labels: + app.kubernetes.io/name: {{ include "e2adapter.name" . }} + helm.sh/chart: {{ include "e2adapter.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app.kubernetes.io/name: {{ include "e2adapter.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + template: + metadata: + labels: + app.kubernetes.io/name: {{ include "e2adapter.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + - mountPath: /etc/e2adapter/e2adapter.conf + name: local-configuration-file + subPath: e2adapter.conf + volumes: + - name: local-configuration-file + configMap: + name: e2adapter-configuration-configmap diff --git a/tools/e2adapter/values.yaml b/tools/e2adapter/values.yaml new file mode 100644 index 0000000..1a869f3 --- /dev/null +++ b/tools/e2adapter/values.yaml @@ -0,0 +1,37 @@ +# Default values for e2adapter. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 +dummyRanConnection: true +e2SctpPort: 36422 +e2NodeType: 1 +enbType: 3 + +imagePullPolicy: IfNotPresent +image: + name: e2adapter + tag: 1.0.0 + registry: "snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001" + +nameOverride: "" +fullnameOverride: "" + + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {}