summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rwxr-xr-xkubernetes/onap/requirements.yaml5
-rw-r--r--kubernetes/onap/resources/environments/public-cloud.yaml8
-rw-r--r--kubernetes/onap/resources/overrides/onap-all.yaml4
-rwxr-xr-xkubernetes/onap/values.yaml3
13 files changed, 347 insertions, 1 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: {}
diff --git a/kubernetes/onap/requirements.yaml b/kubernetes/onap/requirements.yaml
index 9385adea9a..f2d1aaf3ec 100755
--- a/kubernetes/onap/requirements.yaml
+++ b/kubernetes/onap/requirements.yaml
@@ -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
diff --git a/kubernetes/onap/resources/environments/public-cloud.yaml b/kubernetes/onap/resources/environments/public-cloud.yaml
index 08329d8b43..4a910987a9 100644
--- a/kubernetes/onap/resources/environments/public-cloud.yaml
+++ b/kubernetes/onap/resources/environments/public-cloud.yaml
@@ -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.
@@ -174,3 +175,10 @@ mariadb-galera:
readiness:
initialDelaySeconds: 120
+a1policymanagement:
+ liveness:
+ initialDelaySeconds: 60
+ periodSeconds: 10
+ readiness:
+ initialDelaySeconds: 60
+ periodSeconds: 10
diff --git a/kubernetes/onap/resources/overrides/onap-all.yaml b/kubernetes/onap/resources/overrides/onap-all.yaml
index 86f898d18c..bfa0cdf8b8 100644
--- a/kubernetes/onap/resources/overrides/onap-all.yaml
+++ b/kubernetes/onap/resources/overrides/onap-all.yaml
@@ -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
diff --git a/kubernetes/onap/values.yaml b/kubernetes/onap/values.yaml
index 9928e93445..2b18288ea3 100755
--- a/kubernetes/onap/values.yaml
+++ b/kubernetes/onap/values.yaml
@@ -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.
@@ -307,3 +308,5 @@ vnfsdk:
enabled: false
modeling:
enabled: false
+a1policymanagement:
+ enabled: false