summaryrefslogtreecommitdiffstats
path: root/kubernetes/policy/templates
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/policy/templates')
-rw-r--r--kubernetes/policy/templates/all-services.yaml5
-rw-r--r--kubernetes/policy/templates/dep-brmsgw.yaml11
-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-pap.yaml25
-rw-r--r--kubernetes/policy/templates/dep-pdp.yaml19
-rw-r--r--kubernetes/policy/templates/policy-deployment-configmap.yaml19
-rw-r--r--kubernetes/policy/templates/policy-deployment-secret.yaml10
-rw-r--r--kubernetes/policy/templates/policy-log-configmap.yaml45
-rw-r--r--kubernetes/policy/templates/policy-pv-pvc.yaml32
10 files changed, 136 insertions, 80 deletions
diff --git a/kubernetes/policy/templates/all-services.yaml b/kubernetes/policy/templates/all-services.yaml
index a1c480458d..c6b633e98d 100644
--- a/kubernetes/policy/templates/all-services.yaml
+++ b/kubernetes/policy/templates/all-services.yaml
@@ -45,6 +45,9 @@ spec:
- name: "drools-port"
port: 6969
nodePort: {{ .Values.nodePortPrefix }}17
+ - name: "drools-port2"
+ port: 9696
+ nodePort: {{ .Values.nodePortPrefix }}21
selector:
app: drools
type: NodePort
@@ -125,4 +128,4 @@ spec:
selector:
app: brmsgw
type: NodePort
-#{{ end }} \ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/policy/templates/dep-brmsgw.yaml b/kubernetes/policy/templates/dep-brmsgw.yaml
index 7a1bcdec49..667ccc6251 100644
--- a/kubernetes/policy/templates/dep-brmsgw.yaml
+++ b/kubernetes/policy/templates/dep-brmsgw.yaml
@@ -20,13 +20,7 @@ spec:
- /root/ready.py
args:
- --container-name
- - mariadb
- - --container-name
- - nexus
- - --container-name
- pap
- - --container-name
- - pdp
env:
- name: NAMESPACE
valueFrom:
@@ -55,8 +49,9 @@ spec:
hostPath:
path: /etc/localtime
- name: pe
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
+ configMap:
+ name: policy-dep-pe-configmap
+ defaultMode: 0755
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
#{{ end }}
diff --git a/kubernetes/policy/templates/dep-drools.yaml b/kubernetes/policy/templates/dep-drools.yaml
index 48ef16e3b2..afa044abe9 100644
--- a/kubernetes/policy/templates/dep-drools.yaml
+++ b/kubernetes/policy/templates/dep-drools.yaml
@@ -23,12 +23,6 @@ spec:
- mariadb
- --container-name
- nexus
- - --container-name
- - pap
- - --container-name
- - pdp
- - --container-name
- - brmsgw
env:
- name: NAMESPACE
valueFrom:
@@ -38,6 +32,10 @@ spec:
image: "{{ .Values.image.readiness }}:{{ .Values.image.readinessVersion }}"
imagePullPolicy: {{ .Values.pullPolicy }}
name: drools-readiness
+ hostAliases:
+ - ip: "{{ .Values.aaiServiceClusterIp }}"
+ hostnames:
+ - "aai.api.simpledemo.openecomp.org"
containers:
- command:
- /bin/bash
@@ -61,10 +59,12 @@ spec:
name: drools
- 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:
@@ -75,6 +75,7 @@ spec:
volumeMounts:
- mountPath: /usr/share/filebeat/filebeat.yml
name: filebeat-conf
+ subPath: filebeat.yml
- mountPath: /var/log/onap
name: policy-logs
- mountPath: /usr/share/filebeat/data
@@ -84,21 +85,37 @@ spec:
hostPath:
path: /etc/localtime
- name: filebeat-conf
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+ configMap:
+ name: policy-filebeat-configmap
- name: policy-logs
emptyDir: {}
- name: policy-data-filebeat
emptyDir: {}
- name: policy-logback
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/drools/logback.xml
+ configMap:
+ name: policy-drools-log-configmap
- name: drools-settingsxml
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/drools/settings.xml
+ configMap:
+ name: policy-dep-drools-settings-configmap
- name: drools
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/drools/
+ 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
+ - key: base.conf
+ path: base.conf
+ mode: 0755
+ - key: policy-management.conf
+ path: policy-management.conf
+ mode: 0755
+ - key: drools-tweaks.sh
+ path: drools-tweaks.sh
+ mode: 0755
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 c0f5060884..c921e8c890 100644
--- a/kubernetes/policy/templates/dep-maria.yaml
+++ b/kubernetes/policy/templates/dep-maria.yaml
@@ -24,8 +24,6 @@ spec:
- mountPath: /etc/localtime
name: localtime
readOnly: true
- - mountPath: /var/lib/mysql
- name: policy-mariadb-data
readinessProbe:
tcpSocket:
port: 3306
@@ -35,9 +33,6 @@ spec:
- name: localtime
hostPath:
path: /etc/localtime
- - name: policy-mariadb-data
- persistentVolumeClaim:
- claimName: policy-db
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
#{{ end }} \ No newline at end of file
diff --git a/kubernetes/policy/templates/dep-pap.yaml b/kubernetes/policy/templates/dep-pap.yaml
index 523cfd35ff..d3d5ff3738 100644
--- a/kubernetes/policy/templates/dep-pap.yaml
+++ b/kubernetes/policy/templates/dep-pap.yaml
@@ -19,8 +19,6 @@ spec:
- /root/ready.py
args:
- --container-name
- - nexus
- - --container-name
- mariadb
env:
- name: NAMESPACE
@@ -52,6 +50,9 @@ spec:
image: "{{ .Values.image.policyPe }}:{{ .Values.image.policyPeVersion }}"
imagePullPolicy: {{ .Values.pullPolicy }}
name: pap
+ env:
+ - name: PRELOAD_POLICIES
+ value: "true"
ports:
- containerPort: 8443
- containerPort: 9091
@@ -70,8 +71,10 @@ spec:
name: policy-logs
- mountPath: /tmp/policy-install/logback.xml
name: policy-sdk-logback
+ subPath: logback.xml
- mountPath: /tmp/logback.xml
name: policy-logback
+ subPath: logback.xml
lifecycle:
postStart:
exec:
@@ -82,6 +85,7 @@ spec:
volumeMounts:
- mountPath: /usr/share/filebeat/filebeat.yml
name: filebeat-conf
+ subPath: filebeat.yml
- mountPath: /var/log/onap
name: policy-logs
- mountPath: /usr/share/filebeat/data
@@ -91,21 +95,22 @@ spec:
hostPath:
path: /etc/localtime
- name: filebeat-conf
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+ configMap:
+ name: policy-filebeat-configmap
- name: policy-logs
emptyDir: {}
- name: policy-data-filebeat
emptyDir: {}
- name: policy-logback
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/xacml-pap-rest/logback.xml
+ configMap:
+ name: policy-pap-log-configmap
- name: policy-sdk-logback
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/ep_sdk_app/logback.xml
+ configMap:
+ name: policy-sdk-log-configmap
- name: pe
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
+ configMap:
+ name: policy-dep-pe-configmap
+ defaultMode: 0755
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
#{{ end }}
diff --git a/kubernetes/policy/templates/dep-pdp.yaml b/kubernetes/policy/templates/dep-pdp.yaml
index 3763b95bb2..b62e280895 100644
--- a/kubernetes/policy/templates/dep-pdp.yaml
+++ b/kubernetes/policy/templates/dep-pdp.yaml
@@ -20,10 +20,6 @@ spec:
- /root/ready.py
args:
- --container-name
- - mariadb
- - --container-name
- - nexus
- - --container-name
- pap
env:
- name: NAMESPACE
@@ -59,6 +55,7 @@ spec:
name: policy-logs
- mountPath: /tmp/logback.xml
name: policy-logback
+ subPath: logback.xml
lifecycle:
postStart:
exec:
@@ -69,6 +66,7 @@ spec:
volumeMounts:
- mountPath: /usr/share/filebeat/filebeat.yml
name: filebeat-conf
+ subPath: filebeat.yml
- mountPath: /var/log/onap
name: policy-logs
- mountPath: /usr/share/filebeat/data
@@ -78,18 +76,19 @@ spec:
hostPath:
path: /etc/localtime
- name: filebeat-conf
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+ configMap:
+ name: policy-filebeat-configmap
- name: policy-logs
emptyDir: {}
- name: policy-data-filebeat
emptyDir: {}
- name: policy-logback
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/policy/xacml-pdp-rest/logback.xml
+ configMap:
+ name: policy-pdp-log-configmap
- name: pe
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
+ configMap:
+ name: policy-dep-pe-configmap
+ defaultMode: 0755
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
#{{ end }}
diff --git a/kubernetes/policy/templates/policy-deployment-configmap.yaml b/kubernetes/policy/templates/policy-deployment-configmap.yaml
new file mode 100644
index 0000000000..b1db02bd20
--- /dev/null
+++ b/kubernetes/policy/templates/policy-deployment-configmap.yaml
@@ -0,0 +1,19 @@
+#{{ if not .Values.disablePolicyDrools }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: policy-dep-drools-settings-configmap
+ namespace: {{ .Values.nsPrefix }}-policy
+data:
+{{ (.Files.Glob "resources/config/drools/settings.xml").AsConfig | indent 2 }}
+#{{ end }}
+---
+#{{ if not .Values.disablePolicyPdp }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: policy-dep-pe-configmap
+ namespace: {{ .Values.nsPrefix }}-policy
+data:
+{{ (.Files.Glob "resources/config/opt/policy/config/pe/*").AsConfig | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/policy/templates/policy-deployment-secret.yaml b/kubernetes/policy/templates/policy-deployment-secret.yaml
new file mode 100644
index 0000000000..99a807bddf
--- /dev/null
+++ b/kubernetes/policy/templates/policy-deployment-secret.yaml
@@ -0,0 +1,10 @@
+#{{ if not .Values.disablePolicyDrools }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: policy-dep-drools-secret
+ namespace: {{ .Values.nsPrefix }}-policy
+type: Opaque
+data:
+{{ tpl (.Files.Glob "resources/config/opt/policy/config/drools/*").AsSecrets . | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/policy/templates/policy-log-configmap.yaml b/kubernetes/policy/templates/policy-log-configmap.yaml
new file mode 100644
index 0000000000..24ad45e5f7
--- /dev/null
+++ b/kubernetes/policy/templates/policy-log-configmap.yaml
@@ -0,0 +1,45 @@
+#{{ if not .Values.disablePolicyPap }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: policy-pap-log-configmap
+ namespace: {{ .Values.nsPrefix }}-policy
+data:
+{{ (.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
+data:
+{{ (.Files.Glob "resources/config/log/ep_sdk_app/*").AsConfig | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: policy-filebeat-configmap
+ namespace: {{ .Values.nsPrefix }}-policy
+data:
+{{ (.Files.Glob "resources/config/log/filebeat/*").AsConfig | indent 2 }}
+#{{ end }}
+#{{ if not .Values.disablePolicyPdp }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: policy-pdp-log-configmap
+ namespace: {{ .Values.nsPrefix }}-policy
+data:
+{{ (.Files.Glob "resources/config/log/xacml-pdp-rest/*").AsConfig | indent 2 }}
+#{{ end }}
+#{{ if not .Values.disablePolicyDrools }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: policy-drools-log-configmap
+ namespace: {{ .Values.nsPrefix }}-policy
+data:
+{{ (.Files.Glob "resources/config/log/drools/*").AsConfig | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/policy/templates/policy-pv-pvc.yaml b/kubernetes/policy/templates/policy-pv-pvc.yaml
deleted file mode 100644
index 5dc0c61c43..0000000000
--- a/kubernetes/policy/templates/policy-pv-pvc.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
-#{{ if not .Values.disablePolicyMariadb }}
-apiVersion: v1
-kind: PersistentVolume
-metadata:
- name: "{{ .Values.nsPrefix }}-policy-db"
- namespace: "{{ .Values.nsPrefix }}-policy"
- labels:
- name: "{{ .Values.nsPrefix }}-policy-db"
-spec:
- capacity:
- storage: 2Gi
- accessModes:
- - ReadWriteMany
- persistentVolumeReclaimPolicy: Retain
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/mariadb/data/
----
-kind: PersistentVolumeClaim
-apiVersion: v1
-metadata:
- name: policy-db
- namespace: "{{ .Values.nsPrefix }}-policy"
-spec:
- accessModes:
- - ReadWriteMany
- resources:
- requests:
- storage: 2Gi
- selector:
- matchLabels:
- name: "{{ .Values.nsPrefix }}-policy-db"
-#{{ end }} \ No newline at end of file