summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xkubernetes/cds/charts/blueprints-processor/requirements.yaml3
-rwxr-xr-xkubernetes/cds/charts/blueprints-processor/resources/config/application.properties37
-rwxr-xr-xkubernetes/cds/charts/blueprints-processor/templates/deployment.yaml8
-rwxr-xr-xkubernetes/cds/charts/blueprints-processor/templates/secrets.yaml27
-rwxr-xr-xkubernetes/cds/charts/blueprints-processor/templates/service.yaml6
-rwxr-xr-xkubernetes/cds/charts/blueprints-processor/values.yaml26
-rw-r--r--kubernetes/cds/charts/controller-blueprints/requirements.yaml3
-rwxr-xr-xkubernetes/cds/charts/controller-blueprints/resources/config/application.properties13
-rwxr-xr-xkubernetes/cds/charts/controller-blueprints/templates/deployment.yaml2
-rw-r--r--kubernetes/cds/charts/controller-blueprints/templates/secrets.yaml29
-rwxr-xr-xkubernetes/cds/charts/controller-blueprints/values.yaml17
-rw-r--r--kubernetes/cds/requirements.yaml3
-rw-r--r--kubernetes/cds/values.yaml14
-rwxr-xr-xkubernetes/policy/charts/drools/resources/config/drools/settings.xml95
-rw-r--r--kubernetes/policy/charts/drools/resources/config/log/drools/logback.xml103
-rw-r--r--kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/apps-install.sh125
-rw-r--r--kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-preinstall.sh53
-rw-r--r--kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-tweaks.sh71
-rw-r--r--kubernetes/policy/charts/drools/templates/configmap.yaml19
-rw-r--r--kubernetes/policy/charts/drools/templates/statefulset.yaml46
-rw-r--r--kubernetes/policy/charts/drools/values.yaml4
-rw-r--r--kubernetes/policy/charts/policy-xacml-pdp/Chart.yaml22
-rw-r--r--kubernetes/policy/charts/policy-xacml-pdp/requirements.yaml22
-rw-r--r--kubernetes/policy/charts/policy-xacml-pdp/resources/config/config.json26
-rw-r--r--kubernetes/policy/charts/policy-xacml-pdp/templates/configmap.yaml25
-rw-r--r--kubernetes/policy/charts/policy-xacml-pdp/templates/deployment.yaml66
-rw-r--r--kubernetes/policy/charts/policy-xacml-pdp/templates/service.yaml37
-rw-r--r--kubernetes/policy/charts/policy-xacml-pdp/values.yaml67
28 files changed, 328 insertions, 641 deletions
diff --git a/kubernetes/cds/charts/blueprints-processor/requirements.yaml b/kubernetes/cds/charts/blueprints-processor/requirements.yaml
index 1d06a389a8..9f92507a99 100755
--- a/kubernetes/cds/charts/blueprints-processor/requirements.yaml
+++ b/kubernetes/cds/charts/blueprints-processor/requirements.yaml
@@ -13,9 +13,6 @@
# limitations under the License.
dependencies:
- - name: mariadb-galera
- version: ~4.x-0
- repository: file://../mariadb-galera/
- name: common
version: ~4.x-0
repository: '@local' \ No newline at end of file
diff --git a/kubernetes/cds/charts/blueprints-processor/resources/config/application.properties b/kubernetes/cds/charts/blueprints-processor/resources/config/application.properties
index 9d1c957b8f..c25176f971 100755
--- a/kubernetes/cds/charts/blueprints-processor/resources/config/application.properties
+++ b/kubernetes/cds/charts/blueprints-processor/resources/config/application.properties
@@ -11,18 +11,23 @@
# 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.
-#logging.level.web=DEBUG
-appName={{.Values.config.applicationName}}
-ms_name={{.Values.config.msName}}
-appVersion={{.Values.config.bundleVersion}}
-blueprintsprocessor.grpcEnable={{.Values.config.grpcEnabled}}
-blueprintsprocessor.httpPort={{.Values.service.http.internalPort}}
-blueprintsprocessor.grpcPort={{.Values.service.grpc.internalPort}}
-#Blueprint Processor File Execution and Handling Properties
+
+# Functionality config
+blueprintsprocessor.grpcEnable=true
+blueprintsprocessor.restconfEnabled=true
+blueprintsprocessor.httpPort=8080
+blueprintsprocessor.grpcPort=9111
+
+# Basic Authentication
+security.user.password: {bcrypt}$2a$10$duaUzVUVW0YPQCSIbGEkQOXwafZGwQ/b32/Ys4R1iwSSawFgz7QNu
+security.user.name: ccsdkapps
+
+# Blueprint Processor File Execution and Handling Properties
blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy
blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive
-#Primary Database Configuration
-blueprintsprocessor.db.primary.url=jdbc:mysql://blueprints-processor-db:3306/sdnctl
+
+# Primary Database Configuration
+blueprintsprocessor.db.primary.url=jdbc:mysql://cds-db:3306/sdnctl
blueprintsprocessor.db.primary.username=sdnctl
blueprintsprocessor.db.primary.password=sdnctl
blueprintsprocessor.db.primary.driverClassName=org.mariadb.jdbc.Driver
@@ -30,5 +35,13 @@ blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=update
blueprintsprocessor.db.primary.hibernateDDLAuto=update
blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy
blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialect
-# Web server config
-server.port=8080 \ No newline at end of file
+
+# Python executor
+blueprints.processor.functions.python.executor.executionPath=/opt/app/onap/scripts/jython/ccsdk_blueprints
+blueprints.processor.functions.python.executor.modulePaths=/opt/app/onap/scripts/jython/ccsdk_blueprints,/opt/app/onap/scripts/jython/ccsdk_netconf
+
+# SDN-C's ODL Restconf Connection Details
+blueprintsprocessor.restclient.sdncodl.type=basic-auth
+blueprintsprocessor.restclient.sdncodl.url=http://sdnc:8282/
+blueprintsprocessor.restclient.sdncodl.username=admin
+blueprintsprocessor.restclient.sdncodl.password=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U \ No newline at end of file
diff --git a/kubernetes/cds/charts/blueprints-processor/templates/deployment.yaml b/kubernetes/cds/charts/blueprints-processor/templates/deployment.yaml
index 5629913826..876f24937d 100755
--- a/kubernetes/cds/charts/blueprints-processor/templates/deployment.yaml
+++ b/kubernetes/cds/charts/blueprints-processor/templates/deployment.yaml
@@ -35,7 +35,7 @@ spec:
- /root/ready.py
args:
- --container-name
- - {{ index .Values "mariadb-galera" "nameOverride" }}
+ - cds-db
env:
- name: NAMESPACE
valueFrom:
@@ -64,6 +64,9 @@ spec:
httpGet:
path: /api/v1/execution-service/ping
port: {{ .Values.service.http.internalPort }}
+ httpHeaders:
+ - name: Authorization
+ value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
{{ end }}
@@ -71,6 +74,9 @@ spec:
httpGet:
path: /api/v1/execution-service/ping
port: {{ .Values.service.http.internalPort }}
+ httpHeaders:
+ - name: Authorization
+ value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
volumeMounts:
diff --git a/kubernetes/cds/charts/blueprints-processor/templates/secrets.yaml b/kubernetes/cds/charts/blueprints-processor/templates/secrets.yaml
deleted file mode 100755
index f21363d087..0000000000
--- a/kubernetes/cds/charts/blueprints-processor/templates/secrets.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (c) 2019 IBM, Bell Canada
-#
-# 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: Secret
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.fullname" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-type: Opaque
-data:
- db-root-password: {{ index .Values "mariadb-galera" "config" "mariadbRootPassword" | b64enc | quote }}
diff --git a/kubernetes/cds/charts/blueprints-processor/templates/service.yaml b/kubernetes/cds/charts/blueprints-processor/templates/service.yaml
index 4c1c32c1ed..5c8bc8cc0d 100755
--- a/kubernetes/cds/charts/blueprints-processor/templates/service.yaml
+++ b/kubernetes/cds/charts/blueprints-processor/templates/service.yaml
@@ -31,15 +31,13 @@ spec:
{{- if eq .Values.service.type "NodePort"}}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
{{- end}}
- name: {{ .Values.service.portName | default "http" }}
- {{- if .Values.config.grpcEnabled}}
+ name: {{ .Values.service.http.portName | default "http" }}
- port: {{ .Values.service.grpc.externalPort }}
targetPort: {{ .Values.service.grpc.internalPort }}
{{- if eq .Values.service.type "NodePort"}}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
{{- end}}
- name: {{ .Values.service.portName | default "http" }}
- {{- end}}
+ name: {{ .Values.service.grpc.portName | default "grpc" }}
selector:
app: {{ include "common.name" . }}
release: {{ .Release.Name }} \ No newline at end of file
diff --git a/kubernetes/cds/charts/blueprints-processor/values.yaml b/kubernetes/cds/charts/blueprints-processor/values.yaml
index 2edcc8a4ec..10169d5dc7 100755
--- a/kubernetes/cds/charts/blueprints-processor/values.yaml
+++ b/kubernetes/cds/charts/blueprints-processor/values.yaml
@@ -40,7 +40,7 @@ global:
#################################################################
# application image
repository: nexus3.onap.org:10001
-image: onap/ccsdk-blueprintsprocessor:0.4.1
+image: onap/ccsdk-blueprintsprocessor:0.4-STAGING-latest
pullPolicy: Always
# flag to enable debugging - application support required
@@ -48,28 +48,7 @@ debugEnabled: false
# application configuration
config:
- applicationName: BlueprintsProcessor
- msName: "org.onap.ccsdk.apps.blueprintsprocessor"
- bundleVersion: "1.0.0"
appConfigDir: /opt/app/onap/config
- grpcEnabled: false
- stickySelectorKey:
- envContext: DEV
-
-mariadb-galera:
- config:
- userName: sdnctl
- userPassword: sdnctl
- mariadbRootPassword: sdnctl
- mysqlDatabase: sdnctl
- nameOverride: blueprints-processor-db
- service:
- name: blueprints-processor-db
- portName: bp-db
- replicaCount: 1
- persistence:
- enabled: true
- mountSubPath: blueprints-processor/data
# default number of instances
replicaCount: 1
@@ -92,11 +71,12 @@ readiness:
service:
type: ClusterIP
- portName: blueprints-processor
http:
+ portName: blueprints-processor-http
internalPort: 8080
externalPort: 8080
grpc:
+ portName: blueprints-processor-grpc
internalPort: 9111
externalPort: 9111
diff --git a/kubernetes/cds/charts/controller-blueprints/requirements.yaml b/kubernetes/cds/charts/controller-blueprints/requirements.yaml
index cefe3d3bdf..857a963ada 100644
--- a/kubernetes/cds/charts/controller-blueprints/requirements.yaml
+++ b/kubernetes/cds/charts/controller-blueprints/requirements.yaml
@@ -13,9 +13,6 @@
# limitations under the License.
dependencies:
- - name: mariadb-galera
- version: ~4.x-0
- repository: file://../mariadb-galera/
- name: common
version: ~4.x-0
repository: '@local' \ No newline at end of file
diff --git a/kubernetes/cds/charts/controller-blueprints/resources/config/application.properties b/kubernetes/cds/charts/controller-blueprints/resources/config/application.properties
index 7eec7f9115..80fdaf542e 100755
--- a/kubernetes/cds/charts/controller-blueprints/resources/config/application.properties
+++ b/kubernetes/cds/charts/controller-blueprints/resources/config/application.properties
@@ -13,10 +13,6 @@
# 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.
-#
-appName=ControllerBluePrints
-ms_name=org.onap.ccsdk.apps.controllerblueprints
-appVersion=1.0.0
# Basic Authentication
basic-auth.user-name=ccsdkapps
@@ -26,20 +22,19 @@ logging.level.org.springframework.web=INFO
logging.level.org.hibernate.SQL=warn
logging.level.org.hibernate.type.descriptor.sql=debug
-#To Remove Null in JSON API Response
+# To Remove Null in JSON API Response
spring.jackson.default-property-inclusion=non_null
-#Swagger Configuration
+# Swagger Configuration
swagger.contact.name=CCSDK team
swagger.contact.url=www.onap.org
swagger.contact.email=onap-discuss@lists.onap.org
+# DB information
spring.jpa.properties.hibernate.show_sql=true
spring.jpa.properties.hibernate.use_sql_comments=true
spring.jpa.properties.hibernate.format_sql=true
-
-# spring.datasource.url, spring.datasource.username,spring.datasource.password may be overridden by ENV variables
-spring.datasource.url=jdbc:mysql://controller-blueprints-db:3306/sdnctl
+spring.datasource.url=jdbc:mysql://cds-db:3306/sdnctl
spring.datasource.username=sdnctl
spring.datasource.password=sdnctl
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
diff --git a/kubernetes/cds/charts/controller-blueprints/templates/deployment.yaml b/kubernetes/cds/charts/controller-blueprints/templates/deployment.yaml
index ef8b38fc10..4cd2e18090 100755
--- a/kubernetes/cds/charts/controller-blueprints/templates/deployment.yaml
+++ b/kubernetes/cds/charts/controller-blueprints/templates/deployment.yaml
@@ -37,7 +37,7 @@ spec:
- /root/ready.py
args:
- --container-name
- - {{ index .Values "mariadb-galera" "nameOverride" }}
+ - cds-db
env:
- name: NAMESPACE
valueFrom:
diff --git a/kubernetes/cds/charts/controller-blueprints/templates/secrets.yaml b/kubernetes/cds/charts/controller-blueprints/templates/secrets.yaml
deleted file mode 100644
index b4ab161809..0000000000
--- a/kubernetes/cds/charts/controller-blueprints/templates/secrets.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (c) 2018 Amdocs, Bell Canada
-#
-# 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: Secret
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.fullname" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-type: Opaque
-data:
- db-root-password: {{ index .Values "mariadb-galera" "config" "mariadbRootPassword" | b64enc | quote }}
- restUser: {{ .Values.config.restUser | b64enc | quote }}
- restPassword: {{ .Values.config.restPassword | b64enc | quote }}
diff --git a/kubernetes/cds/charts/controller-blueprints/values.yaml b/kubernetes/cds/charts/controller-blueprints/values.yaml
index 02b5685fa4..246aae482b 100755
--- a/kubernetes/cds/charts/controller-blueprints/values.yaml
+++ b/kubernetes/cds/charts/controller-blueprints/values.yaml
@@ -48,23 +48,6 @@ debugEnabled: false
config:
appConfigDir: /opt/app/onap/config
initDataLoad: true
- restUser: ccsdkapps
- restPassword: ccsdkapps
-
-mariadb-galera:
- config:
- userName: sdnctl
- userPassword: sdnctl
- mariadbRootPassword: sdnctl
- mysqlDatabase: sdnctl
- nameOverride: controller-blueprints-db
- service:
- name: controller-blueprints-db
- portName: cb-db
- replicaCount: 1
- persistence:
- enabled: true
- mountSubPath: controller-blueprints/data
# default number of instances
replicaCount: 1
diff --git a/kubernetes/cds/requirements.yaml b/kubernetes/cds/requirements.yaml
index d7b38dc0b1..51a4e3f9a1 100644
--- a/kubernetes/cds/requirements.yaml
+++ b/kubernetes/cds/requirements.yaml
@@ -17,3 +17,6 @@ dependencies:
- name: common
version: ~4.x-0
repository: '@local'
+ - name: mariadb-galera
+ version: ~4.x-0
+ repository: '@local' \ No newline at end of file
diff --git a/kubernetes/cds/values.yaml b/kubernetes/cds/values.yaml
index 3815d9af21..06b7cd1211 100644
--- a/kubernetes/cds/values.yaml
+++ b/kubernetes/cds/values.yaml
@@ -34,6 +34,20 @@ pullPolicy: Always
# application configuration
config:
+mariadb-galera:
+ config:
+ userName: sdnctl
+ userPassword: sdnctl
+ mariadbRootPassword: sdnctl
+ mysqlDatabase: sdnctl
+ nameOverride: cds-db
+ service:
+ name: cds-db
+ portName: cds-db
+ replicaCount: 1
+ persistence:
+ enabled: true
+ mountSubPath: cds/data
# default number of instances
replicaCount: 1
diff --git a/kubernetes/policy/charts/drools/resources/config/drools/settings.xml b/kubernetes/policy/charts/drools/resources/config/drools/settings.xml
deleted file mode 100755
index 2057e94f24..0000000000
--- a/kubernetes/policy/charts/drools/resources/config/drools/settings.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-# Copyright © 2017 Amdocs, Bell Canada, AT&T
-#
-# 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.
--->
-
-<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
-
-<!--
- <proxies>
- <proxy>
- <id>http-proxy</id>
- <active>true</active>
- <protocol>http</protocol>
- <host>your-proxy-host-or-ip</host>
- <port>your-proxy-port</port>
- <nonProxyHosts>localhost|127.0.0.1|*.svc.cluster.local|nexus</nonProxyHosts>
- </proxy>
- <proxy>
- <id>https-proxy</id>
- <active>true</active>
- <protocol>https</protocol>
- <host>your-proxy-host-or-ip</host>
- <port>your-proxy-port</port>
- <nonProxyHosts>localhost|127.0.0.1|*.svc.cluster.local|nexus</nonProxyHosts>
- </proxy>
- </proxies>
--->
- <profiles>
- <profile>
- <id>policy-profile</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
-
- <repositories>
- <repository>
- <id>policy-nexus-snapshots</id>
- <url>http://{{.Values.global.nexus.nameOverride}}:{{.Values.config.nexusPort}}/nexus/content/repositories/snapshots/</url>
- <releases>
- <enabled>false</enabled>
- <updatePolicy>always</updatePolicy>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- </repository>
-
- <repository>
- <id>policy-nexus-releases</id>
- <url>http://{{.Values.global.nexus.nameOverride}}:{{.Values.config.nexusPort}}/nexus/content/repositories/releases/</url>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- </repository>
- </repositories>
-
- </profile>
- </profiles>
-
- <activeProfiles>
- <activeProfile>policy-profile</activeProfile>
- </activeProfiles>
-
- <servers>
- <server>
- <id>policy-nexus-snapshots</id>
- <username>admin</username>
- <password>admin123</password>
- </server>
- <server>
- <id>policy-nexus-releases</id>
- <username>admin</username>
- <password>admin123</password>
- </server>
- </servers>
-
-</settings>
diff --git a/kubernetes/policy/charts/drools/resources/config/log/drools/logback.xml b/kubernetes/policy/charts/drools/resources/config/log/drools/logback.xml
deleted file mode 100644
index 4b058f1e4b..0000000000
--- a/kubernetes/policy/charts/drools/resources/config/log/drools/logback.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<!--
-# Copyright © 2017 Amdocs, Bell Canada,AT&T
-#
-# 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.
--->
-
-<configuration scan="true" scanPeriod="30 seconds" debug="false">
-
- <property name="logDir" value="/var/log/onap" />
-
- <property name="errorLog" value="error" />
- <property name="debugLog" value="debug" />
- <property name="networkLog" value="network" />
-
- <property name="debugPattern" value="[%date|%level|%logger{0}|%thread] %msg%n" />
- <property name="errorPattern" value="${debugPattern}" />
- <property name="networkPattern" value="[%d|%t]%m%n" />
-
- <appender name="ErrorOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDir}/${errorLog}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${logDir}/${errorLog}.%i.log.zip</fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>5</maxIndex>
- </rollingPolicy>
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>WARN</level>
- </filter>
- <triggeringPolicy
- class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>15MB</maxFileSize>
- </triggeringPolicy>
- <encoder>
- <pattern>${errorPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="AsyncErrorOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="ErrorOut" />
- </appender>
-
- <appender name="DebugOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDir}/${debugLog}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${logDir}/${debugLog}.%i.log.zip</fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>9</maxIndex>
- </rollingPolicy>
- <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>20MB</maxFileSize>
- </triggeringPolicy>
- <encoder>
- <pattern>${debugPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="AsyncDebugOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="DebugOut" />
- </appender>
-
- <appender name="NetworkOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDir}/${networkLog}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
- <fileNamePattern>${logDir}/${networkLog}.%i.log.zip</fileNamePattern>
- <minIndex>1</minIndex>
- <maxIndex>9</maxIndex>
- </rollingPolicy>
- <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
- <maxFileSize>15MB</maxFileSize>
- </triggeringPolicy>
- <encoder>
- <pattern>${networkPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="AsyncNetworkOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="NetworkOut" />
- </appender>
-
- <logger name="network" level="INFO" additivity="false">
- <appender-ref ref="AsyncNetworkOut" />
- </logger>
-
- <logger name="org.eclipse.jetty.server.RequestLog" level="info" additivity="false">
- <appender-ref ref="AsyncNetworkOut" />
- </logger>
-
- <root level="INFO">
- <appender-ref ref="AsyncDebugOut" />
- <appender-ref ref="AsyncErrorOut" />
- </root>
-
-</configuration>
diff --git a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/apps-install.sh b/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/apps-install.sh
deleted file mode 100644
index 9fa52123e9..0000000000
--- a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/apps-install.sh
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/bin/bash
-#
-# ============LICENSE_START=======================================================
-# ONAP
-# ================================================================================
-# Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
-# Modifications Copyright © 2018 Amdocs, Bell Canada
-# ================================================================================
-# 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.
-# ============LICENSE_END=========================================================
-#
-
-# #################################
-# Usage
-# #################################
-
-function usage {
- echo
- echo "Usage: $(basename $0) <application-name> <zipped-application-version> <download-directory>"
- echo "Example: $(basename $0) controlloop 1.2.0 /opt/policy/config/drools"
- echo
-}
-
-# #################################
-# snapshot url computation
-# #################################
-
-function url_snapshot {
- if [[ $DEBUG == y ]]; then
- echo "-- ${FUNCNAME[0]} --"
- set -x
- fi
-
- APP_URL="${APP_URL}/snapshots/org/onap/policy/drools-applications/${APP_NAME}/packages/apps-${APP_NAME}/${APP_VERSION}"
-
- local APP_METADATA_URL="${APP_URL}/maven-metadata.xml"
- local APP_SNAPSHOT_VERSION=$(curl --silent "${APP_METADATA_URL}" | grep -Po "(?<=<value>).*(?=</value>)" | sort -V | tail -1)
-
- if [[ -z ${APP_SNAPSHOT_VERSION} ]]; then
- echo "ERROR: cannot compute SNAPSHOT version"
- usage
- exit 1
- fi
-
- APP_URL="${APP_URL}/apps-${APP_NAME}-${APP_SNAPSHOT_VERSION}.zip"
-}
-
-# #################################
-# release url computation
-# #################################
-
-function url_release {
- if [[ $DEBUG == y ]]; then
- echo "-- ${FUNCNAME[0]} --"
- set -x
- fi
-
- APP_URL="${APP_URL}/releases/org/onap/policy/drools-applications/${APP_NAME}/packages/apps-${APP_NAME}/${APP_VERSION}/apps-${APP_NAME}-${APP_VERSION}.zip"
-}
-
-# #################################
-# Main
-# #################################
-
-if [[ $DEBUG == y ]]; then
- set -x
-fi
-
-APP_NAME=$1
-if [[ -z ${APP_NAME} ]]; then
- echo "ERROR: no APPLICATION NAME provided (ie. controlloop)"
- usage
- exit 1
-fi
-
-APP_VERSION=$2
-if [[ -z ${APP_VERSION} ]]; then
- echo "ERROR: no APPLICATION VERSION provided"
- usage
- exit 1
-fi
-
-DOWNLOAD_DIR=$3
-if [[ -z ${DOWNLOAD_DIR} ]]; then
- echo "ERROR: no DOWNLOAD DIRECTORY provided"
- usage
- exit 1
-fi
-
-if [[ ! -d ${DOWNLOAD_DIR} ]]; then
- echo "ERROR: ${DOWNLOAD_DIR} is not a directory"
- usage
- exit 1
-fi
-
-APP_GROUP_ID="org.onap.policy.drools-applications.${APP_NAME}.packages"
-APP_ARTIFACT_ID="apps-${APP_NAME}"
-APP_BASE_URL="https://nexus.onap.org/content/repositories"
-
-APP_URL="${APP_BASE_URL}"
-
-if [[ ${APP_VERSION} =~ \-SNAPSHOT$ ]]; then
- url_snapshot
-else
- url_release
-fi
-
-wget "${APP_URL}" -O "${DOWNLOAD_DIR}"/apps-"${APP_NAME}".zip
-if [[ $? != 0 ]]; then
- echo "ERROR: cannot download ${DOWNLOAD_DIR}/apps-${APP_NAME}.zip"
- exit 1
-fi
-
-echo "APP ${APP_NAME} stored at ${DOWNLOAD_DIR}/apps-${APP_NAME}.zip"
-ls -l "${DOWNLOAD_DIR}"/apps-"${APP_NAME}".zip
diff --git a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-preinstall.sh b/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-preinstall.sh
deleted file mode 100644
index a8de4fc2c1..0000000000
--- a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-preinstall.sh
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/bash
-#
-# ============LICENSE_START=======================================================
-# ONAP
-# ================================================================================
-# Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
-# Modifications Copyright © 2018 Amdocs, Bell Canada
-# ================================================================================
-# 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.
-# ============LICENSE_END=========================================================
-#
-
-# #################################
-# Usage
-# #################################
-
-function usage {
- echo
- echo "Usage: $(basename $0)"
- echo
-}
-
-if [[ ${DEBUG} == y ]]; then
- set -x
-fi
-
-if [[ -z ${BUILD_VERSION} ]]; then
- echo "no BUILD_VERSION available as environment variable""
- usage
- exit 1
-fi
-
-if [[ -z ${POLICY_INSTALL} ]]; then
- echo "no POLICY_INSTALL available as environment variable""
- usage
- exit 2
-fi
-
-CONFIG_DIR=$(dirname "$0")
-echo "invoking ${CONFIG_DIR}/apps-install.sh for controlloop ${BUILD_VERSION} at ${POLICY_INSTALL}"
-export DEBUG=y
-bash ${CONFIG_DIR}/apps-install.sh controlloop ${BUILD_VERSION} ${POLICY_INSTALL}
-unzip -o ${POLICY_INSTALL}/app*.zip -d ${POLICY_INSTALL}
diff --git a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-tweaks.sh b/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-tweaks.sh
deleted file mode 100644
index 5f504e2c65..0000000000
--- a/kubernetes/policy/charts/drools/resources/config/opt/policy/config/drools/drools-tweaks.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-#! /bin/bash -xv
-
-# Copyright © 2017-2018 Amdocs, Bell Canada, AT&T
-#
-# 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.
-
-
-"${POLICY_HOME}"/bin/features enable healthcheck
-"${POLICY_HOME}"/bin/features enable distributed-locking
-
-"${POLICY_HOME}"/bin/db-migrator -s pooling -o upgrade
-
-# make sure the PDPD-CONFIGURATION anonymous topic is created
-# so not to lose any configuration updates
-
-echo
-echo "testing publish to PDPD-CONFIGURATION topic"
-echo
-
-curl --silent --connect-timeout 15 -X POST --header "Content-Type: application/json" -d "{}" http://message-router:3904/events/PDPD-CONFIGURATION
-
-echo
-echo "testing subscribe to PDPD-CONFIGURATION topic "
-echo
-
-curl --silent --connect-timeout 15 -X GET http://message-router:3904/events/PDPD-CONFIGURATION/1/1?timeout=5000
-
-# for resiliency/scalability scenarios, check to see
-# if there's an amsterdam artifact already deployed
-# by brmsgw. If so, update the amsterdam controller
-# coordinates. In the future, a more sophisticated
-# solution will be put in place, that will required
-# coordination among policy components.
-
-echo
-echo "checking if there are amsterdam policies already deployed .."
-echo
-
-AMSTERDAM_VERSION=$(curl --silent --connect-timeout 20 -X GET "http://nexus:8081/nexus/service/local/artifact/maven/resolve?r=releases&g=org.onap.policy-engine.drools.amsterdam&a=policy-amsterdam-rules&v=RELEASE" | grep -Po "(?<=<version>).*(?=</version>)")
-
-if [[ -z ${AMSTERDAM_VERSION} ]]; then
- echo "no amsterdam policies have been found .."
- exit 0
-fi
-
-echo
-echo "The latest deployed amsterdam artifact in nexus has version ${AMSTERDAM_VERSION}"
-echo
-
-sed -i.INSTALL -e "s/^rules.artifactId=.*/rules.artifactId=policy-amsterdam-rules/g" \
- -e "s/^rules.groupId=.*/rules.groupId=org.onap.policy-engine.drools.amsterdam/g" \
- -e "s/^rules.version=.*/rules.version=${AMSTERDAM_VERSION}/g" "${POLICY_HOME}"/config/amsterdam-controller.properties
-
-echo
-echo "amsterdam controller will be started brained with maven coordinates:"
-echo
-
-grep "^rules" "${POLICY_HOME}"/config/amsterdam-controller.properties
-
-echo
-echo
diff --git a/kubernetes/policy/charts/drools/templates/configmap.yaml b/kubernetes/policy/charts/drools/templates/configmap.yaml
index 16053d39e7..1f9503130c 100644
--- a/kubernetes/policy/charts/drools/templates/configmap.yaml
+++ b/kubernetes/policy/charts/drools/templates/configmap.yaml
@@ -1,5 +1,5 @@
# Copyright © 2017 Amdocs, Bell Canada
-# Modifications Copyright © 2018 AT&T
+# Modifications Copyright © 2018-2019 AT&T
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,24 +16,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: {{ include "common.fullname" . }}-settings-configmap
- namespace: {{ include "common.namespace" . }}
-data:
-{{ tpl (.Files.Glob "resources/config/drools/settings.xml").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
name: {{ include "common.fullname" . }}-configmap
namespace: {{ include "common.namespace" . }}
data:
{{ tpl (.Files.Glob "resources/config/opt/policy/config/drools/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}-log-configmap
- namespace: {{ include "common.namespace" . }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/drools/logback.xml").AsConfig . | indent 2 }}
-
diff --git a/kubernetes/policy/charts/drools/templates/statefulset.yaml b/kubernetes/policy/charts/drools/templates/statefulset.yaml
index 4a7f8e2b1d..beacbabd06 100644
--- a/kubernetes/policy/charts/drools/templates/statefulset.yaml
+++ b/kubernetes/policy/charts/drools/templates/statefulset.yaml
@@ -1,5 +1,5 @@
# Copyright © 2017 Amdocs, Bell Canada
-# Modifications Copyright © 2018 AT&T
+# Modifications Copyright © 2018-2019 AT&T
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -59,10 +59,6 @@ spec:
ports:
- containerPort: {{ .Values.service.externalPort }}
- containerPort: {{ .Values.service.externalPort2 }}
- command:
- - /bin/bash
- - -c
- - ./do-start.sh
{{- if eq .Values.liveness.enabled true }}
livenessProbe:
tcpSocket:
@@ -91,30 +87,8 @@ spec:
- mountPath: /tmp/policy-install/config/base.conf
name: drools-config
subPath: base.conf
- - mountPath: /tmp/policy-install/config/policy-management.conf
- name: drools-config
- subPath: policy-management.conf
- - mountPath: /tmp/policy-install/config/drools-tweaks.sh
- name: drools-config
- subPath: drools-tweaks.sh
- - mountPath: /tmp/policy-install/config/apps-install.sh
- name: drools-config
- subPath: apps-install.sh
- - mountPath: /tmp/policy-install/config/drools-preinstall.sh
- name: drools-config
- subPath: drools-preinstall.sh
- - mountPath: /usr/share/maven/conf/settings.xml
- name: drools-settingsxml
- subPath: settings.xml
- mountPath: /var/log/onap
name: policy-logs
- - mountPath: /tmp/logback.xml
- name: policy-logback
- subPath: logback.xml
- lifecycle:
- postStart:
- exec:
- command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/opt/app/policy/config/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
resources:
{{ include "common.resources" . | indent 12 }}
{{- if .Values.nodeSelector }}
@@ -147,12 +121,6 @@ spec:
emptyDir: {}
- name: policy-data-filebeat
emptyDir: {}
- - name: policy-logback
- configMap:
- name: {{ include "common.fullname" . }}-log-configmap
- - name: drools-settingsxml
- configMap:
- name: {{ include "common.fullname" . }}-settings-configmap
- name: drools-config
configMap:
name: {{ include "common.fullname" . }}-configmap
@@ -163,18 +131,6 @@ spec:
- key: feature-pooling-dmaap.conf
path: feature-pooling-dmaap.conf
mode: 0755
- - key: policy-management.conf
- path: policy-management.conf
- mode: 0755
- - key: drools-tweaks.sh
- path: drools-tweaks.sh
- mode: 0755
- - key: apps-install.sh
- path: apps-install.sh
- mode: 0755
- - key: drools-preinstall.sh
- path: drools-preinstall.sh
- mode: 0755
- name: drools-secret
secret:
secretName: {{ include "common.fullname" . }}-secret
diff --git a/kubernetes/policy/charts/drools/values.yaml b/kubernetes/policy/charts/drools/values.yaml
index 1400e6c97e..fdb73e1485 100644
--- a/kubernetes/policy/charts/drools/values.yaml
+++ b/kubernetes/policy/charts/drools/values.yaml
@@ -1,5 +1,5 @@
# Copyright © 2017 Amdocs, Bell Canada
-# Modifications Copyright © 2018 AT&T
+# Modifications Copyright © 2018-2019 AT&T
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ global:
#################################################################
# application image
repository: nexus3.onap.org:10001
-image: onap/policy-drools:1.4-SNAPSHOT-latest
+image: onap/policy-pdpd-cl:1.4-SNAPSHOT-latest
pullPolicy: Always
# flag to enable debugging - application support required
diff --git a/kubernetes/policy/charts/policy-xacml-pdp/Chart.yaml b/kubernetes/policy/charts/policy-xacml-pdp/Chart.yaml
new file mode 100644
index 0000000000..be4325e6b2
--- /dev/null
+++ b/kubernetes/policy/charts/policy-xacml-pdp/Chart.yaml
@@ -0,0 +1,22 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+apiVersion: v1
+description: ONAP Policy XACML PDP
+name: policy-xacml-pdp
+version: 4.0.0
diff --git a/kubernetes/policy/charts/policy-xacml-pdp/requirements.yaml b/kubernetes/policy/charts/policy-xacml-pdp/requirements.yaml
new file mode 100644
index 0000000000..768bdb372d
--- /dev/null
+++ b/kubernetes/policy/charts/policy-xacml-pdp/requirements.yaml
@@ -0,0 +1,22 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+dependencies:
+ - name: common
+ version: ~4.x-0
+ repository: '@local'
diff --git a/kubernetes/policy/charts/policy-xacml-pdp/resources/config/config.json b/kubernetes/policy/charts/policy-xacml-pdp/resources/config/config.json
new file mode 100644
index 0000000000..7fb864bb31
--- /dev/null
+++ b/kubernetes/policy/charts/policy-xacml-pdp/resources/config/config.json
@@ -0,0 +1,26 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+{
+ "name":"XacmlPdpGroup",
+ "restServerParameters":{
+ "host":"0.0.0.0",
+ "port":6969,
+ "userName":"healthcheck",
+ "password":"zb!XztG34"
+ }
+}
diff --git a/kubernetes/policy/charts/policy-xacml-pdp/templates/configmap.yaml b/kubernetes/policy/charts/policy-xacml-pdp/templates/configmap.yaml
new file mode 100644
index 0000000000..d90b0c93dc
--- /dev/null
+++ b/kubernetes/policy/charts/policy-xacml-pdp/templates/configmap.yaml
@@ -0,0 +1,25 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-configmap
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/config.json").AsConfig . | indent 2 }}
diff --git a/kubernetes/policy/charts/policy-xacml-pdp/templates/deployment.yaml b/kubernetes/policy/charts/policy-xacml-pdp/templates/deployment.yaml
new file mode 100644
index 0000000000..20b2afbf50
--- /dev/null
+++ b/kubernetes/policy/charts/policy-xacml-pdp/templates/deployment.yaml
@@ -0,0 +1,66 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ replicas: {{ .Values.replicaCount }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ command: ["/opt/app/policy/pdpx/bin/policy-pdpx.sh"]
+ args: ["/opt/app/policy/pdpx/etc/mounted/config.json"]
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ # disable liveness probe when breakpoints set in debugger
+ # so K8s doesn't restart unresponsive container
+ {{- if eq .Values.liveness.enabled true }}
+ livenessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ {{ end -}}
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ volumeMounts:
+ - mountPath: /etc/localtime
+ name: localtime
+ readOnly: true
+ - mountPath: /opt/app/policy/pdpx/etc/mounted
+ name: pdpxconfig
+ resources:
+{{ include "common.resources" . | indent 12 }}
+ {{- if .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+ {{- end -}}
+ {{- if .Values.affinity }}
+ affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+ {{- end }}
+ volumes:
+ - name: localtime
+ hostPath:
+ path: /etc/localtime
+ - name: pdpxconfig
+ configMap:
+ name: {{ include "common.fullname" . }}-configmap
+ defaultMode: 0755
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/policy/charts/policy-xacml-pdp/templates/service.yaml b/kubernetes/policy/charts/policy-xacml-pdp/templates/service.yaml
new file mode 100644
index 0000000000..c02dbfd0af
--- /dev/null
+++ b/kubernetes/policy/charts/policy-xacml-pdp/templates/service.yaml
@@ -0,0 +1,37 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "common.servicename" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ name: {{ .Values.service.portName }}
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
diff --git a/kubernetes/policy/charts/policy-xacml-pdp/values.yaml b/kubernetes/policy/charts/policy-xacml-pdp/values.yaml
new file mode 100644
index 0000000000..fcfbab2471
--- /dev/null
+++ b/kubernetes/policy/charts/policy-xacml-pdp/values.yaml
@@ -0,0 +1,67 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+ persistence: {}
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: onap/policy-xacml-pdp:2.0.0-SNAPSHOT-latest
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: true
+
+readiness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+
+service:
+ type: ClusterIP
+ name: policy-xacml-pdp
+ portName: policy-xacml-pdp
+ externalPort: 6969
+ internalPort: 6969
+
+ingress:
+ enabled: false
+
+resources: {}