[E2Adapter] Adding charts for E2Adapter 27/4427/1
authoryakiratz <yaki.ratz@intl.att.com>
Wed, 22 Jul 2020 15:06:50 +0000 (18:06 +0300)
committeryakiratz <yaki.ratz@intl.att.com>
Wed, 22 Jul 2020 15:07:05 +0000 (18:07 +0300)
Change-Id: I057235c5c9347117b8851959a822d3389e5659eb
Signed-off-by: yakiratz <yaki.ratz@intl.att.com>
tools/e2adapter/Chart.yaml [new file with mode: 0644]
tools/e2adapter/charts/ric-common-3.3.2.tgz [new file with mode: 0644]
tools/e2adapter/requirements.yaml [new file with mode: 0644]
tools/e2adapter/templates/_helpers.tpl [new file with mode: 0644]
tools/e2adapter/templates/configmap.yaml [new file with mode: 0644]
tools/e2adapter/templates/deployment.yaml [new file with mode: 0644]
tools/e2adapter/values.yaml [new file with mode: 0644]

diff --git a/tools/e2adapter/Chart.yaml b/tools/e2adapter/Chart.yaml
new file mode 100644 (file)
index 0000000..d2c9e8d
--- /dev/null
@@ -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 (file)
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 (file)
index 0000000..ba6a220
--- /dev/null
@@ -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 (file)
index 0000000..5ff39a7
--- /dev/null
@@ -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 (file)
index 0000000..f07a75b
--- /dev/null
@@ -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 (file)
index 0000000..6a0efc4
--- /dev/null
@@ -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 (file)
index 0000000..1a869f3
--- /dev/null
@@ -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: {}