Add A1 Policy Management Service helm charts 34/111834/11
authorLathish <lathishbabu.ganesan@est.tech>
Wed, 26 Aug 2020 12:45:03 +0000 (13:45 +0100)
committerLathish <lathishbabu.ganesan@est.tech>
Wed, 16 Sep 2020 18:57:12 +0000 (19:57 +0100)
Issue-ID: CCSDK-2492
Change-Id: Ide809298d075471b457cfb93fee77658c7cb597c
Signed-off-by: Lathish <lathishbabu.ganesan@est.tech>
13 files changed:
kubernetes/a1policymanagement/.helmignore [new file with mode: 0644]
kubernetes/a1policymanagement/Chart.yaml [new file with mode: 0644]
kubernetes/a1policymanagement/requirements.yaml [new file with mode: 0644]
kubernetes/a1policymanagement/resources/config/application_configuration.json [new file with mode: 0644]
kubernetes/a1policymanagement/templates/configmap.yaml [new file with mode: 0644]
kubernetes/a1policymanagement/templates/deployment.yaml [new file with mode: 0644]
kubernetes/a1policymanagement/templates/secrets.yaml [new file with mode: 0644]
kubernetes/a1policymanagement/templates/service.yaml [new file with mode: 0644]
kubernetes/a1policymanagement/values.yaml [new file with mode: 0644]
kubernetes/onap/requirements.yaml
kubernetes/onap/resources/environments/public-cloud.yaml
kubernetes/onap/resources/overrides/onap-all.yaml
kubernetes/onap/values.yaml

diff --git a/kubernetes/a1policymanagement/.helmignore b/kubernetes/a1policymanagement/.helmignore
new file mode 100644 (file)
index 0000000..50af031
--- /dev/null
@@ -0,0 +1,22 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/kubernetes/a1policymanagement/Chart.yaml b/kubernetes/a1policymanagement/Chart.yaml
new file mode 100644 (file)
index 0000000..ba51af4
--- /dev/null
@@ -0,0 +1,21 @@
+################################################################################
+#   Copyright (c) 2020 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: "1.0.0"
+description: A Helm chart for A1 Policy Management Service
+name: a1policymanagement
+version: 6.0.0
diff --git a/kubernetes/a1policymanagement/requirements.yaml b/kubernetes/a1policymanagement/requirements.yaml
new file mode 100644 (file)
index 0000000..f517fbb
--- /dev/null
@@ -0,0 +1,20 @@
+################################################################################
+#   Copyright (c) 2020 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: common
+    version: ~6.x-0
+    repository: '@local'
diff --git a/kubernetes/a1policymanagement/resources/config/application_configuration.json b/kubernetes/a1policymanagement/resources/config/application_configuration.json
new file mode 100644 (file)
index 0000000..64c42e6
--- /dev/null
@@ -0,0 +1,39 @@
+{
+  "config": {
+    "controller": [
+      {
+        "name": "controller1",
+        "baseUrl": "{{ .Values.sdncLink }}",
+        "userName": "${A1CONTROLLER_USER}",
+        "password": "${A1CONTROLLER_PASSWORD}"
+      }
+    ],
+    "ric": [
+      {
+        "name": "ric1",
+        "baseUrl": "{{ .Values.ricLink }}",
+        "controller": "controller1",
+        "managedElementIds": [
+          "kista_1",
+          "kista_2"
+        ]
+      }
+    ],
+    "streams_publishes": {
+      "dmaap_publisher": {
+        "type": "message_router",
+        "dmaap_info": {
+          "topic_url": "{{ .Values.streamPublish }}"
+        }
+      }
+    },
+    "streams_subscribes": {
+      "dmaap_subscriber": {
+        "type": "message_router",
+        "dmaap_info": {
+          "topic_url": "{{ .Values.streamSubscribe }}"
+        }
+      }
+    }
+  }
+}
diff --git a/kubernetes/a1policymanagement/templates/configmap.yaml b/kubernetes/a1policymanagement/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..e84beac
--- /dev/null
@@ -0,0 +1,24 @@
+{{/*
+################################################################################
+#   Copyright (c) 2020 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
+kind: ConfigMap
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
+  name: {{ include "common.fullname" . }}-policy-conf
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/a1policymanagement/templates/deployment.yaml b/kubernetes/a1policymanagement/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..6987bd4
--- /dev/null
@@ -0,0 +1,75 @@
+{{/*
+################################################################################
+#   Copyright (c) 2020 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: {{- include "common.resourceMetadata" . | nindent 2 }}
+spec:
+  replicas: {{ index .Values.replicaCount }}
+  selector: {{- include "common.selectors" . | nindent 4 }}
+  template:
+    metadata:
+      labels: {{- include "common.labels" . | nindent 8 }}
+    spec:
+      initContainers:
+      - name: {{ include "common.name" . }}-update-config
+        image: "{{ .Values.global.envsubstImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        command:
+        - sh
+        args:
+        - -c
+        - "cd /config-input && for PFILE in `ls -1`; do envsubst <${PFILE} >/config/${PFILE}; done"
+        env:
+        - name: A1CONTROLLER_USER
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "controller-secret" "key" "login") | indent 10 }}
+        - name: A1CONTROLLER_PASSWORD
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "controller-secret" "key" "password") | indent 10 }}
+        volumeMounts:
+        - mountPath: /config-input
+          name: {{ include "common.fullname" . }}-policy-conf-input
+        - mountPath: /config
+          name: config
+      containers:
+      - name: {{ include "common.name" . }}
+        image: {{ include "common.repository" . }}/{{ .Values.image }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        ports: {{ include "common.containerPorts" . | nindent 10  }}
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.readiness.port }}
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        livenessProbe:
+          httpGet:
+            path: /status
+            port: {{ .Values.liveness.port }}
+            scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        volumeMounts:
+        - name: config
+          mountPath: /opt/app/policy-agent/data
+        resources: {{ include "common.resources" . | nindent 10 }}
+      volumes:
+        - name: {{ include "common.fullname" . }}-policy-conf-input
+          configMap:
+            name: {{ include "common.fullname" . }}-policy-conf
+        - name: config
+          emptyDir:
+            medium: Memory
diff --git a/kubernetes/a1policymanagement/templates/secrets.yaml b/kubernetes/a1policymanagement/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..55e465c
--- /dev/null
@@ -0,0 +1,19 @@
+{{/*
+################################################################################
+#   Copyright (c) 2020 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.                                             #
+################################################################################
+*/}}
+
+{{ include "common.secretFast" . }}
diff --git a/kubernetes/a1policymanagement/templates/service.yaml b/kubernetes/a1policymanagement/templates/service.yaml
new file mode 100644 (file)
index 0000000..f13c161
--- /dev/null
@@ -0,0 +1,19 @@
+{{/*
+################################################################################
+#   Copyright (c) 2020 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.                                             #
+################################################################################
+*/}}
+
+{{ include "common.service" . }}
diff --git a/kubernetes/a1policymanagement/values.yaml b/kubernetes/a1policymanagement/values.yaml
new file mode 100644 (file)
index 0000000..827a51d
--- /dev/null
@@ -0,0 +1,89 @@
+################################################################################
+#   Copyright (c) 2020 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 Policy Management Service.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+global:
+  nodePortPrefix: 300
+  envsubstImage: dibi/envsubst
+
+secrets:
+  - uid: controller-secret
+    type: basicAuth
+    externalSecret: '{{ tpl (default "" .Values.a1controller.credsExternalSecret) . }}'
+    login: '{{ .Values.a1controller.user }}'
+    password: '{{ .Values.a1controller.password }}'
+    passwordPolicy: required
+
+repository: nexus3.onap.org:10001
+image: onap/ccsdk-oran-a1policymanagementservice:1.0.0
+pullPolicy: IfNotPresent
+replicaCount: 1
+
+service:
+  type: NodePort
+  name: a1policymanagement
+  both_tls_and_plain: true
+  ports:
+    - name: api
+      port: 8433
+      plain_port: 8081
+      port_protocol: http
+      nodePort: '94'
+
+# SDNC Credentials are used here
+a1controller:
+  user: admin
+  password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+
+sdncLink: https://sdnc.onap:8443
+# Add your own A1 Mediator link. Supports both STD & OSC Version. ex. http://<ip>:<port>
+# Alternatively you can also use the A1 simulator available in ORAN. It provides STD  & OSC Version for A1 termination.
+# Refer source code & run in docker container : https://gerrit.o-ran-sc.org/r/admin/repos/sim/a1-interface
+# Refer it/dep repo for k8's deployment: https://gerrit.o-ran-sc.org/r/admin/repos/it/dep
+ricLink:
+streamPublish: http://message-router:3904/events/A1-POLICY-AGENT-WRITE
+streamSubscribe: http://message-router:3904/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100
+
+liveness:
+  port: api
+  initialDelaySeconds: 60
+  periodSeconds: 10
+readiness:
+  port: api
+  initialDelaySeconds: 60
+  periodSeconds: 10
+
+#Resource Limit flavor -By Default using small
+flavor: small
+
+resources:
+  small:
+    limits:
+      cpu: 2
+      memory: 4Gi
+    requests:
+      cpu: 1
+      memory: 2Gi
+  large:
+    limits:
+      cpu: 4
+      memory: 8Gi
+    requests:
+      cpu: 2
+      memory: 4Gi
+  unlimited: {}
index 9385ade..f2d1aaf 100755 (executable)
@@ -1,4 +1,5 @@
 # Copyright © 2019 Amdocs, Bell Canada
