summaryrefslogtreecommitdiffstats
path: root/kubernetes/policy
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/policy')
-rw-r--r--kubernetes/policy/resources/config/log/filebeat/filebeat.yml2
-rwxr-xr-xkubernetes/policy/resources/config/opt/policy/config/drools/base.conf16
-rw-r--r--kubernetes/policy/resources/config/opt/policy/config/drools/keys/feature-healthcheck.conf (renamed from kubernetes/policy/resources/config/opt/policy/config/drools/feature-healthcheck.conf)0
-rw-r--r--kubernetes/policy/resources/config/opt/policy/config/drools/keys/policy-keystore (renamed from kubernetes/policy/resources/config/opt/policy/config/drools/policy-keystore)bin5640 -> 5640 bytes
-rwxr-xr-xkubernetes/policy/resources/config/opt/policy/config/pe/base.conf6
-rwxr-xr-xkubernetes/policy/resources/config/opt/policy/config/pe/brmsgw.conf12
-rwxr-xr-xkubernetes/policy/resources/config/opt/policy/config/pe/console.conf18
-rwxr-xr-xkubernetes/policy/resources/config/opt/policy/config/pe/pap.conf6
-rwxr-xr-xkubernetes/policy/resources/config/opt/policy/config/pe/paplp.conf4
-rwxr-xr-xkubernetes/policy/resources/config/opt/policy/config/pe/pdp.conf12
-rwxr-xr-xkubernetes/policy/resources/config/opt/policy/config/pe/pdplp.conf4
-rwxr-xr-xkubernetes/policy/resources/config/opt/policy/config/pe/push-policies.sh34
-rw-r--r--kubernetes/policy/templates/all-services.yaml12
-rw-r--r--kubernetes/policy/templates/dep-brmsgw.yaml6
-rw-r--r--kubernetes/policy/templates/dep-drools.yaml45
-rw-r--r--kubernetes/policy/templates/dep-maria.yaml5
-rw-r--r--kubernetes/policy/templates/dep-nexus.yaml6
-rw-r--r--kubernetes/policy/templates/dep-pap.yaml6
-rw-r--r--kubernetes/policy/templates/dep-pdp.yaml6
-rw-r--r--kubernetes/policy/templates/policy-deployment-configmap.yaml16
-rw-r--r--kubernetes/policy/templates/policy-deployment-secret.yaml4
-rw-r--r--kubernetes/policy/templates/policy-log-configmap.yaml20
22 files changed, 133 insertions, 107 deletions
diff --git a/kubernetes/policy/resources/config/log/filebeat/filebeat.yml b/kubernetes/policy/resources/config/log/filebeat/filebeat.yml
index f316b866af..89c6932577 100644
--- a/kubernetes/policy/resources/config/log/filebeat/filebeat.yml
+++ b/kubernetes/policy/resources/config/log/filebeat/filebeat.yml
@@ -21,7 +21,7 @@ output.logstash:
#List of logstash server ip addresses with port number.
#But, in our case, this will be the loadbalancer IP address.
#For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately.
- hosts: ["logstash.onap-log:5044"]
+ hosts: ["logstash.{{.Values.nsPrefix}}:5044"]
#If enable will do load balancing among availabe Logstash, automatically.
loadbalance: true
diff --git a/kubernetes/policy/resources/config/opt/policy/config/drools/base.conf b/kubernetes/policy/resources/config/opt/policy/config/drools/base.conf
index 4f904444f7..e5bbd6637d 100755
--- a/kubernetes/policy/resources/config/opt/policy/config/drools/base.conf
+++ b/kubernetes/policy/resources/config/opt/policy/config/drools/base.conf
@@ -43,14 +43,14 @@ repositoryPassword=admin123
# Relational (SQL) DB access
-SQL_HOST=mariadb.onap-policy
+SQL_HOST=mariadb.{{.Values.nsPrefix}}
SQL_USER=policy_user
SQL_PASSWORD=policy_user
# PDP-D DMaaP configuration channel
PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION
-PDPD_CONFIGURATION_SERVERS=dmaap.onap-message-router
+PDPD_CONFIGURATION_SERVERS=dmaap.{{.Values.nsPrefix}}
PDPD_CONFIGURATION_API_KEY=
PDPD_CONFIGURATION_API_SECRET=
PDPD_CONFIGURATION_CONSUMER_GROUP=
@@ -59,13 +59,13 @@ PDPD_CONFIGURATION_PARTITION_KEY=
# PAP
-PAP_HOST=pap.onap-policy
+PAP_HOST=pap.{{.Values.nsPrefix}}
PAP_USERNAME=testpap
PAP_PASSWORD=alpha123
# PDP-X
-PDP_HOST=pdp.onap-policy
+PDP_HOST=pdp.{{.Values.nsPrefix}}
PDP_USERNAME=testpdp
PDP_PASSWORD=alpha123
PDP_CLIENT_USERNAME=python
@@ -75,11 +75,11 @@ PDP_ENVIRONMENT=TEST
# DCAE DMaaP
DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT
-DCAE_SERVERS=dmaap.onap-message-router
+DCAE_SERVERS=dmaap.{{.Values.nsPrefix}}
# Open DMaaP
-DMAAP_SERVERS=dmaap.onap-message-router
+DMAAP_SERVERS=dmaap.{{.Values.nsPrefix}}
# AAI
@@ -89,7 +89,7 @@ AAI_PASSWORD=POLICY
# MSO
-SO_URL=http://mso.onap-mso:8080/ecomp/mso/infra
+SO_URL=http://mso.{{.Values.nsPrefix}}:8080/ecomp/mso/infra
SO_USERNAME=InfraPortalClient
SO_PASSWORD=password1$
@@ -97,4 +97,4 @@ SO_PASSWORD=password1$
VFC_URL=
VFC_USERNAME=
-VFC_PASSWORD= \ No newline at end of file
+VFC_PASSWORD=
diff --git a/kubernetes/policy/resources/config/opt/policy/config/drools/feature-healthcheck.conf b/kubernetes/policy/resources/config/opt/policy/config/drools/keys/feature-healthcheck.conf
index 31baed21e3..31baed21e3 100644
--- a/kubernetes/policy/resources/config/opt/policy/config/drools/feature-healthcheck.conf
+++ b/kubernetes/policy/resources/config/opt/policy/config/drools/keys/feature-healthcheck.conf
diff --git a/kubernetes/policy/resources/config/opt/policy/config/drools/policy-keystore b/kubernetes/policy/resources/config/opt/policy/config/drools/keys/policy-keystore
index ab25c3a341..ab25c3a341 100644
--- a/kubernetes/policy/resources/config/opt/policy/config/drools/policy-keystore
+++ b/kubernetes/policy/resources/config/opt/policy/config/drools/keys/policy-keystore
Binary files differ
diff --git a/kubernetes/policy/resources/config/opt/policy/config/pe/base.conf b/kubernetes/policy/resources/config/opt/policy/config/pe/base.conf
index 9c87d9ca72..291743157b 100755
--- a/kubernetes/policy/resources/config/opt/policy/config/pe/base.conf
+++ b/kubernetes/policy/resources/config/opt/policy/config/pe/base.conf
@@ -3,8 +3,8 @@ POLICY_HOME=/opt/app/policy
KEYSTORE_PASSWD=PolicyR0ck$
JDBC_DRIVER=org.mariadb.jdbc.Driver
-JDBC_URL=jdbc:mariadb://mariadb.onap-policy:3306/onap_sdk?failOverReadOnly=false&autoReconnect=true
-JDBC_LOG_URL=jdbc:mariadb://mariadb.onap-policy:3306/log?failOverReadOnly=false&autoReconnect=true
+JDBC_URL=jdbc:mariadb://mariadb.{{.Values.nsPrefix}}:3306/onap_sdk?failOverReadOnly=false&autoReconnect=true
+JDBC_LOG_URL=jdbc:mariadb://mariadb.{{.Values.nsPrefix}}:3306/log?failOverReadOnly=false&autoReconnect=true
JDBC_USER=policy_user
JDBC_PASSWORD=policy_user
@@ -21,4 +21,4 @@ ENVIRONMENT=TEST
#Micro Service Model Properties
policy_msOnapName=
-policy_msPolicyName= \ No newline at end of file
+policy_msPolicyName=
diff --git a/kubernetes/policy/resources/config/opt/policy/config/pe/brmsgw.conf b/kubernetes/policy/resources/config/opt/policy/config/pe/brmsgw.conf
index ff4d2e487d..d874237575 100755
--- a/kubernetes/policy/resources/config/opt/policy/config/pe/brmsgw.conf
+++ b/kubernetes/policy/resources/config/opt/policy/config/pe/brmsgw.conf
@@ -4,8 +4,8 @@ BRMSGW_JMX_PORT=9989
COMPONENT_X_MX_MB=1024
COMPONENT_X_MS_MB=1024
-REST_PAP_URL=http://pap.onap-policy:9091/pap/
-REST_PDP_ID=http://pdp.onap-policy:8081/pdp/
+REST_PAP_URL=http://pap.{{.Values.nsPrefix}}:9091/pap/
+REST_PDP_ID=http://pdp.{{.Values.nsPrefix}}:8081/pdp/
PDP_HTTP_USER_ID=testpdp
PDP_HTTP_PASSWORD=alpha123
@@ -15,13 +15,13 @@ PDP_PAP_PDP_HTTP_PASSWORD=alpha123
M2_HOME=/usr/share/maven
snapshotRepositoryID=policy-nexus-snapshots
snapshotRepositoryName=Snapshots
-snapshotRepositoryURL=http://nexus.onap-policy:8081/nexus/content/repositories/snapshots
+snapshotRepositoryURL=http://nexus.{{.Values.nsPrefix}}:8081/nexus/content/repositories/snapshots
releaseRepositoryID=policy-nexus-releases
releaseRepositoryName=Releases
-releaseRepositoryURL=http://nexus.onap-policy:8081/nexus/content/repositories/releases
+releaseRepositoryURL=http://nexus.{{.Values.nsPrefix}}:8081/nexus/content/repositories/releases
repositoryUsername=admin
repositoryPassword=admin123
-UEB_URL=dmaap.onap-message-router
+UEB_URL=dmaap.{{.Values.nsPrefix}}
UEB_TOPIC=PDPD-CONFIGURATION
UEB_API_KEY=
UEB_API_SECRET=
@@ -40,7 +40,7 @@ ENVIRONMENT=TEST
#Notification Properties... type can be either websocket, ueb, or dmaap
BRMS_NOTIFICATION_TYPE=websocket
-BRMS_UEB_URL=dmaap.onap-message-router
+BRMS_UEB_URL=dmaap.{{.Values.nsPrefix}}
BRMS_UEB_TOPIC=PDPD-CONFIGURATION
BRMS_UEB_DELAY=
BRMS_CLIENT_ID=python
diff --git a/kubernetes/policy/resources/config/opt/policy/config/pe/console.conf b/kubernetes/policy/resources/config/opt/policy/config/pe/console.conf
index 938543cb7e..3ff708655c 100755
--- a/kubernetes/policy/resources/config/opt/policy/config/pe/console.conf
+++ b/kubernetes/policy/resources/config/opt/policy/config/pe/console.conf
@@ -33,7 +33,7 @@ REST_ADMIN_REPOSITORY=repository
#
# Location where all the user workspaces are located.
#
-REST_ADMIN_WORKSPACE=${{POLICY_HOME}}/servers/console/bin/workspace
+REST_ADMIN_WORKSPACE=/opt/app/policy/servers/console/bin/workspace
#
# These can be set so the Admin Console knows who is logged on. Ideally, you can run the console in a J2EE
@@ -77,16 +77,16 @@ REFRESH_RATE=40000
#
-REST_PAP_URL=http://pap.onap-policy:9091/pap/
+REST_PAP_URL=http://pap.{{.Values.nsPrefix}}:9091/pap/
#
# Config/Action Properties location.
#
-REST_CONFIG_HOME=${{POLICY_HOME}}/servers/pap/webapps/Config/
-REST_ACTION_HOME=${{POLICY_HOME}}/servers/pap/webapps/Action/
-REST_CONFIG_URL=http://pap.onap-policy:9091/
-REST_CONFIG_WEBAPPS=${{POLICY_HOME}}/servers/pap/webapps/
+REST_CONFIG_HOME=/opt/app/policy/servers/pap/webapps/Config/
+REST_ACTION_HOME=/opt/app/policy/servers/pap/webapps/Action/
+REST_CONFIG_URL=http://pap.{{.Values.nsPrefix}}:9091/
+REST_CONFIG_WEBAPPS=/opt/app/policy/servers/pap/webapps/
# PAP account information
CONSOLE_PAP_HTTP_USER_ID=testpap
@@ -121,12 +121,12 @@ onap_application_name=
#-----------------------ONAP-PORTAL-Properties----------------------
-ONAP_REDIRECT_URL=http://portalapps.onap-portal:8989/ONAPPORTAL/login.htm
-ONAP_REST_URL=http://portalapps.onap-portal:8989/ONAPPORTAL/auxapi
+ONAP_REDIRECT_URL=http://portalapps.{{.Values.nsPrefix}}:8989/ONAPPORTAL/login.htm
+ONAP_REST_URL=http://portalapps.{{.Values.nsPrefix}}:8989/ONAPPORTAL/auxapi
ONAP_UEB_URL_LIST=
ONAP_PORTAL_INBOX_NAME=
ONAP_UEB_APP_KEY=
ONAP_UEB_APP_SECRET=
ONAP_UEB_APP_MAILBOX_NAME=
APP_DISPLAY_NAME=ONAP Policy
-ONAP_SHARED_CONTEXT_REST_URL=http://portalapps.onap-portal:8989/ONAPPORTAL/context
+ONAP_SHARED_CONTEXT_REST_URL=http://portalapps.{{.Values.nsPrefix}}:8989/ONAPPORTAL/context
diff --git a/kubernetes/policy/resources/config/opt/policy/config/pe/pap.conf b/kubernetes/policy/resources/config/opt/policy/config/pe/pap.conf
index 53c52aaceb..3f892c9f5a 100755
--- a/kubernetes/policy/resources/config/opt/policy/config/pe/pap.conf
+++ b/kubernetes/policy/resources/config/opt/policy/config/pe/pap.conf
@@ -13,8 +13,8 @@ TOMCAT_X_MX_MB=1024
# pap properties
-PAP_PDPS=${{POLICY_HOME}}/servers/pap/bin/pdps
-PAP_URL=http://pap.onap-policy:9091/pap/
+PAP_PDPS=/opt/app/policy/servers/pap/bin/pdps
+PAP_URL=http://pap.{{.Values.nsPrefix}}:9091/pap/
PAP_INITIATE_PDP=true
PAP_HEARTBEAT_INTERVAL=10000
@@ -26,7 +26,7 @@ REST_ADMIN_WORKSPACE=workspace
# PDP related properties
-PAP_PDP_URL=http://pdp.onap-policy:8081/pdp/
+PAP_PDP_URL=http://pdp.{{.Values.nsPrefix}}:8081/pdp/
PAP_PDP_HTTP_USER_ID=testpdp
PAP_PDP_HTTP_PASSWORD=alpha123
diff --git a/kubernetes/policy/resources/config/opt/policy/config/pe/paplp.conf b/kubernetes/policy/resources/config/opt/policy/config/pe/paplp.conf
index d25f11be3b..22ca8492b2 100755
--- a/kubernetes/policy/resources/config/opt/policy/config/pe/paplp.conf
+++ b/kubernetes/policy/resources/config/opt/policy/config/pe/paplp.conf
@@ -3,8 +3,8 @@ LOGPARSER_JMX_PORT=9996
LOGPARSER_X_MS_MB=1024
LOGPARSER_X_MX_MB=1024
-SERVER=http://pap.onap-policy:9091/pap/
-LOGPATH=${{POLICY_HOME}}/servers/pap/logs/pap-rest.log
+SERVER=http://pap.{{.Values.nsPrefix}}:9091/pap/
+LOGPATH=/opt/app/policy/servers/pap/logs/pap-rest.log
PARSERLOGPATH=IntegrityMonitor.log
node_type=logparser
diff --git a/kubernetes/policy/resources/config/opt/policy/config/pe/pdp.conf b/kubernetes/policy/resources/config/opt/policy/config/pe/pdp.conf
index dba8af2e10..c3af2238f0 100755
--- a/kubernetes/policy/resources/config/opt/policy/config/pe/pdp.conf
+++ b/kubernetes/policy/resources/config/opt/policy/config/pe/pdp.conf
@@ -13,12 +13,12 @@ TOMCAT_X_MX_MB=1024
# pdp properties
-UEB_CLUSTER=dmaap.onap-message-router
+UEB_CLUSTER=dmaap.{{.Values.nsPrefix}}
-REST_PAP_URL=http://pap.onap-policy:9091/pap/
-REST_PDP_ID=http://pdp.onap-policy:8081/pdp/
-REST_PDP_CONFIG=${{POLICY_HOME}}/servers/pdp/bin/config
-REST_PDP_WEBAPPS=${{POLICY_HOME}}/servers/pdp/webapps
+REST_PAP_URL=http://pap.{{.Values.nsPrefix}}:9091/pap/
+REST_PDP_ID=http://pdp.{{.Values.nsPrefix}}:8081/pdp/
+REST_PDP_CONFIG=/opt/app/policy/servers/pdp/bin/config
+REST_PDP_WEBAPPS=/opt/app/policy/servers/pdp/webapps
REST_PDP_REGISTER=true
REST_PDP_REGISTER_SLEEP=15
REST_PDP_REGISTER_RETRIES=-1
@@ -53,4 +53,4 @@ POLICY_AAF_NAMESPACE=
POLICY_AAF_RESOURCE=
# Indeterminate resolution
-DECISION_INDETERMINATE_RESPONSE=PERMIT \ No newline at end of file
+DECISION_INDETERMINATE_RESPONSE=PERMIT
diff --git a/kubernetes/policy/resources/config/opt/policy/config/pe/pdplp.conf b/kubernetes/policy/resources/config/opt/policy/config/pe/pdplp.conf
index 8320caa56b..0e58cebbc6 100755
--- a/kubernetes/policy/resources/config/opt/policy/config/pe/pdplp.conf
+++ b/kubernetes/policy/resources/config/opt/policy/config/pe/pdplp.conf
@@ -3,8 +3,8 @@ LOGPARSER_JMX_PORT=9997
LOGPARSER_X_MS_MB=1024
LOGPARSER_X_MX_MB=1024
-SERVER=http://pdp.onap-policy:8081/pdp/
-LOGPATH=${{POLICY_HOME}}/servers/pdp/logs/pdp-rest.log
+SERVER=http://pdp.{{.Values.nsPrefix}}:8081/pdp/
+LOGPATH=/opt/app/policy/servers/pdp/logs/pdp-rest.log
PARSERLOGPATH=IntegrityMonitor.log
node_type=logparser
diff --git a/kubernetes/policy/resources/config/opt/policy/config/pe/push-policies.sh b/kubernetes/policy/resources/config/opt/policy/config/pe/push-policies.sh
index 0461731c16..b9242cee78 100755
--- a/kubernetes/policy/resources/config/opt/policy/config/pe/push-policies.sh
+++ b/kubernetes/policy/resources/config/opt/policy/config/pe/push-policies.sh
@@ -12,7 +12,7 @@ wget -O cl-amsterdam-template.drl https://git.onap.org/policy/drools-application
sleep 2
-curl -v --silent -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -F "file=@cl-amsterdam-template.drl" -F "importParametersJson={\"serviceName\":\"ClosedLoopControlName\",\"serviceType\":\"BRMSPARAM\"}" 'http://pdp.onap-policy:8081/pdp/api/policyEngineImport'
+curl -v --silent -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -F "file=@cl-amsterdam-template.drl" -F "importParametersJson={\"serviceName\":\"ClosedLoopControlName\",\"serviceType\":\"BRMSPARAM\"}" 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/policyEngineImport'
echo "PRELOAD_POLICIES is $PRELOAD_POLICIES"
@@ -42,7 +42,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0D%0A++trigger_policy%3A+unique-policy-id-1-modifyConfig%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-modifyConfig%0D%0A++++name%3A+modify+packet+gen+config%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+ModifyConfig%0D%0A++++target%3A%0D%0A++++++%23+TBD+-+Cannot+be+known+until+instantiation+is+done%0D%0A++++++resourceID%3A+Eace933104d443b496b8.nodes.heat.vpg%0D%0A++++++type%3A+VNF%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+300%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
}
}
-}' 'http://pdp.onap-policy:8081/pdp/api/createPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/createPolicy'
sleep 2
@@ -62,7 +62,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0D%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-scale-up%0D%0A++++name%3A+Create+a+new+VF+Module%0D%0A++++description%3A%0D%0A++++actor%3A+SO%0D%0A++++recipe%3A+VF+Module+Create%0D%0A++++target%3A%0D%0A++++++type%3A+VNF%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
}
}
-}' 'http://pdp.onap-policy:8081/pdp/api/createPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/createPolicy'
sleep 2
@@ -82,7 +82,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+VFC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
}
}
-}' 'http://pdp.onap-policy:8081/pdp/api/createPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/createPolicy'
sleep 2
@@ -102,7 +102,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+true%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
}
}
-}' 'http://pdp.onap-policy:8081/pdp/api/createPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/createPolicy'
#########################################Create Micro Service Config policies##########################################
@@ -116,7 +116,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"policyConfigType": "MicroService",
"policyName": "com.MicroServicevFirewall",
"onapName": "DCAE"
-}' 'http://pdp.onap-policy:8081/pdp/api/createPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/createPolicy'
sleep 2
@@ -127,7 +127,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"policyConfigType": "MicroService",
"policyName": "com.MicroServicevDNS",
"onapName": "DCAE"
-}' 'http://pdp.onap-policy:8081/pdp/api/createPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/createPolicy'
sleep 2
@@ -138,7 +138,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"policyConfigType": "MicroService",
"policyName": "com.MicroServicevCPE",
"onapName": "DCAE"
-}' 'http://pdp.onap-policy:8081/pdp/api/createPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/createPolicy'
#########################################Creating Decision Guard policy#########################################
@@ -165,7 +165,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"guardActiveEnd": "00:00:00-05:00"
}
}
-}' 'http://pdp.onap-policy:8081/pdp/api/createPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/createPolicy'
#########################################Push Decision policy#########################################
@@ -176,7 +176,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"pdpGroup": "default",
"policyName": "com.AllPermitGuard",
"policyType": "DECISION"
-}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/pushPolicy'
#########################################Pushing BRMS Param policies##########################################
@@ -189,7 +189,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"pdpGroup": "default",
"policyName": "com.BRMSParamvFirewall",
"policyType": "BRMS_Param"
-}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/pushPolicy'
sleep 2
@@ -198,7 +198,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"pdpGroup": "default",
"policyName": "com.BRMSParamvDNS",
"policyType": "BRMS_Param"
-}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/pushPolicy'
sleep 2
@@ -207,7 +207,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"pdpGroup": "default",
"policyName": "com.BRMSParamVOLTE",
"policyType": "BRMS_Param"
-}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/pushPolicy'
sleep 2
@@ -216,7 +216,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"pdpGroup": "default",
"policyName": "com.BRMSParamvCPE",
"policyType": "BRMS_Param"
-}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/pushPolicy'
#########################################Pushing MicroService Config policies##########################################
@@ -229,7 +229,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"pdpGroup": "default",
"policyName": "com.MicroServicevFirewall",
"policyType": "MicroService"
-}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/pushPolicy'
sleep 10
@@ -238,7 +238,7 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"pdpGroup": "default",
"policyName": "com.MicroServicevDNS",
"policyType": "MicroService"
-}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy'
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/pushPolicy'
sleep 10
@@ -247,4 +247,4 @@ curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Acce
"pdpGroup": "default",
"policyName": "com.MicroServicevCPE",
"policyType": "MicroService"
-}' 'http://pdp.onap-policy:8081/pdp/api/pushPolicy' \ No newline at end of file
+}' 'http://pdp.{{.Values.nsPrefix}}:8081/pdp/api/pushPolicy'
diff --git a/kubernetes/policy/templates/all-services.yaml b/kubernetes/policy/templates/all-services.yaml
index c6b633e98d..3971b29b73 100644
--- a/kubernetes/policy/templates/all-services.yaml
+++ b/kubernetes/policy/templates/all-services.yaml
@@ -3,7 +3,7 @@ apiVersion: v1
kind: Service
metadata:
name: mariadb
- namespace: "{{ .Values.nsPrefix }}-policy"
+ namespace: "{{ .Values.nsPrefix }}"
labels:
app: mariadb
spec:
@@ -22,7 +22,7 @@ metadata:
labels:
app: nexus
name: nexus
- namespace: "{{ .Values.nsPrefix }}-policy"
+ namespace: "{{ .Values.nsPrefix }}"
spec:
ports:
- name: nexus-port
@@ -39,7 +39,7 @@ metadata:
labels:
app: drools
name: drools
- namespace: "{{ .Values.nsPrefix }}-policy"
+ namespace: "{{ .Values.nsPrefix }}"
spec:
ports:
- name: "drools-port"
@@ -58,7 +58,7 @@ apiVersion: v1
kind: Service
metadata:
name: pap
- namespace: "{{ .Values.nsPrefix }}-policy"
+ namespace: "{{ .Values.nsPrefix }}"
labels:
app: pap
spec:
@@ -79,7 +79,7 @@ apiVersion: v1
kind: Service
metadata:
name: pdp
- namespace: "{{ .Values.nsPrefix }}-policy"
+ namespace: "{{ .Values.nsPrefix }}"
labels:
app: pdp
annotations:
@@ -117,7 +117,7 @@ apiVersion: v1
kind: Service
metadata:
name: brmsgw
- namespace: "{{ .Values.nsPrefix }}-policy"
+ namespace: "{{ .Values.nsPrefix }}"
labels:
app: brmsgw
spec:
diff --git a/kubernetes/policy/templates/dep-brmsgw.yaml b/kubernetes/policy/templates/dep-brmsgw.yaml
index 6c0533ce15..25bf0c678b 100644
--- a/kubernetes/policy/templates/dep-brmsgw.yaml
+++ b/kubernetes/policy/templates/dep-brmsgw.yaml
@@ -2,8 +2,8 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
- name: brmsgw
- namespace: "{{ .Values.nsPrefix }}-policy"
+ name: policy-brmsgw
+ namespace: "{{ .Values.nsPrefix }}"
spec:
replicas: {{ .Values.brmsgwReplicas }}
selector:
@@ -13,7 +13,7 @@ spec:
metadata:
labels:
app: brmsgw
- name: brmsgw
+ name: policy-brmsgw
spec:
initContainers:
- command:
diff --git a/kubernetes/policy/templates/dep-drools.yaml b/kubernetes/policy/templates/dep-drools.yaml
index 1dc16cf374..ef9636ceef 100644
--- a/kubernetes/policy/templates/dep-drools.yaml
+++ b/kubernetes/policy/templates/dep-drools.yaml
@@ -2,8 +2,8 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
- name: drools
- namespace: "{{ .Values.nsPrefix }}-policy"
+ name: policy-drools
+ namespace: "{{ .Values.nsPrefix }}"
spec:
replicas: {{ .Values.droolsReplicas }}
selector:
@@ -13,7 +13,7 @@ spec:
metadata:
labels:
app: drools
- name: drools
+ name: policy-drools
spec:
initContainers:
- command:
@@ -55,8 +55,21 @@ spec:
- mountPath: /etc/localtime
name: localtime
readOnly: true
- - mountPath: /tmp/policy-install/config
- name: drools
+ - mountPath: /tmp/policy-install/config/policy-keystore
+ name: drools-secret
+ subPath: policy-keystore
+ - mountPath: /tmp/policy-install/config/feature-healthcheck.conf
+ name: drools-secret
+ subPath: feature-healthcheck.conf
+ - 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: /usr/share/maven/conf/settings.xml
name: drools-settingsxml
subPath: settings.xml
@@ -97,16 +110,10 @@ spec:
- name: drools-settingsxml
configMap:
name: policy-dep-drools-settings-configmap
- - name: drools
- secret:
- secretName: policy-dep-drools-secret
+ - name: drools-config
+ configMap:
+ name: policy-dep-drools-configmap
items:
- - key: policy-keystore
- path: policy-keystore
- mode: 0644
- - key: feature-healthcheck.conf
- path: feature-healthcheck.conf
- mode: 0644
- key: base.conf
path: base.conf
mode: 0755
@@ -116,6 +123,16 @@ spec:
- key: drools-tweaks.sh
path: drools-tweaks.sh
mode: 0755
+ - name: drools-secret
+ secret:
+ secretName: policy-dep-drools-secret
+ items:
+ - key: policy-keystore
+ path: policy-keystore
+ mode: 0644
+ - key: feature-healthcheck.conf
+ path: feature-healthcheck.conf
+ mode: 0644
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
#{{ end }}
diff --git a/kubernetes/policy/templates/dep-maria.yaml b/kubernetes/policy/templates/dep-maria.yaml
index e42230f994..9ac17daa88 100644
--- a/kubernetes/policy/templates/dep-maria.yaml
+++ b/kubernetes/policy/templates/dep-maria.yaml
@@ -2,8 +2,8 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
- name: mariadb
- namespace: "{{ .Values.nsPrefix }}-policy"
+ name: policy-mariadb
+ namespace: "{{ .Values.nsPrefix }}"
spec:
replicas: {{ .Values.mariadbReplicas }}
selector:
@@ -13,6 +13,7 @@ spec:
metadata:
labels:
app: mariadb
+ name: policy-mariadb
spec:
hostname: mariadb
containers:
diff --git a/kubernetes/policy/templates/dep-nexus.yaml b/kubernetes/policy/templates/dep-nexus.yaml
index 2db40b2763..c63e0af685 100644
--- a/kubernetes/policy/templates/dep-nexus.yaml
+++ b/kubernetes/policy/templates/dep-nexus.yaml
@@ -2,8 +2,8 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
- name: nexus
- namespace: "{{ .Values.nsPrefix }}-policy"
+ name: policy-nexus
+ namespace: "{{ .Values.nsPrefix }}"
spec:
replicas: {{ .Values.nexusReplicas }}
selector:
@@ -13,7 +13,7 @@ spec:
metadata:
labels:
app: nexus
- name: nexus
+ name: policy-nexus
spec:
initContainers:
- command:
diff --git a/kubernetes/policy/templates/dep-pap.yaml b/kubernetes/policy/templates/dep-pap.yaml
index 68ccb5a746..389fc6b3eb 100644
--- a/kubernetes/policy/templates/dep-pap.yaml
+++ b/kubernetes/policy/templates/dep-pap.yaml
@@ -2,8 +2,8 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
- name: pap
- namespace: "{{ .Values.nsPrefix }}-policy"
+ name: policy-pap
+ namespace: "{{ .Values.nsPrefix }}"
spec:
replicas: {{ .Values.papReplicas }}
selector:
@@ -13,7 +13,7 @@ spec:
metadata:
labels:
app: pap
- name: pap
+ name: policy-pap
spec:
initContainers:
- command:
diff --git a/kubernetes/policy/templates/dep-pdp.yaml b/kubernetes/policy/templates/dep-pdp.yaml
index f867fa54e2..6740f1d422 100644
--- a/kubernetes/policy/templates/dep-pdp.yaml
+++ b/kubernetes/policy/templates/dep-pdp.yaml
@@ -2,8 +2,8 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
- name: pdp
- namespace: "{{ .Values.nsPrefix }}-policy"
+ name: policy-pdp
+ namespace: "{{ .Values.nsPrefix }}"
spec:
replicas: {{ .Values.pdpReplicas }}
selector:
@@ -13,7 +13,7 @@ spec:
metadata:
labels:
app: pdp
- name: pdp
+ name: policy-pdp
spec:
initContainers:
- command:
diff --git a/kubernetes/policy/templates/policy-deployment-configmap.yaml b/kubernetes/policy/templates/policy-deployment-configmap.yaml
index b1db02bd20..d59ba617fa 100644
--- a/kubernetes/policy/templates/policy-deployment-configmap.yaml
+++ b/kubernetes/policy/templates/policy-deployment-configmap.yaml
@@ -3,9 +3,9 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: policy-dep-drools-settings-configmap
- namespace: {{ .Values.nsPrefix }}-policy
+ namespace: {{ .Values.nsPrefix }}
data:
-{{ (.Files.Glob "resources/config/drools/settings.xml").AsConfig | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/drools/settings.xml").AsConfig . | indent 2 }}
#{{ end }}
---
#{{ if not .Values.disablePolicyPdp }}
@@ -13,7 +13,15 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: policy-dep-pe-configmap
- namespace: {{ .Values.nsPrefix }}-policy
+ namespace: {{ .Values.nsPrefix }}
data:
-{{ (.Files.Glob "resources/config/opt/policy/config/pe/*").AsConfig | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/opt/policy/config/pe/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: policy-dep-drools-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/opt/policy/config/drools/*").AsConfig . | indent 2 }}
#{{ end }}
diff --git a/kubernetes/policy/templates/policy-deployment-secret.yaml b/kubernetes/policy/templates/policy-deployment-secret.yaml
index 99a807bddf..6fe52ead4e 100644
--- a/kubernetes/policy/templates/policy-deployment-secret.yaml
+++ b/kubernetes/policy/templates/policy-deployment-secret.yaml
@@ -3,8 +3,8 @@ apiVersion: v1
kind: Secret
metadata:
name: policy-dep-drools-secret
- namespace: {{ .Values.nsPrefix }}-policy
+ namespace: {{ .Values.nsPrefix }}
type: Opaque
data:
-{{ tpl (.Files.Glob "resources/config/opt/policy/config/drools/*").AsSecrets . | indent 2 }}
+{{ (.Files.Glob "resources/config/opt/policy/config/drools/keys/*").AsSecrets | indent 2 }}
#{{ end }}
diff --git a/kubernetes/policy/templates/policy-log-configmap.yaml b/kubernetes/policy/templates/policy-log-configmap.yaml
index 24ad45e5f7..b1a9e0999c 100644
--- a/kubernetes/policy/templates/policy-log-configmap.yaml
+++ b/kubernetes/policy/templates/policy-log-configmap.yaml
@@ -3,25 +3,25 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: policy-pap-log-configmap
- namespace: {{ .Values.nsPrefix }}-policy
+ namespace: {{ .Values.nsPrefix }}
data:
-{{ (.Files.Glob "resources/config/log/xacml-pap-rest/*").AsConfig | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/log/xacml-pap-rest/*").AsConfig . | indent 2 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: policy-sdk-log-configmap
- namespace: {{ .Values.nsPrefix }}-policy
+ namespace: {{ .Values.nsPrefix }}
data:
-{{ (.Files.Glob "resources/config/log/ep_sdk_app/*").AsConfig | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/log/ep_sdk_app/*").AsConfig . | indent 2 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: policy-filebeat-configmap
- namespace: {{ .Values.nsPrefix }}-policy
+ namespace: {{ .Values.nsPrefix }}
data:
-{{ (.Files.Glob "resources/config/log/filebeat/*").AsConfig | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
#{{ end }}
#{{ if not .Values.disablePolicyPdp }}
---
@@ -29,9 +29,9 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: policy-pdp-log-configmap
- namespace: {{ .Values.nsPrefix }}-policy
+ namespace: {{ .Values.nsPrefix }}
data:
-{{ (.Files.Glob "resources/config/log/xacml-pdp-rest/*").AsConfig | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/log/xacml-pdp-rest/*").AsConfig . | indent 2 }}
#{{ end }}
#{{ if not .Values.disablePolicyDrools }}
---
@@ -39,7 +39,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: policy-drools-log-configmap
- namespace: {{ .Values.nsPrefix }}-policy
+ namespace: {{ .Values.nsPrefix }}
data:
-{{ (.Files.Glob "resources/config/log/drools/*").AsConfig | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/log/drools/*").AsConfig . | indent 2 }}
#{{ end }}