Add Capifcore helm charts 81/10181/1
authoraravind.est <aravindhan.a@est.tech>
Fri, 16 Dec 2022 13:12:34 +0000 (13:12 +0000)
committeraravind.est <aravindhan.a@est.tech>
Fri, 16 Dec 2022 13:18:33 +0000 (13:18 +0000)
Issue-ID: NONRTRIC-819
Change-Id: I085e3d77914f51450264676c558db1dbb430b7d8
Signed-off-by: aravind.est <aravindhan.a@est.tech>
bin/deploy-nonrtric
bin/undeploy-nonrtric
nonrtric/RECIPE_EXAMPLE/example_recipe.yaml
nonrtric/helm/capifcore/Chart.yaml [new file with mode: 0644]
nonrtric/helm/capifcore/requirements.yaml [new file with mode: 0644]
nonrtric/helm/capifcore/templates/deployment.yaml [new file with mode: 0644]
nonrtric/helm/capifcore/templates/service.yaml [new file with mode: 0644]
nonrtric/helm/capifcore/values.yaml [new file with mode: 0644]
nonrtric/helm/nonrtric/Chart.yaml
nonrtric/helm/nonrtric/values.yaml
ric-common/Common-Template/helm/nonrtric-common/templates/capifcore.tpl [new file with mode: 0644]

