summaryrefslogtreecommitdiffstats
path: root/kubernetes/a1policymanagement
diff options
context:
space:
mode:
authorLathish <lathishbabu.ganesan@est.tech>2020-08-26 13:45:03 +0100
committerLathish <lathishbabu.ganesan@est.tech>2020-09-16 19:57:12 +0100
commit818ee5da4b1a207475dfee9956a1d9cf777e5347 (patch)
tree2e27124547d22db81359f9d2866e8fea15bb8307 /kubernetes/a1policymanagement
parent9d4d5afbb9bb4d850b171f3ca7819d898bf6adbb (diff)
Add A1 Policy Management Service helm charts
Issue-ID: CCSDK-2492 Change-Id: Ide809298d075471b457cfb93fee77658c7cb597c Signed-off-by: Lathish <lathishbabu.ganesan@est.tech>
Diffstat (limited to 'kubernetes/a1policymanagement')
-rw-r--r--kubernetes/a1policymanagement/.helmignore22
-rw-r--r--kubernetes/a1policymanagement/Chart.yaml21
-rw-r--r--kubernetes/a1policymanagement/requirements.yaml20
-rw-r--r--kubernetes/a1policymanagement/resources/config/application_configuration.json39
-rw-r--r--kubernetes/a1policymanagement/templates/configmap.yaml24
-rw-r--r--kubernetes/a1policymanagement/templates/deployment.yaml75
-rw-r--r--kubernetes/a1policymanagement/templates/secrets.yaml19
-rw-r--r--kubernetes/a1policymanagement/templates/service.yaml19
-rw-r--r--kubernetes/a1policymanagement/values.yaml89
9 files changed, 328 insertions, 0 deletions
diff --git a/kubernetes/a1policymanagement/.helmignore b/kubernetes/a1policymanagement/.helmignore
new file mode 100644
index 0000000000..50af031725
--- /dev/null
+++ b/kubernetes/a1policymanagement/.helmignore
@@ -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
index 0000000000..ba51af4c6c
--- /dev/null
+++ b/kubernetes/a1policymanagement/Chart.yaml
@@ -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
index 0000000000..f517fbbcc1
--- /dev/null
+++ b/kubernetes/a1policymanagement/requirements.yaml
@@ -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
index 0000000000..64c42e6cd1
--- /dev/null
+++ b/kubernetes/a1policymanagement/resources/config/application_configuration.json
@@ -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
index 0000000000..e84beac2ab
--- /dev/null
+++ b/kubernetes/a1policymanagement/templates/configmap.yaml
@@ -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
index 0000000000..6987bd41c5
--- /dev/null
+++ b/kubernetes/a1policymanagement/templates/deployment.yaml
@@ -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
index 0000000000..55e465c373
--- /dev/null
+++ b/kubernetes/a1policymanagement/templates/secrets.yaml
@@ -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
index 0000000000..f13c16105b
--- /dev/null
+++ b/kubernetes/a1policymanagement/templates/service.yaml
@@ -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
index 0000000000..827a51de93
--- /dev/null
+++ b/kubernetes/a1policymanagement/values.yaml
@@ -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: {}