Merge changes I24367eac,I8dab41ae
authorAlexis de Talhouët <alexis.de_talhouet@bell.ca>
Thu, 25 Jan 2018 13:26:22 +0000 (13:26 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 25 Jan 2018 13:26:22 +0000 (13:26 +0000)
* changes:
  AAF config seggregation
  Policy config segreggation

42 files changed:
kubernetes/aaf/resources/config/aaf-cs-data/ecomp.cql [moved from kubernetes/config/docker/init/src/config/aaf/data/ecomp.cql with 100% similarity]
kubernetes/aaf/resources/config/aaf-cs-data/identities.dat [moved from kubernetes/config/docker/init/src/config/aaf/data/identities.dat with 100% similarity]
kubernetes/aaf/resources/config/aaf-cs-data/identities.idx [moved from kubernetes/config/docker/init/src/config/aaf/data/identities.idx with 100% similarity]
kubernetes/aaf/resources/config/aaf-cs-data/init.cql [moved from kubernetes/config/docker/init/src/config/aaf/data/init.cql with 100% similarity]
kubernetes/aaf/resources/config/aaf-data/identities.dat [moved from kubernetes/config/docker/init/src/config/aaf/data2/identities.dat with 100% similarity]
kubernetes/aaf/templates/aaf-configmap.yaml [new file with mode: 0644]
kubernetes/aaf/templates/aaf-cs-deployment.yaml
kubernetes/aaf/templates/aaf-deployment.yaml
kubernetes/aaf/templates/aaf-secret.yaml [new file with mode: 0644]
kubernetes/policy/resources/config/drools/settings.xml [moved from kubernetes/config/docker/init/src/config/policy/drools/settings.xml with 100% similarity]
kubernetes/policy/resources/config/log/drools/logback.xml [moved from kubernetes/config/docker/init/src/config/log/policy/drools/logback.xml with 100% similarity]
kubernetes/policy/resources/config/log/ep_sdk_app/logback.xml [moved from kubernetes/config/docker/init/src/config/log/policy/ep_sdk_app/logback.xml with 100% similarity]
kubernetes/policy/resources/config/log/filebeat/filebeat.yml [new file with mode: 0644]
kubernetes/policy/resources/config/log/pypdpserver/logback.xml [moved from kubernetes/config/docker/init/src/config/log/policy/pypdpserver/logback.xml with 100% similarity]
kubernetes/policy/resources/config/log/xacml-pap-rest/logback.xml [moved from kubernetes/config/docker/init/src/config/log/policy/xacml-pap-rest/logback.xml with 100% similarity]
kubernetes/policy/resources/config/log/xacml-pdp-rest/logback.xml [moved from kubernetes/config/docker/init/src/config/log/policy/xacml-pdp-rest/logback.xml with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/drools/base.conf [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/base.conf with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/drools/drools-tweaks.sh [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/drools-tweaks.sh with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/drools/feature-healthcheck.conf [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/feature-healthcheck.conf with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/drools/policy-keystore [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/policy-keystore with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/drools/policy-management.conf [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/drools/policy-management.conf with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/pe/base.conf [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/base.conf with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/pe/brmsgw-tweaks.sh [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/brmsgw-tweaks.sh with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/pe/brmsgw.conf [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/brmsgw.conf with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/pe/console.conf [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/console.conf with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/pe/elk.conf [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/elk.conf with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/pe/mysql.conf [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/mysql.conf with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/pe/pap-tweaks.sh [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pap-tweaks.sh with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/pe/pap.conf [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pap.conf with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/pe/paplp.conf [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/paplp.conf with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/pe/pdp-tweaks.sh [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pdp-tweaks.sh with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/pe/pdp.conf [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pdp.conf with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/pe/pdplp.conf [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/pdplp.conf with 100% similarity]
kubernetes/policy/resources/config/opt/policy/config/pe/push-policies.sh [moved from kubernetes/config/docker/init/src/config/policy/opt/policy/config/pe/push-policies.sh with 100% similarity]
kubernetes/policy/templates/all-services.yaml
kubernetes/policy/templates/dep-brmsgw.yaml
kubernetes/policy/templates/dep-drools.yaml
kubernetes/policy/templates/dep-pap.yaml
kubernetes/policy/templates/dep-pdp.yaml
kubernetes/policy/templates/policy-deployment-configmap.yaml [new file with mode: 0644]
kubernetes/policy/templates/policy-deployment-secret.yaml [new file with mode: 0644]
kubernetes/policy/templates/policy-log-configmap.yaml [new file with mode: 0644]

diff --git a/kubernetes/aaf/templates/aaf-configmap.yaml b/kubernetes/aaf/templates/aaf-configmap.yaml
new file mode 100644 (file)
index 0000000..c8565f2
--- /dev/null
@@ -0,0 +1,9 @@
+#{{ if not .Values.disableAafAaf }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: aaf-data-configmap
+  namespace: {{ .Values.nsPrefix }}-aaf
+data:
+{{ (.Files.Glob "resources/config/aaf-data/*").AsConfig | indent 2 }}
+#{{ end }}
index acd6a7a..55619b3 100644 (file)
@@ -31,8 +31,8 @@ spec:
           periodSeconds: 10
       volumes:
         - name: aaf-cs-data
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/aaf/data
+          secret:
+            secretName: aaf-cs-data-secret
       imagePullSecrets:
       - name: {{ .Values.nsPrefix }}-docker-registry-key
-#{{ end }}
\ No newline at end of file
+#{{ end }}
index 6664f18..4f64048 100644 (file)
@@ -48,8 +48,8 @@ spec:
           periodSeconds: 10
       volumes:
         - name: aaf-data
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/aaf/data2
+          configMap:
+            name: aaf-data-configmap
       imagePullSecrets:
       - name: {{ .Values.nsPrefix }}-docker-registry-key
 #{{ end }}
diff --git a/kubernetes/aaf/templates/aaf-secret.yaml b/kubernetes/aaf/templates/aaf-secret.yaml
new file mode 100644 (file)
index 0000000..705d050
--- /dev/null
@@ -0,0 +1,10 @@
+#{{ if not .Values.disableAafAafCs }}
+apiVersion: v1
+kind: Secret
+metadata:
+  name: aaf-cs-data-secret
+  namespace: {{ .Values.nsPrefix }}-aaf
+type: Opaque
+data:
+{{ (.Files.Glob "resources/config/aaf-cs-data/*").AsSecrets | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/policy/resources/config/log/filebeat/filebeat.yml b/kubernetes/policy/resources/config/log/filebeat/filebeat.yml
new file mode 100644 (file)
index 0000000..f316b86
--- /dev/null
@@ -0,0 +1,41 @@
+filebeat.prospectors:
+#it is mandatory, in our case it's log
+- input_type: log
+  #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory.
+  paths:
+    - /var/log/onap/*/*/*/*.log
+    - /var/log/onap/*/*/*.log
+    - /var/log/onap/*/*.log
+  #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive
+  ignore_older: 48h
+  # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit
+  clean_inactive: 96h
+
+
+# Name of the registry file. If a relative path is used, it is considered relative to the
+# data path. Else full qualified file name.
+#filebeat.registry_file: ${path.data}/registry
+
+
+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"]
+  #If enable will do load balancing among availabe Logstash, automatically.
+  loadbalance: true
+
+  #The list of root certificates for server verifications.
+  #If certificate_authorities is empty or not set, the trusted
+  #certificate authorities of the host system are used.
+  #ssl.certificate_authorities: $ssl.certificate_authorities
+
+  #The path to the certificate for SSL client authentication. If the certificate is not specified,
+  #client authentication is not available.
+  #ssl.certificate: $ssl.certificate
+
+  #The client certificate key used for client authentication.
+  #ssl.key: $ssl.key
+
+  #The passphrase used to decrypt an encrypted key stored in the configured key file
+  #ssl.key_passphrase: $ssl.key_passphrase
index 5c5f683..c6b633e 100644 (file)
@@ -128,4 +128,4 @@ spec:
   selector:
     app: brmsgw
   type: NodePort
-#{{ end }}
\ No newline at end of file
+#{{ end }}
index 89752ae..667ccc6 100644 (file)
@@ -49,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 }}
index 83179fa..afa044a 100644 (file)
@@ -59,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:
@@ -73,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
@@ -82,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 }}
index a19fd24..d3d5ff3 100644 (file)
@@ -71,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:
@@ -83,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
@@ -92,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 }}
index 1f66396..b62e280 100644 (file)
@@ -55,6 +55,7 @@ spec:
           name: policy-logs
         - mountPath:  /tmp/logback.xml
           name: policy-logback
+          subPath: logback.xml
         lifecycle:
           postStart:
             exec:
@@ -65,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
@@ -74,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 (file)
index 0000000..b1db02b
--- /dev/null
@@ -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 (file)
index 0000000..99a807b
--- /dev/null
@@ -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 (file)
index 0000000..24ad45e
--- /dev/null
@@ -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 }}