index 291dfee..df12178 100755 (executable)
@@ -106,7 +106,7 @@ rm $HELM_LOCAL_REPO/*
 helm repo remove local
 $ROOT_DIR/prepare-common-templates
 
-COMPONENTS="controlpanel a1controller a1simulator policymanagementservice informationservice rappcatalogueservice nonrtricgateway dmaapadapterservice dmaapmediatorservice helmmanager orufhrecovery ransliceassurance"
+COMPONENTS="controlpanel a1controller a1simulator policymanagementservice informationservice rappcatalogueservice nonrtricgateway dmaapadapterservice dmaapmediatorservice helmmanager orufhrecovery ransliceassurance capifcore"
 for component in $COMPONENTS; do
     echo "Packaging NONRTRIC component [$component]"
     helm dep up $ROOT_DIR/../nonrtric/helm/$component
index be6dff7..7015b24 100755 (executable)
@@ -18,7 +18,7 @@
 # This script to undeploy the NONRTRIC
 
 
-COMPONENTS="controlpanel a1controller a1simulator policymanagementservice informationservice rappcatalogueservice nonrtricgateway dmaapadapterservice dmaapmediatorservice helmmanager orufhrecovery ransliceassurance"
+COMPONENTS="controlpanel a1controller a1simulator policymanagementservice informationservice rappcatalogueservice nonrtricgateway dmaapadapterservice dmaapmediatorservice helmmanager orufhrecovery ransliceassurance capifcore"
 RECIPE_NAMESPACE=$(kubectl get cm --all-namespaces | grep nonrtric-recipe | awk '{print $1}')
 kubectl get configmap  -n $RECIPE_NAMESPACE nonrtric-recipe  -o jsonpath='{.data.recipe}' > /tmp/recipe.yaml
 
index 6e3b84e..f3c5c8d 100644 (file)
@@ -340,3 +340,14 @@ orufhrecovery:
       oru_to_odu_map_file: "o-ru-to-o-du-map.csv"
       log_level: "Info"
 
+
+capifcore:
+  capifcore:
+    imagePullPolicy: IfNotPresent
+    image:
+      registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+      name: nonrtric-plt-capifcore
+      tag: 1.0.0
+    env:
+      chart_museum_url: "http://chartmuseum:8080"
+      repo_name: "capifcore"
\ No newline at end of file
diff --git a/nonrtric/helm/capifcore/Chart.yaml b/nonrtric/helm/capifcore/Chart.yaml
new file mode 100644 (file)
index 0000000..903a20c
--- /dev/null
@@ -0,0 +1,21 @@
+################################################################################
+#   Copyright (c) 2022 Nordix Foundation.                                      #
+#                                                                              #
+#   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
+appVersion: "2.0.0"
+description: A Helm chart for CAPIF core
+name: capifcore
+version: 1.0.0
diff --git a/nonrtric/helm/capifcore/requirements.yaml b/nonrtric/helm/capifcore/requirements.yaml
new file mode 100644 (file)
index 0000000..25a3e89
--- /dev/null
@@ -0,0 +1,20 @@
+################################################################################
+#   Copyright (c) 2022 Nordix Foundation.                                      #
+#                                                                              #
+#   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: nonrtric-common
+    version: ^2.0.0
+    repository: "@local"
diff --git a/nonrtric/helm/capifcore/templates/deployment.yaml b/nonrtric/helm/capifcore/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..ea499a3
--- /dev/null
@@ -0,0 +1,57 @@
+################################################################################
+#   Copyright (c) 2022 Nordix Foundation.                                      #
+#                                                                              #
+#   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.                                             #
+################################################################################
+
+kind: Deployment
+apiVersion: apps/v1
+metadata:
+  name: {{ include "common.name.capifcore" . }}
+  namespace: {{ include "common.namespace.nonrtric" . }}
+  generation: 1
+  labels:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.capifcore" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+    deployment.kubernetes.io/revision: '1'
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.capifcore" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.capifcore" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.capifcore" . }}
+      containers:
+      - name: {{ include "common.container.capifcore" . }}
+        image: {{ .Values.capifcore.image.registry }}/{{ .Values.capifcore.image.name }}:{{ .Values.capifcore.image.tag }}
+        imagePullPolicy: {{ .Values.capifcore.imagePullPolicy }}
+        args:
+            [
+              "-chartMuseumUrl",
+              "{{ .Values.capifcore.env.chart_museum_url }}",
+              "-repoName",
+              "{{ .Values.capifcore.env.repo_name }}"
+            ]
+        ports:
+        - containerPort: 8090
+          protocol: TCP
+
diff --git a/nonrtric/helm/capifcore/templates/service.yaml b/nonrtric/helm/capifcore/templates/service.yaml
new file mode 100644 (file)
index 0000000..568264c
--- /dev/null
@@ -0,0 +1,38 @@
+################################################################################
+#   Copyright (c) 2022 Nordix Foundation.                                      #
+#                                                                              #
+#   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.                                             #
+################################################################################
+
+kind: Service
+apiVersion: v1
+metadata:
+  name: {{ include "common.name.capifcore" . }}
+  namespace: {{ include "common.namespace.nonrtric" . }}
+  labels:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.capifcore" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  ports:
+    {{if eq .Values.capifcore.service.allowHttp true -}}
+    - name: {{ index .Values.capifcore.service.httpName }}
+      port: {{ .Values.capifcore.service.port }}
+      targetPort: {{ .Values.capifcore.service.targetPort }}
+      protocol: TCP
+    {{- end }}
+  selector:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.capifcore" . }}
+    release: {{ .Release.Name }}
+  type: ClusterIP
diff --git a/nonrtric/helm/capifcore/values.yaml b/nonrtric/helm/capifcore/values.yaml
new file mode 100644 (file)
index 0000000..70798f2
--- /dev/null
@@ -0,0 +1,34 @@
+################################################################################
+#   Copyright (c) 2022 Nordix Foundation.                                      #
+#                                                                              #
+#   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.                                             #
+################################################################################
+
+# Default values for CAPIF core.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+capifcore:
+  imagePullPolicy: IfNotPresent
+  image:
+    registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc'
+    name: nonrtric-plt-capifcore
+    tag: 1.0.0
+  service:
+    httpName: http
+    allowHttp: true
+    port: 8090
+    targetPort: 8090
+  env:
+    chart_museum_url: "http://chartmuseum:8080"
+    repo_name: "capifcore"
index bb2a24a..4758e5f 100644 (file)
@@ -84,3 +84,8 @@ dependencies:
     version: ~1.0.0
     repository: "@local"
     condition: nonrtric.installOrufhrecovery
+
+  - name: capifcore
+    version: ~1.0.0
+    repository: "@local"
+    condition: nonrtric.installCapifcore
index e936b13..c6e857c 100644 (file)
@@ -27,6 +27,7 @@ nonrtric:
   installHelmmanager: true
   installOrufhrecovery: true
   installRansliceassurance: true
+  installCapifcore: true
 
   volume1:
     size: 1Gi
diff --git a/ric-common/Common-Template/helm/nonrtric-common/templates/capifcore.tpl b/ric-common/Common-Template/helm/nonrtric-common/templates/capifcore.tpl
new file mode 100644 (file)
index 0000000..7fa8532
--- /dev/null
@@ -0,0 +1,24 @@
+################################################################################
+#   Copyright (c) 2022 Nordix Foundation.                                      #
+#                                                                              #
+#   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.                                             #
+################################################################################
+
+{{- define "common.name.capifcore" -}}
+  {{- printf "capifcore" -}}
+{{- end -}}
+
+{{- define "common.container.capifcore" -}}
+  {{- $name := ( include "common.name.capifcore" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}