Fix eleastisearch field limit 07/83207/1
authorNorm Traxler <normant@amdocs.com>
Mon, 25 Mar 2019 14:00:24 +0000 (15:00 +0100)
committerNorm Traxler <normant@amdocs.com>
Mon, 25 Mar 2019 14:00:38 +0000 (15:00 +0100)
Issue-ID: LOG-1030

Change-Id: I5cad4758907ad1df55761c883693ba0571ab7de0
Signed-off-by: Norm Traxler <normant@amdocs.com>
kubernetes/pomba/charts/pomba-kibana/resources/config/validationsDump.json [deleted file]
kubernetes/pomba/charts/pomba-kibana/resources/config/violationsDump.json [deleted file]
kubernetes/pomba/charts/pomba-kibana/templates/deployment.yaml
kubernetes/pomba/charts/pomba-search-data/resources/config/es-payload-translation.json

diff --git a/kubernetes/pomba/charts/pomba-kibana/resources/config/validationsDump.json b/kubernetes/pomba/charts/pomba-kibana/resources/config/validationsDump.json
deleted file mode 100644 (file)
index ae01e96..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-{
-  "service-validations": {
-    "mappings": {
-      "default": {
-        "properties": {
-          "modelInvariantId": {
-            "type": "text"
-          },
-          "modelName": {
-            "type": "text"
-          },
-          "modelVersionId": {
-            "type": "text"
-          },
-          "result": {
-            "type": "text"
-          },
-          "serviceInstanceId": {
-            "type": "text"
-          },
-          "validationId": {
-            "type": "text"
-          },
-          "validationTimestamp": {
-            "type": "date",
-            "format": "MMM d y HH:m:s||dd-MM-yyyy HH:mm:ss||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||MM/dd/yyyy||yyyyMMdd'T'HHmmssZ"
-          },
-          "violations": {
-            "type": "nested",
-            "properties": {
-              "category": {
-                "type": "text"
-              },
-              "errorMessage": {
-                "type": "text"
-              },
-              "modelName": {
-                "type": "text"
-              },
-              "severity": {
-                "type": "text"
-              },
-              "validationRule": {
-                "type": "text"
-              },
-              "violationDetails": {
-                "properties": {
-                  "context-list-aai-vf-list[*]": {
-                    "properties": {
-                      "invariant-id": {
-                        "type": "text"
-                      },
-                      "name": {
-                        "type": "text"
-                      },
-                      "nf-naming-code": {
-                        "type": "text"
-                      },
-                      "type": {
-                        "type": "text"
-                      },
-                      "uuid": {
-                        "type": "text"
-                      },
-                      "vf-module-list": {
-                        "properties": {
-                          "invariant-id": {
-                            "type": "text"
-                          },
-                          "max-instances": {
-                            "type": "long"
-                          },
-                          "min-instances": {
-                            "type": "long"
-                          },
-                          "uuid": {
-                            "type": "text"
-                          }
-                        }
-                      },
-                      "vnfc-list": {
-                        "properties": {
-                          "name": {
-                            "type": "text"
-                          },
-                          "nfc-naming-code": {
-                            "type": "text"
-                          }
-                        }
-                      }
-                    }
-                  },
-                  "context-list-aai-vf-list[*]-name": {
-                    "type": "text"
-                  },
-                  "context-list-aai-vf-list[*]-type": {
-                    "type": "text"
-                  },
-                  "context-list-aai-vf[*]-name": {
-                    "type": "text"
-                  },
-                  "context-list-aai-vf[*]-type": {
-                    "type": "text"
-                  },
-                  "context-list-sdc-service-name": {
-                    "type": "text"
-                  },
-                  "context-list-sdc-vf-list[*]": {
-                    "properties": {
-                      "invariant-id": {
-                        "type": "text"
-                      },
-                      "name": {
-                        "type": "text"
-                      },
-                      "type": {
-                        "type": "text"
-                      },
-                      "uuid": {
-                        "type": "text"
-                      },
-                      "vf-module-list": {
-                        "properties": {
-                          "invariant-id": {
-                            "type": "text"
-                          },
-                          "max-instances": {
-                            "type": "long"
-                          },
-                          "min-instances": {
-                            "type": "long"
-                          },
-                          "uuid": {
-                            "type": "text"
-                          }
-                        }
-                      },
-                      "vnfc-list": {
-                        "properties": {
-                          "invariant-id": {
-                            "type": "text"
-                          },
-                          "name": {
-                            "type": "text"
-                          },
-                          "nfc-naming-code": {
-                            "type": "text"
-                          },
-                          "uuid": {
-                            "type": "text"
-                          }
-                        }
-                      }
-                    }
-                  },
-                  "context-list-sdnc-vf-list[*]-name": {
-                    "type": "text"
-                  },
-                  "context-list-sdnc-vf-list[*]-type": {
-                    "type": "text"
-                  },
-                  "context-list-sdnc-vf[*]-name": {
-                    "type": "text"
-                  },
-                  "context-list-sdnc-vf[*]-type": {
-                    "type": "text"
-                  }
-                }
-              },
-              "violationId": {
-                "type": "text"
-              },
-              "violationTimestamp": {
-                "type": "date",
-                "format": "MMM d y HH:m:s||dd-MM-yyyy HH:mm:ss||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||MM/dd/yyyy||yyyyMMdd'T'HHmmssZ"
-              },
-              "violationType": {
-                "type": "text"
-              }
-            }
-          },
-          "client": {
-            "type": "text"
-          },
-          "requestId": {
-            "type": "text"
-          }
-        }
-      }
-    }
-  }
-}
diff --git a/kubernetes/pomba/charts/pomba-kibana/resources/config/violationsDump.json b/kubernetes/pomba/charts/pomba-kibana/resources/config/violationsDump.json
deleted file mode 100644 (file)
index 790f8c7..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-{
-  "service-violations": {
-    "mappings": {
-      "default": {
-        "properties": {
-          "category": {
-            "type": "text"
-          },
-          "message": {
-            "type": "text"
-          },
-          "modelInvariantId": {
-            "type": "text"
-          },
-          "modelVersionId": {
-            "type": "text"
-          },
-          "serviceInstanceId": {
-            "type": "text"
-          },
-          "severity": {
-            "type": "text"
-          },
-          "validationId": {
-            "type": "text"
-          },
-          "validationRule": {
-            "type": "text"
-          },
-          "validationTimestamp": {
-            "type": "date",
-            "format": "MMM d y HH:m:s||dd-MM-yyyy HH:mm:ss||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||MM/dd/yyyy||yyyyMMdd'T'HHmmssZ"
-          },
-          "violationId": {
-            "type": "text"
-          },
-          "violationTimestamp": {
-            "type": "date",
-            "format": "MMM d y HH:m:s||dd-MM-yyyy HH:mm:ss||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||MM/dd/yyyy||yyyyMMdd'T'HHmmssZ"
-          },
-          "violationType": {
-            "type": "text"
-          }
-        }
-      }
-    }
-  }
-}
\ No newline at end of file
index 2bc9e79..58a0a90 100644 (file)
@@ -79,40 +79,6 @@ spec:
           - mountPath: /config/default.json
             name: {{ include "common.fullname" . }}
             subPath: default.json