+# Copyright (c) 2020 Nordix Foundation, Modifications
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -152,3 +153,7 @@ dependencies:
     version: ~6.x-0
     repository: '@local'
     condition: modeling.enabled
+  - name: a1policymanagement
+    version: ~6.x-0
+    repository: '@local'
+    condition: a1policymanagement.enabled
index 3062e4e..ce16f4f 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright © 2017 Amdocs, Bell Canada
+# Copyright (c) 2020 Nordix Foundation, Modifications
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -177,3 +178,10 @@ mariadb-galera:
     readiness:
       initialDelaySeconds: 120
 
+a1policymanagement:
+  liveness:
+    initialDelaySeconds: 60
+    periodSeconds: 10
+  readiness:
+    initialDelaySeconds: 60
+    periodSeconds: 10
index 86f898d..bfa0cdf 100644 (file)
@@ -1,5 +1,5 @@
 # Copyright © 2019 Amdocs, Bell Canada
-#
+# Copyright (c) 2020 Nordix Foundation, Modifications
 # 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
@@ -79,3 +79,5 @@ vnfsdk:
   enabled: true
 modeling:
   enabled: true
+a1policymanagement:
+  enabled: true
\ No newline at end of file
index dd80323..267a731 100755 (executable)
@@ -1,4 +1,5 @@
 # Copyright © 2019 Amdocs, Bell Canada
+# Copyright (c) 2020 Nordix Foundation, Modifications
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -303,3 +304,5 @@ vnfsdk:
   enabled: false
 modeling:
   enabled: false
+a1policymanagement:
+  enabled: false