import helm charts from sdran-helm-charts

- Fixed licensing issues

Change-Id: Ib4f726a6359e340884d329a801eb0b498d7bbb38
diff --git a/subscriber-proxy/templates/_helpers.tpl b/subscriber-proxy/templates/_helpers.tpl
new file mode 100644
index 0000000..ba0078e
--- /dev/null
+++ b/subscriber-proxy/templates/_helpers.tpl
@@ -0,0 +1,56 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
+SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+Expand the name of the chart.
+*/}}
+{{- define "subscriber-proxy.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 "subscriber-proxy.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 "subscriber-proxy.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{/*
+Common labels
+*/}}
+{{- define "subscriber-proxy.labels" -}}
+helm.sh/chart: {{ include "subscriber-proxy.chart" . }}
+{{ include "subscriber-proxy.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "subscriber-proxy.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "subscriber-proxy.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
diff --git a/subscriber-proxy/templates/configmap.yaml b/subscriber-proxy/templates/configmap.yaml
new file mode 100644
index 0000000..e1d59c2
--- /dev/null
+++ b/subscriber-proxy/templates/configmap.yaml
@@ -0,0 +1,19 @@
+# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+
+---
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ template "subscriber-proxy.fullname" . }}-logconfig
+  labels:
+    app: {{ template "subscriber-proxy.fullname" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+data:
+  logging.yaml: |-
+{{ toYaml .Values.logging | indent 4 }}
diff --git a/subscriber-proxy/templates/deployment.yaml b/subscriber-proxy/templates/deployment.yaml
new file mode 100644
index 0000000..2cbccc7
--- /dev/null
+++ b/subscriber-proxy/templates/deployment.yaml
@@ -0,0 +1,81 @@
+# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ template "subscriber-proxy.fullname" . }}
+  namespace: {{ .Release.Namespace }}
+  labels:
+    name: {{ template "subscriber-proxy.fullname" . }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "subscriber-proxy.selectorLabels" . | nindent 6 }}
+  template:
+    metadata:
+      labels:
+        name: {{ template "subscriber-proxy.fullname" . }}
+        {{- include "subscriber-proxy.selectorLabels" . | nindent 8 }}
+    spec:
+    {{- with .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 6 }}
+    {{- end }}
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+      containers:
+        - name: {{ .Chart.Name }}
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          env:
+            - name: POD_NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+            - name: POD_NAME
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.name
+            - name: NODE_NAME
+              valueFrom:
+                fieldRef:
+                  fieldPath: spec.nodeName
+          args:
+            - "/usr/local/bin/subscriber-proxy"
+            - "-bind_port=:{{ .Values.ports.port }}"
+            - "-client_key=/etc/subscriber-proxy/certs/tls.key"
+            - "-client_crt=/etc/subscriber-proxy/certs/tls.crt"
+            - "-ca_crt=/etc/subscriber-proxy/certs/tls.cacert"
+            - "-alsologtostderr"
+            - "-hostCheckDisabled"
+            - "-webconsole_url=http://{{ .Values.ports.webui_endpt.addr}}:{{ .Values.ports.webui_endpt.port}}"
+            - "-onos_config_url={{ .Values.ports.aether_config_endpt.addr}}:{{ .Values.ports.aether_config_endpt.port}}"
+          ports:
+            - containerPort: {{.Values.ports.port}}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.ports.port }}
+            initialDelaySeconds: 5
+            periodSeconds: 10
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.ports.port }}
+            initialDelaySeconds: 15
+            periodSeconds: 20
+          volumeMounts:
+            - name: secret
+              mountPath: /etc/subscriber-proxy/certs
+              readOnly: true
+            - name: logconfig
+              mountPath: /etc/onos/config
+              readOnly: true
+      volumes:
+        - name: logconfig
+          configMap:
+            name: {{ template "subscriber-proxy.fullname" . }}-logconfig
+        - name: secret
+          secret:
+            secretName: {{ template "subscriber-proxy.fullname" . }}-secret
diff --git a/subscriber-proxy/templates/secret.yaml b/subscriber-proxy/templates/secret.yaml
new file mode 100644
index 0000000..445c6bf
--- /dev/null
+++ b/subscriber-proxy/templates/secret.yaml
@@ -0,0 +1,18 @@
+# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ template "subscriber-proxy.fullname" . }}-secret
+  labels:
+     chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+     release: "{{ .Release.Name }}"
+     heritage: "{{ .Release.Service }}"
+data:
+  {{ $root := . }}
+  {{ range $path, $bytes := .Files.Glob "files/certs/tls.*" }}
+  {{ base $path }}: '{{ $root.Files.Get $path | b64enc }}'
+  {{ end }}
+type: Opaque
diff --git a/subscriber-proxy/templates/service.yaml b/subscriber-proxy/templates/service.yaml
new file mode 100644
index 0000000..91e173c
--- /dev/null
+++ b/subscriber-proxy/templates/service.yaml
@@ -0,0 +1,24 @@
+# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ template "subscriber-proxy.fullname" . }}
+  labels:
+    app: {{ template "subscriber-proxy.fullname" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+    {{- include "subscriber-proxy.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+  selector:
+    name: {{ template "subscriber-proxy.fullname" . }}
+  ports:
+    - name: sub-proxy
+      port: {{.Values.ports.port}}
+      protocol: TCP
+