-      - args:
-        - --output=http://{{.Values.config.elasticsearchServiceName}}.{{ include "common.namespace" . }}:{{.Values.config.elasticsearchPort}}/service-validations
-        - --input=/config/validationsDump.json
-        - --type=mapping
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: "{{ .Values.configRepository }}/{{ .Values.configImage }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        name: {{ include "common.name" . }}-config-validation
-        volumeMounts:
-          - mountPath: /config/validationsDump.json
-            name: {{ include "common.fullname" . }}
-            subPath: validationsDump.json
-      - args:
-        - --output=http://{{.Values.config.elasticsearchServiceName}}.{{ include "common.namespace" . }}:{{.Values.config.elasticsearchPort}}/service-violations
-        - --input=/config/violationsDump.json
-        - --type=mapping
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: "{{ .Values.configRepository }}/{{ .Values.configImage }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        name: {{ include "common.name" . }}-config-violation
-        volumeMounts:
-          - mountPath: /config/violationsDump.json
-            name: {{ include "common.fullname" . }}
-            subPath: violationsDump.json            
       containers:
         - name: {{ include "common.name" . }}
           image: "{{ .Values.global.loggingRepository | default .Values.loggingRepository }}/{{ .Values.image }}"
@@ -175,10 +141,6 @@ spec:
               path: kibana.yml
             - key: default.json
               path: default.json
-            - key: validationsDump.json
-              path: validationsDump.json
-            - key: violationsDump.json
-              path: violationsDump.json
             - key: default-mapping.json
               path: default-mapping.json
         - name: {{ include "common.fullname" . }}-auth
index de8bacf..58ed8f6 100644 (file)
@@ -1,19 +1,16 @@
 {
-  "attr-translations": [{
-      "from": "\"type\":\"string\",\"index\":\"analyzed\"",
-      "to": "\"type\":\"text\",\"index\":\"true\""
-    },
+  "attr-translations": [       
     {
-      "from": "\"type\":\"string\",\"index\":\"not_analyzed\"",
-      "to": "\"type\":\"keyword\",\"index\":\"true\""
+      "query": "$..[?(@.type=='string' && @.index=='analyzed')]",
+      "update": {"type": "text", "index": true, "fielddata": true}
     },
     {
-      "from": "\"type\":\"string\"",
-      "to": "\"type\":\"text\""
+      "query": "$..[?(@.type=='string' && @.index=='not_analyzed')]",
+      "update": {"type": "keyword", "index": true}
     },
     {
-      "from": "searchable",
-      "to": "index"
+      "query": "$..[?(@.type=='string' && !@.index)]",
+      "update": {"type": "text", "fielddata": true}
     }
   ]
 }
\ No newline at end of file