import helm charts from sdran-helm-charts

- Fixed licensing issues

Change-Id: Ib4f726a6359e340884d329a801eb0b498d7bbb38
diff --git a/aether-roc-api/templates/NOTES.txt b/aether-roc-api/templates/NOTES.txt
new file mode 100644
index 0000000..4e34ee7
--- /dev/null
+++ b/aether-roc-api/templates/NOTES.txt
@@ -0,0 +1,20 @@
+# SPDX-FileCopyrightText: 2021 Open Networking Foundation
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+Thank you for installing {{ .Chart.Name }} Helm chart.
+
+Your release is named {{ .Release.Name }} in namespace {{.Release.Namespace}}.
+See https://docs.onosproject.org/developers/deploy_with_helm/
+
+To learn more about the release, try:
+  $ helm -n {{.Release.Namespace}} status {{ .Release.Name }}
+  $ helm -n {{.Release.Namespace}} get all {{ .Release.Name }}
+
+{{ .Release.Name }} depends on the "onos-config (with the Aether 2.1.0 and 3.0.0 model plugins and onos-topo" micro services.
+
+If you are using KinD as a Kubernetes server you will have to add a "port-forward" to access the aether-roc-api e.g.
+$ kubectl -n {{.Release.Namespace}} port-forward $(kubectl -n {{.Release.Namespace}} get pods -l type=api -o name) 8181
+and then access the API with:
+
+curl http://localhost:8181/aether/v3.0.0/connectivity-service-v3/enterprise
diff --git a/aether-roc-api/templates/_helpers.tpl b/aether-roc-api/templates/_helpers.tpl
new file mode 100644
index 0000000..a7db7ce
--- /dev/null
+++ b/aether-roc-api/templates/_helpers.tpl
@@ -0,0 +1,55 @@
+{{/* 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 "aether-roc-api.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 "aether-roc-api.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 "aether-roc-api.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "aether-roc-api.labels" -}}
+helm.sh/chart: {{ include "aether-roc-api.chart" . }}
+{{ include "aether-roc-api.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Selector labels
+*/}}
+{{- define "aether-roc-api.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "aether-roc-api.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
diff --git a/aether-roc-api/templates/configmap.yaml b/aether-roc-api/templates/configmap.yaml
new file mode 100644
index 0000000..20047ea
--- /dev/null
+++ b/aether-roc-api/templates/configmap.yaml
@@ -0,0 +1,16 @@
+# 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 "aether-roc-api.fullname" . }}-config
+  labels:
+    app: {{ template "aether-roc-api.fullname" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+data:
+  logging.yaml: |-
+{{ toYaml .Values.logging | indent 4 }}
diff --git a/aether-roc-api/templates/deployment.yaml b/aether-roc-api/templates/deployment.yaml
new file mode 100644
index 0000000..38bd935
--- /dev/null
+++ b/aether-roc-api/templates/deployment.yaml
@@ -0,0 +1,133 @@
+# 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: {{ include "aether-roc-api.fullname" . }}
+  namespace: {{ .Release.Namespace }}
+  labels:
+    {{- include "aether-roc-api.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      name: {{ template "aether-roc-api.fullname" . }}
+      app: aether
+      type: api
+      resource: {{ template "aether-roc-api.fullname" . }}
+      {{- include "aether-roc-api.selectorLabels" . | nindent 6 }}
+  template:
+    metadata:
+      labels:
+        name: {{ template "aether-roc-api.fullname" . }}
+        app: aether
+        type: api
+        resource: {{ template "aether-roc-api.fullname" . }}
+        {{- include "aether-roc-api.selectorLabels" . | nindent 8 }}
+    spec:
+      serviceAccountName: aether-roc-api
+      securityContext:
+        {{- toYaml .Values.podSecurityContext | nindent 8 }}
+      {{- with .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      containers:
+        - name: {{ .Chart.Name }}
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          env:
+            - name: NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+          args:
+            {{- range $key, $corsorigin := .Values.corsOrigins }}
+            - {{ printf "-allowCorsOrigin=%s" $corsorigin }}{{end}}
+          ports:
+            - name: http
+              containerPort: 8181
+          startupProbe:
+            tcpSocket:
+              port: 8181
+            periodSeconds: 5
+            failureThreshold: 60
+          readinessProbe:
+            tcpSocket:
+              port: 8181
+            initialDelaySeconds: 10
+            periodSeconds: 10
+          livenessProbe:
+            tcpSocket:
+              port: 8181
+            initialDelaySeconds: 10
+            periodSeconds: 10
+          volumeMounts:
+            - name: secret
+              mountPath: /etc/aether-roc-api/certs
+              readOnly: true
+            - name: config
+              mountPath: /etc/onos/config
+              readOnly: true
+          resources:
+            {{- toYaml .Values.resources | nindent 12 }}
+          # Enable ptrace for debugging
+          securityContext:
+            {{- if .Values.debug }}
+            capabilities:
+              add:
+                - SYS_PTRACE
+            {{- end }}
+        - name: {{ .Chart.Name }}-websocket
+          image: "{{ .Values.image.websocketsidecar.repository }}:{{ .Values.image.tag }}"
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          env:
+            - name: NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+          args:
+            {{- range $key, $corsorigin := .Values.corsOrigins }}
+            - {{ printf "-allowCorsOrigin=%s" $corsorigin }}{{end}}
+          ports:
+            - name: http
+              containerPort: {{ .Values.websocketsidecar.port }}
+          startupProbe:
+            tcpSocket:
+              port: {{ .Values.websocketsidecar.port }}
+            periodSeconds: 5
+            failureThreshold: 60
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.websocketsidecar.port }}
+            initialDelaySeconds: 10
+            periodSeconds: 10
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.websocketsidecar.port }}
+            initialDelaySeconds: 10
+            periodSeconds: 10
+          resources:
+            {{- toYaml .Values.resources | nindent 12 }}
+          securityContext: {}
+      volumes:
+        - name: secret
+          secret:
+            secretName: {{ template "aether-roc-api.fullname" . }}-secret
+        - name: config
+          configMap:
+            name: {{ template "aether-roc-api.fullname" . }}-config
+      {{- with .Values.nodeSelector }}
+    nodeSelector:
+      {{- toYaml . | nindent 8 }}
+    {{- end }}
+    {{- with .Values.affinity }}
+    affinity:
+      {{- toYaml . | nindent 8 }}
+    {{- end }}
+    {{- with .Values.tolerations }}
+    tolerations:
+      {{- toYaml . | nindent 8 }}
+    {{- end }}
diff --git a/aether-roc-api/templates/secret.yaml b/aether-roc-api/templates/secret.yaml
new file mode 100644
index 0000000..04e9c5d
--- /dev/null
+++ b/aether-roc-api/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 "aether-roc-api.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/aether-roc-api/templates/service.yaml b/aether-roc-api/templates/service.yaml
new file mode 100644
index 0000000..ac60319
--- /dev/null
+++ b/aether-roc-api/templates/service.yaml
@@ -0,0 +1,48 @@
+# 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: {{ include "aether-roc-api.fullname" . }}
+  labels:
+    app: {{ template "aether-roc-api.fullname" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+    {{- include "aether-roc-api.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+  selector:
+    name: {{ template "aether-roc-api.fullname" . }}
+    app: aether
+    type: api
+    resource: {{ template "aether-roc-api.fullname" . }}
+    {{- include "aether-roc-api.selectorLabels" . | nindent 4 }}
+  ports:
+    - name: rest
+      port: 8181
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "aether-roc-api.fullname" . }}-websocket
+  labels:
+    app: {{ template "aether-roc-api.fullname" . }}-websocket
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+    {{- include "aether-roc-api.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+  selector:
+    name: {{ template "aether-roc-api.fullname" . }}
+    app: aether
+    type: api
+    resource: {{ template "aether-roc-api.fullname" . }}
+    {{- include "aether-roc-api.selectorLabels" . | nindent 4 }}
+  ports:
+    - name: webhook
+      port: 80
+      targetPort: {{ .Values.websocketsidecar.port }}
diff --git a/aether-roc-api/templates/serviceaccount.yaml b/aether-roc-api/templates/serviceaccount.yaml
new file mode 100644
index 0000000..6d0ba2a
--- /dev/null
+++ b/aether-roc-api/templates/serviceaccount.yaml
@@ -0,0 +1,10 @@
+# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
+#
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: aether-roc-api
+  namespace: {{ .Release.Namespace }}