Add standardized helm chart for log 01/38301/5
authorBorislavG <Borislav.Glozman@amdocs.com>
Sun, 25 Mar 2018 15:12:38 +0000 (18:12 +0300)
committerBorislavG <Borislav.Glozman@amdocs.com>
Tue, 27 Mar 2018 08:42:25 +0000 (11:42 +0300)
Change-Id: Ic9f0eb567716224893955d9379e9ed9308b9ea79
Issue-ID: OOM-740
Signed-off-by: BorislavG <Borislav.Glozman@amdocs.com>
60 files changed:
kubernetes/aai/resources/config/log/filebeat/filebeat.yml
kubernetes/aai/values.yaml
kubernetes/appc/resources/config/log/filebeat/log4j/filebeat.yml
kubernetes/appc/values.yaml
kubernetes/esr/resources/config/log/filebeat/filebeat.yml
kubernetes/esr/values.yaml
kubernetes/log/.helmignore [new file with mode: 0644]
kubernetes/log/Chart.yaml
kubernetes/log/charts/log-elasticsearch/Chart.yaml [new file with mode: 0644]
kubernetes/log/charts/log-elasticsearch/requirements.yaml [new file with mode: 0644]
kubernetes/log/charts/log-elasticsearch/resources/config/elasticsearch.yml [moved from kubernetes/log/resources/elasticsearch/conf/elasticsearch.yml with 98% similarity]
kubernetes/log/charts/log-elasticsearch/templates/NOTES.txt [new file with mode: 0644]
kubernetes/log/charts/log-elasticsearch/templates/configmap.yaml [new file with mode: 0644]
kubernetes/log/charts/log-elasticsearch/templates/deployment.yaml [new file with mode: 0644]
kubernetes/log/charts/log-elasticsearch/templates/pv.yaml [new file with mode: 0644]
kubernetes/log/charts/log-elasticsearch/templates/pvc.yaml [new file with mode: 0644]
kubernetes/log/charts/log-elasticsearch/templates/service.yaml [new file with mode: 0644]
kubernetes/log/charts/log-elasticsearch/values.yaml [new file with mode: 0644]
kubernetes/log/charts/log-kibana/Chart.yaml [new file with mode: 0644]
kubernetes/log/charts/log-kibana/requirements.yaml [new file with mode: 0644]
kubernetes/log/charts/log-kibana/resources/config/kibana.yml [moved from kubernetes/log/resources/kibana/conf/kibana.yml with 95% similarity]
kubernetes/log/charts/log-kibana/templates/NOTES.txt [new file with mode: 0644]
kubernetes/log/charts/log-kibana/templates/configmap.yaml [new file with mode: 0644]
kubernetes/log/charts/log-kibana/templates/deployment.yaml [new file with mode: 0644]
kubernetes/log/charts/log-kibana/templates/service.yaml [new file with mode: 0644]
kubernetes/log/charts/log-kibana/values.yaml [new file with mode: 0644]
kubernetes/log/charts/log-logstash/Chart.yaml [new file with mode: 0644]
kubernetes/log/charts/log-logstash/requirements.yaml [new file with mode: 0644]
kubernetes/log/charts/log-logstash/resources/config/logstash.yml [moved from kubernetes/log/resources/logstash/conf/logstash.yml with 99% similarity]
kubernetes/log/charts/log-logstash/resources/config/onap-pipeline.conf [moved from kubernetes/log/resources/logstash/pipeline/onap-pipeline.conf with 95% similarity]
kubernetes/log/charts/log-logstash/templates/NOTES.txt [new file with mode: 0644]
kubernetes/log/charts/log-logstash/templates/configmap.yaml [new file with mode: 0644]
kubernetes/log/charts/log-logstash/templates/deployment.yaml [new file with mode: 0644]
kubernetes/log/charts/log-logstash/templates/service.yaml [new file with mode: 0644]
kubernetes/log/charts/log-logstash/values.yaml [new file with mode: 0644]
kubernetes/log/requirements.yaml [new file with mode: 0644]
kubernetes/log/templates/all-services.yaml [deleted file]
kubernetes/log/templates/elasticsearch-deployment.yaml [deleted file]
kubernetes/log/templates/kibana-deployment.yaml [deleted file]
kubernetes/log/templates/log-pv-pvc.yaml [deleted file]
kubernetes/log/templates/logstash-deployment.yaml [deleted file]
kubernetes/log/values.yaml
kubernetes/mso/resources/config/log/filebeat/filebeat.yml
kubernetes/mso/values.yaml
kubernetes/multicloud/resources/config/log/filebeat/filebeat.yml
kubernetes/multicloud/values.yaml
kubernetes/onap/requirements.yaml
kubernetes/onap/values.yaml
kubernetes/policy/resources/config/log/filebeat/filebeat.yml
kubernetes/policy/values.yaml
kubernetes/portal/resources/config/log/filebeat/filebeat.yml
kubernetes/portal/values.yaml
kubernetes/sdc/resources/config/log/filebeat/filebeat.yml
kubernetes/sdc/values.yaml
kubernetes/sdnc/resources/config/log/filebeat/log4j/filebeat.yml
kubernetes/sdnc/values.yaml
kubernetes/so/resources/config/log/filebeat/filebeat.yml
kubernetes/so/values.yaml
kubernetes/vid/resources/config/log/filebeat/filebeat.yml
kubernetes/vid/values.yaml

index 89c6932..b0d4690 100644 (file)
@@ -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.{{.Values.nsPrefix}}:5044"]
+  hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"]
   #If enable will do load balancing among availabe Logstash, automatically.
   loadbalance: true
 
index e283cb6..eaeaa2e 100644 (file)
@@ -74,3 +74,7 @@ persistence:
   mountPath: /dockerdata-nfs
   mountSubPath: aai/data-router/logs
 
+config:
+  logstashServiceName: log-ls
+  logstashPort: 5044
+
index 52161aa..49d818a 100644 (file)
@@ -29,7 +29,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.{{.Release.Namespace}}:5044"]
+  hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"]
   #If enable will do load balancing among availabe Logstash, automatically.
   loadbalance: true
 
index e31980a..b5a13ef 100644 (file)
@@ -43,6 +43,8 @@ config:
   enableClustering: true
   configDir: /opt/onap/appc/data/properties
   dmaapTopic: SUCCESS
+  logstashServiceName: log-ls
+  logstashPort: 5044
 
 mysql:
   nameOverride: appc-db
index 16c7943..49197d3 100644 (file)
@@ -22,7 +22,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.{{.Values.nsPrefix}}:5044"]
+  hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"]
   #If enable will do load balancing among availabe Logstash, automatically.
   loadbalance: true
 
index 5253d9a..82aa334 100644 (file)
@@ -26,3 +26,8 @@ esrgui:
   replicas: 1
 filebeat:
   image: docker.elastic.co/beats/filebeat:5.5.0
+
+config:
+  logstashServiceName: log-ls
+  logstashPort: 5044
+
diff --git a/kubernetes/log/.helmignore b/kubernetes/log/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
index 9612413..9b902e8 100644 (file)
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: A Helm chart for Kubernetes
+description: ONAP Logging ElasticStack
 name: log
-version: 0.1.0
+version: 2.0.0
diff --git a/kubernetes/log/charts/log-elasticsearch/Chart.yaml b/kubernetes/log/charts/log-elasticsearch/Chart.yaml
new file mode 100644 (file)
index 0000000..5d233b4
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright © 2017 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
+description: ONAP Logging Elasticsearch
+name: log-elasticsearch
+version: 2.0.0
diff --git a/kubernetes/log/charts/log-elasticsearch/requirements.yaml b/kubernetes/log/charts/log-elasticsearch/requirements.yaml
new file mode 100644 (file)
index 0000000..1e8f788
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright © 2017 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.
+
+dependencies:
+  - name: common
+    version: ~2.0.0
+    repository: '@local'
\ No newline at end of file
@@ -111,12 +111,12 @@ discovery.zen.minimum_master_nodes: 1
 #action.destructive_requires_name: true
 # Set a custom port for HTTP: If required, default is 9200-9300
 # This is used for REST APIs
-http.port: 9200
+http.port: {{.Values.service.externalPort}}
 # Port to bind for communication between nodes. Accepts a single value or a range.
 # If a range is specified, the node will bind to the first available port in the range.
 # Defaults to 9300-9400.
 # More info:
-transport.tcp.port: 9300
+transport.tcp.port: {{.Values.service.externalPortTcp}}
 
 xpack.graph.enabled: false
 #Set to false to disable X-Pack graph features.
diff --git a/kubernetes/log/charts/log-elasticsearch/templates/NOTES.txt b/kubernetes/log/charts/log-elasticsearch/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..0878f5c
--- /dev/null
@@ -0,0 +1,19 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+  http://{{ . }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+  echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
+{{- end }}
diff --git a/kubernetes/log/charts/log-elasticsearch/templates/configmap.yaml b/kubernetes/log/charts/log-elasticsearch/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..4ccc7cc
--- /dev/null
@@ -0,0 +1,21 @@
+# Copyright © 2017 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: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file
diff --git a/kubernetes/log/charts/log-elasticsearch/templates/deployment.yaml b/kubernetes/log/charts/log-elasticsearch/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..13caa7e
--- /dev/null
@@ -0,0 +1,117 @@
+# Copyright © 2017 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: 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:
+      initContainers:
+      - command:
+        - /bin/sh
+        - -c
+        - |
+          sysctl -w vm.max_map_count=262144
+          mkdir -p /logroot/elasticsearch/logs
+          mkdir -p /logroot/elasticsearch/data
+          chmod -R 777 /logroot/elasticsearch
+          chown -R root:root /logroot
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        securityContext:
+          privileged: true
+        image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.busyboxImage }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: init-sysctl
+        volumeMounts:
+        - name: {{ include "common.fullname" . }}-logs
+          mountPath: /logroot/
+      containers:
+        - name: {{ include "common.name" . }}
+          image: "{{ .Values.global.loggingRepository | default .Values.loggingRepository }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+            name: {{ .Values.service.name }}
+          - containerPort: {{ .Values.service.internalPortTcp }}
+            name: {{ .Values.service.name }}-tcp
+# 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.internalPortTcp }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+          env:
+          volumeMounts:
+          - mountPath: /etc/localtime
+            name: localtime
+            readOnly: true
+          - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
+            name: {{ include "common.fullname" . }}-config
+            subPath: elasticsearch.yml
+          - mountPath: /usr/share/elasticsearch/data/
+            name: {{ include "common.fullname" . }}-data
+          resources:
+{{ toYaml .Values.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: {{ include "common.fullname" . }}-config
+          configMap:
+            name: {{ include "common.fullname" . }}-configmap
+            items:
+            - key: elasticsearch.yml
+              path: elasticsearch.yml
+        - name: {{ include "common.fullname" . }}-data
+          persistentVolumeClaim:
+            claimName: {{ include "common.fullname" . }}
+        - name: {{ include "common.fullname" . }}-logs
+          hostPath:
+            path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPathLogs }}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/log/charts/log-elasticsearch/templates/pv.yaml b/kubernetes/log/charts/log-elasticsearch/templates/pv.yaml
new file mode 100644 (file)
index 0000000..dba12d4
--- /dev/null
@@ -0,0 +1,21 @@
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolume
+apiVersion: v1
+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 }}"
+    name: {{ include "common.fullname" . }}
+spec:
+  capacity:
+    storage: {{ .Values.persistence.size}}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
+  hostPath:
+    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}
+{{- end -}}
diff --git a/kubernetes/log/charts/log-elasticsearch/templates/pvc.yaml b/kubernetes/log/charts/log-elasticsearch/templates/pvc.yaml
new file mode 100644 (file)
index 0000000..c046f46
--- /dev/null
@@ -0,0 +1,25 @@
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+{{- if .Values.persistence.annotations }}
+  annotations:
+{{ toYaml .Values.persistence.annotations | indent 4 }}
+{{- end }}
+spec:
+  selector:
+    matchLabels:
+      name: {{ include "common.fullname" . }}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  resources:
+    requests:
+      storage: {{ .Values.persistence.size }}
+{{- end -}}
diff --git a/kubernetes/log/charts/log-elasticsearch/templates/service.yaml b/kubernetes/log/charts/log-elasticsearch/templates/service.yaml
new file mode 100644 (file)
index 0000000..72dfc7e
--- /dev/null
@@ -0,0 +1,46 @@
+# Copyright © 2017 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: Service
+metadata:
+  name: {{ .Values.service.name }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.externalPort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}
+    - port: {{ .Values.service.internalPortTcp }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.externalPortTcp }}
+      name: {{ .Values.service.name }}-tcp
+    {{- else -}}
+    - port: {{ .Values.service.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+    - port: {{ .Values.service.externalPortTcp }}
+      targetPort: {{ .Values.service.internalPortTcp }}
+      name: {{ .Values.service.name }}-tcp
+    {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
diff --git a/kubernetes/log/charts/log-elasticsearch/values.yaml b/kubernetes/log/charts/log-elasticsearch/values.yaml
new file mode 100644 (file)
index 0000000..2e6e085
--- /dev/null
@@ -0,0 +1,114 @@
+# Copyright © 2017 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.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  persistence: {}
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+
+# BusyBox image
+busyboxRepository: registry.hub.docker.com
+busyboxImage: library/busybox:latest
+
+# application image
+loggingRepository: docker.elastic.co
+image: elasticsearch/elasticsearch:5.5.0
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+# Example:
+config: {}
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+## Persist data to a persitent volume
+persistence:
+  enabled: true
+
+  ## A manually managed Persistent Volume and Claim
+  ## Requires persistence.enabled: true
+  ## If defined, PVC must be created manually before volume will be bound
+  # existingClaim:
+  volumeReclaimPolicy: Retain
+
+  ## database data Persistent Volume Storage Class
+  ## If defined, storageClassName: <storageClass>
+  ## If set to "-", storageClassName: "", which disables dynamic provisioning
+  ## If undefined (the default) or set to null, no storageClassName spec is
+  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+  ##   GKE, AWS & OpenStack)
+  accessMode: ReadWriteMany
+  size: 1Gi
+  mountPath: /dockerdata-nfs
+  mountSubPath: log/elasticsearch/data
+  mountSubPathLogs: log
+
+service:
+  #Example service definition with external, internal and node ports.
+  #Services may use any combination of ports depending on the 'type' of
+  #service being defined.
+  type: ClusterIP
+  name: log-es
+  externalPort: 9200
+  internalPort: 9200
+  externalPortTcp: 9300
+  internalPortTcp: 9300
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/log/charts/log-kibana/Chart.yaml b/kubernetes/log/charts/log-kibana/Chart.yaml
new file mode 100644 (file)
index 0000000..74f2c2b
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright © 2017 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
+description: ONAP Logging Kibana
+name: log-kibana
+version: 2.0.0
diff --git a/kubernetes/log/charts/log-kibana/requirements.yaml b/kubernetes/log/charts/log-kibana/requirements.yaml
new file mode 100644 (file)
index 0000000..1e8f788
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright © 2017 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.
+
+dependencies:
+  - name: common
+    version: ~2.0.0
+    repository: '@local'
\ No newline at end of file
@@ -11,7 +11,7 @@ xpack.security.enabled: false
 xpack.watcher.enabled: false
 #Set to false to disable Watcher.
 # Kibana is served by a back end server. This setting specifies the port to use.
-server.port: 5601
+server.port: {{.Values.service.externalPort}}
 
 # Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
 # The default is 'localhost', which usually means remote machines will not be able to connect.
@@ -30,10 +30,7 @@ server.host: "0"
 server.name: "Kibana"
 
 # The URL of the Elasticsearch instance to use for all your queries.
-# OOM-427, OOM-441 hardcoded onap workspace to avoid helm upgrade past 2.3
-elasticsearch.url: "http://elasticsearch.{{.Values.nsPrefix}}:9200"
-#elasticsearch-service.{{.Values.nsPrefix}}:9200"
-#elasticsearch.url: "http://10.247.47.3:9200"
+elasticsearch.url: "http://{{.Values.config.elasticsearchServiceName}}.{{.Release.Namespace}}:{{.Values.config.elasticsearchPort}}"
 # When this setting's value is true Kibana uses the hostname specified in the server.host
 # setting. When the value of this setting is false, Kibana uses the hostname of the host
 # that connects to this Kibana instance.
diff --git a/kubernetes/log/charts/log-kibana/templates/NOTES.txt b/kubernetes/log/charts/log-kibana/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..0878f5c
--- /dev/null
@@ -0,0 +1,19 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+  http://{{ . }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+  echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
+{{- end }}
diff --git a/kubernetes/log/charts/log-kibana/templates/configmap.yaml b/kubernetes/log/charts/log-kibana/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..fd8934b
--- /dev/null
@@ -0,0 +1,21 @@
+# Copyright © 2017 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: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/log/charts/log-kibana/templates/deployment.yaml b/kubernetes/log/charts/log-kibana/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..bdd5a44
--- /dev/null
@@ -0,0 +1,98 @@
+# Copyright © 2017 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: 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:
+      initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - log-elasticsearch
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-readiness
+      containers:
+        - name: {{ include "common.name" . }}
+          image: "{{ .Values.global.loggingRepository | default .Values.loggingRepository }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+            name: {{ .Values.service.name }}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+# 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 -}}
+          env:
+          volumeMounts:
+          - mountPath: /etc/localtime
+            name: localtime
+            readOnly: true
+          - mountPath: /usr/share/kibana/config/kibana.yml
+            name: {{ include "common.fullname" . }}
+            subPath: kibana.yml
+          resources:
+{{ toYaml .Values.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: {{ include "common.fullname" . }}
+          configMap:
+            name: {{ include "common.fullname" . }}
+            items:
+            - key: kibana.yml
+              path: kibana.yml
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/log/charts/log-kibana/templates/service.yaml b/kubernetes/log/charts/log-kibana/templates/service.yaml
new file mode 100644 (file)
index 0000000..d758c99
--- /dev/null
@@ -0,0 +1,40 @@
+# Copyright © 2017 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: Service
+metadata:
+  name: {{ .Values.service.name }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.externalPort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}
+    {{- else -}}
+    - port: {{ .Values.service.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+    {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
diff --git a/kubernetes/log/charts/log-kibana/values.yaml b/kubernetes/log/charts/log-kibana/values.yaml
new file mode 100644 (file)
index 0000000..50c6e52
--- /dev/null
@@ -0,0 +1,94 @@
+# Copyright © 2017 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.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.1.0
+  persistence: {}
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+
+# BusyBox image
+busyboxRepository: registry.hub.docker.com
+busyboxImage: library/busybox:latest
+
+# application image
+loggingRepository: docker.elastic.co
+image: kibana/kibana:5.5.0
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+config:
+  elasticsearchServiceName: log-es
+  elasticsearchPort: 9200
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 120
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  #Example service definition with external, internal and node ports.
+  #Services may use any combination of ports depending on the 'type' of
+  #service being defined.
+  type: NodePort
+  name: log-kibana
+  externalPort: 5601
+  internalPort: 5601
+  nodePort: 53
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/log/charts/log-logstash/Chart.yaml b/kubernetes/log/charts/log-logstash/Chart.yaml
new file mode 100644 (file)
index 0000000..3aab337
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright © 2017 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
+description: ONAP Logging Logstash
+name: log-logstash
+version: 2.0.0
diff --git a/kubernetes/log/charts/log-logstash/requirements.yaml b/kubernetes/log/charts/log-logstash/requirements.yaml
new file mode 100644 (file)
index 0000000..1e8f788
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright © 2017 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.
+
+dependencies:
+  - name: common
+    version: ~2.0.0
+    repository: '@local'
\ No newline at end of file
@@ -1,14 +1,14 @@
 http.host: "0.0.0.0"
 ## Path where pipeline configurations reside
 path.config: /usr/share/logstash/pipeline
+
 ## Type of queue : memeory based or file based
 #queue.type: persisted
 ## Size of queue
 #queue.max_bytes: 1024mb
 ## Setting true makes logstash check periodically for change in pipeline configurations
 config.reload.automatic: true
-  
+
 ## xpack configurations
 #xpack.monitoring.elasticsearch.url: ["http://10.247.186.12:9200", "http://10.247.186.13:9200"]
 #xpack.monitoring.elasticsearch.username: elastic
@@ -7,7 +7,7 @@ input {
  ######## Connection configurations ########
 
  ## The port to listen on.
- port => 5044
+ port => {{.Values.service.externalPort}}
 
  ## Close Idle clients after the specified time in seconds. Default is 60 seconds
  #client_inactivity_timeout => 60
@@ -222,10 +222,8 @@ output {
 
  ######### Elasticsearchcluster and host configurations #########
 
-#can specify one or a list of hosts. If sniffing is set, one is enough and others will be auto-discovered
-##Also protocol can be specified like ["http://10.247.186.12:9200"]
-## OOM-427, OOM-441 hardcoded onap workspace to avoid helm upgrade past 2.3
- hosts => ["http://elasticsearch.{{.Values.nsPrefix}}:9200"]
+ ##can specify one or a list of hosts. If sniffing is set, one is enough and others will be auto-discovered
+ hosts => ["http://{{.Values.config.elasticsearchServiceName}}.{{.Release.Namespace}}:{{.Values.config.elasticsearchPort}}"]
 
 
  ## This setting asks Elasticsearch for the list of all cluster nodes and adds them to the hosts list. Default is false.
diff --git a/kubernetes/log/charts/log-logstash/templates/NOTES.txt b/kubernetes/log/charts/log-logstash/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..0878f5c
--- /dev/null
@@ -0,0 +1,19 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+  http://{{ . }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+  echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
+{{- end }}
diff --git a/kubernetes/log/charts/log-logstash/templates/configmap.yaml b/kubernetes/log/charts/log-logstash/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..fd8934b
--- /dev/null
@@ -0,0 +1,21 @@
+# Copyright © 2017 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: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/log/charts/log-logstash/templates/deployment.yaml b/kubernetes/log/charts/log-logstash/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..682c448
--- /dev/null
@@ -0,0 +1,105 @@
+# Copyright © 2017 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: 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:
+      initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - log-elasticsearch
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-readiness
+      containers:
+        - name: {{ include "common.name" . }}
+          image: "{{ .Values.global.loggingRepository| default .Values.loggingRepository }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+            name: {{ .Values.service.name }}
+          - containerPort: {{ .Values.service.internalPortHttp }}
+            name: {{ .Values.service.name }}-http
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+# 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 -}}
+          env:
+          volumeMounts:
+          - mountPath: /etc/localtime
+            name: localtime
+            readOnly: true
+          - mountPath: /usr/share/logstash/config/logstash.yml
+            name: {{ include "common.fullname" . }}
+            subPath: logstash.yml
+          - mountPath: /usr/share/logstash/pipeline/onap-pipeline.conf
+            name: {{ include "common.fullname" . }}
+            subPath: onap-pipeline.conf
+          resources:
+{{ toYaml .Values.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: {{ include "common.fullname" . }}
+          configMap:
+            name: {{ include "common.fullname" . }}
+            items:
+            - key: logstash.yml
+              path: logstash.yml
+            - key: onap-pipeline.conf
+              path: onap-pipeline.conf
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/log/charts/log-logstash/templates/service.yaml b/kubernetes/log/charts/log-logstash/templates/service.yaml
new file mode 100644 (file)
index 0000000..ca71aa2
--- /dev/null
@@ -0,0 +1,46 @@
+# Copyright © 2017 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: Service
+metadata:
+  name: {{ .Values.service.name }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.externalPort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}
+    - port: {{ .Values.service.internalPortHttp }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.externalPortHttp }}
+      name: {{ .Values.service.name }}-http
+    {{- else -}}
+    - port: {{ .Values.service.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+    - port: {{ .Values.service.externalPortHttp }}
+      targetPort: {{ .Values.service.internalPortHttp }}
+      name: {{ .Values.service.name }}-http
+    {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
diff --git a/kubernetes/log/charts/log-logstash/values.yaml b/kubernetes/log/charts/log-logstash/values.yaml
new file mode 100644 (file)
index 0000000..bfe50b5
--- /dev/null
@@ -0,0 +1,91 @@
+# Copyright © 2017 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.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.1.0
+  persistence: {}
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+
+# application image
+loggingRepository: docker.elastic.co
+image: logstash/logstash:5.4.3
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+config:
+  elasticsearchServiceName: log-es
+  elasticsearchPort: 9200
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 120
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  #Example service definition with external, internal and node ports.
+  #Services may use any combination of ports depending on the 'type' of
+  #service being defined.
+  type: ClusterIP
+  name: log-ls
+  externalPort: 5044
+  internalPort: 5044
+  externalPortHttp: 9600
+  internalPortHttp: 9600
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/log/requirements.yaml b/kubernetes/log/requirements.yaml
new file mode 100644 (file)
index 0000000..acca8ef
--- /dev/null
@@ -0,0 +1,4 @@
+dependencies:
+  - name: common
+    version: ~2.0.0
+    repository: '@local'
\ No newline at end of file
diff --git a/kubernetes/log/templates/all-services.yaml b/kubernetes/log/templates/all-services.yaml
deleted file mode 100644 (file)
index 389e7e4..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright © 2017 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.
-
-#{{ if not .Values.disableLogElasticsearch }}
-apiVersion: v1
-kind: Service
-metadata:
-  labels:
-    app: elasticsearch
-  name: elasticsearch
-  namespace: {{ .Values.nsPrefix }}
-spec:
-  ports:
-  - name: http
-    port: 9200
-    targetPort: 9200
-    nodePort: {{ .Values.nodePortPrefix }}54
-  selector:
-    app: elasticsearch
-  type: NodePort
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: elasticsearchtcp
-  namespace: {{ .Values.nsPrefix }}
-  labels:
-    app: elasticsearch
-spec:
-  ports:
-  - name: tcp
-    port: 9300
-    targetPort: 9300
-  selector:
-    app: elasticsearch
-#{{ end }}
-#{{ if not .Values.disableLogLogstash }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: logstashinternal
-  namespace: {{ .Values.nsPrefix }}
-  labels:
-    app: logstash
-spec:
-  ports:
-  - name: http
-    port: 9600
-    targetPort: 9600
-  selector:
-    app: logstash
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: logstash
-  namespace: {{ .Values.nsPrefix }}
-  labels:
-    app: logstash
-spec:
-  ports:
-  - name: transport
-    port: 5044
-    targetPort: 5044
-    nodePort: {{ .Values.nodePortPrefix }}55
-  selector:
-    app: logstash
-  type: NodePort
-#{{ end }}
-#{{ if not .Values.disableLogKibana }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  labels:
-    app: kibana
-  name: kibana
-  namespace: {{ .Values.nsPrefix }}
-spec:
-  ports:
-  - name: tcp-ks
-    port: 5601
-    targetPort: 5601
-    nodePort: {{ .Values.nodePortPrefix }}53
-  selector:
-    app: kibana
-  type: NodePort
-#{{ end }}
diff --git a/kubernetes/log/templates/elasticsearch-deployment.yaml b/kubernetes/log/templates/elasticsearch-deployment.yaml
deleted file mode 100644 (file)
index 8c09479..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright © 2017 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.
-
-#{{ if not .Values.disableLogElasticsearch }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  labels:
-    app: elasticsearch
-  name: log-elasticsearch
-  namespace: {{ .Values.nsPrefix }}
-spec:
-  replicas: {{ .Values.elasticsearchReplicas }}
-  selector:
-    matchLabels:
-      app: elasticsearch
-  template:
-    metadata:
-      labels:
-        app: elasticsearch
-      name: log-elasticsearch
-    spec:
-      initContainers:
-      - command:
-        - /bin/sh
-        - -c
-        - |
-          sysctl -w vm.max_map_count=262144
-          mkdir -p /logroot/elasticsearch/logs
-          mkdir -p /logroot/elasticsearch/data
-          chmod -R 777 /logroot/elasticsearch
-          chown -R root:root /logroot
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        securityContext:
-          privileged: true
-        image: {{ .Values.image.es_bb }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: init-sysctl
-        volumeMounts:
-        - name: elasticsearch-logs
-          mountPath: /logroot/
-      containers:
-      - name: elasticsearch
-        image: {{ .Values.image.elasticsearch}}
-        ports:
-        - containerPort: 9200
-          name: http
-          protocol: TCP
-        - containerPort: 9300
-          name: transport
-          protocol: TCP
-        readinessProbe:
-          tcpSocket:
-            port: 9300
-        volumeMounts:
-         - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
-           name: elasticsearch-conf
-           subPath: elasticsearch.yml
-         - mountPath: /usr/share/elasticsearch/data/
-           name: elasticsearch-data
-         - mountPath: /usr/share/elasticsearch/logs/
-           name: elasticsearch-logs
-      volumes:
-        - name: elasticsearch-data
-          persistentVolumeClaim:
-            claimName: elasticsearch-db
-        - name: elasticsearch-logs
-          hostPath:
-            path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/log/
-        - name: elasticsearch-conf
-          configMap:
-            name: log-elasticsearch-configmap
-            items:
-            - key: elasticsearch.yml
-              path: elasticsearch.yml
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: log-elasticsearch-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ (.Files.Glob "resources/elasticsearch/conf/elasticsearch.yml").AsConfig | indent 2 }}
-#{{ end }}
-
diff --git a/kubernetes/log/templates/kibana-deployment.yaml b/kubernetes/log/templates/kibana-deployment.yaml
deleted file mode 100644 (file)
index b60011a..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright © 2017 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.
-
-#{{ if not .Values.disableLogKibana }}
-apiVersion: extensions/v1beta1 
-kind: Deployment
-metadata:
-  labels:
-    app: kibana
-  name: log-kibana
-  namespace: {{ .Values.nsPrefix }}
-spec:
-  replicas: {{ .Values.kibanaReplicas }}
-  selector:
-    matchLabels:
-      app: kibana
-  template:
-    metadata:
-      labels:
-        app: kibana
-      name: log-kibana
-    spec:
-      initContainers:
-      - command:
-        - /root/ready.py
-        args:
-        - --container-name
-        - elasticsearch
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: kibana-readiness
-      containers:
-      - name: kibana
-        image: {{ .Values.image.kibana }}
-        ports:
-        - containerPort: 5601
-          name: http
-          protocol: TCP
-        readinessProbe:
-          tcpSocket:
-            port: 5601
-        volumeMounts:
-         - name: kibana-conf
-           mountPath: /usr/share/kibana/config/      
-      volumes:
-        - name: kibana-conf
-          configMap:
-            name: log-kibana-configmap
-            items:
-            - key: kibana.yml
-              path: kibana.yml
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: log-kibana-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/kibana/conf/kibana.yml").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/log/templates/log-pv-pvc.yaml b/kubernetes/log/templates/log-pv-pvc.yaml
deleted file mode 100644 (file)
index 20bcbb1..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-{{/*
-# Copyright © 2017 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.
-*/}}
-
-#{{ if not .Values.disableLogElasticsearch }}
-apiVersion: v1
-kind: PersistentVolume
-metadata:
-  name: {{ .Values.nsPrefix }}-elasticsearch-db
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    name: {{ .Values.nsPrefix }}-elasticsearch-db
-spec:
-  capacity:
-    storage: 2Gi
-  accessModes:
-    - ReadWriteMany
-  persistentVolumeReclaimPolicy: Retain
-  hostPath:
-    path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/log/elasticsearch/data
----
-kind: PersistentVolumeClaim
-apiVersion: v1
-metadata:
-  name: elasticsearch-db
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  accessModes:
-    - ReadWriteMany
-  resources:
-    requests:
-      storage: 2Gi
-  selector:
-    matchLabels:
-      name: {{ .Values.nsPrefix }}-elasticsearch-db
-#{{ end }}
diff --git a/kubernetes/log/templates/logstash-deployment.yaml b/kubernetes/log/templates/logstash-deployment.yaml
deleted file mode 100644 (file)
index 33bcc20..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright © 2017 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.
-
-#{{ if not .Values.disableLogLogstash }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  labels:
-    app: logstash
-  name: log-logstash
-  namespace: {{ .Values.nsPrefix }}
-spec:
-  replicas: {{ .Values.logstashReplicas }}
-  selector:
-    matchLabels:
-      app: logstash
-  template:
-    metadata:
-      labels:
-        app: logstash
-      name: log-logstash
-    spec:
-      initContainers:
-      - command:
-        - /root/ready.py
-        args:
-        - --container-name
-        - elasticsearch
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: logstash-readiness
-      containers:
-      - name: logstash
-        image: {{ .Values.image.logstash }}
-        ports:
-        - containerPort: 5044
-          name: transport
-          protocol: TCP
-        - containerPort: 9600
-          name: http
-          protocol: TCP
-        readinessProbe:
-          tcpSocket:
-            port: 5044
-        volumeMounts:
-         - mountPath: /usr/share/logstash/config/
-           name: logstash-conf
-         - mountPath: /usr/share/logstash/pipeline/
-           name: logstash-pipeline
-      volumes:
-        - name: logstash-conf
-          configMap:
-            name: log-logstash-configmap
-            items:
-            - key: logstash.yml
-              path: logstash.yml
-        - name: logstash-pipeline
-          configMap:
-            name: log-logstash-configmap
-            items:
-            - key: onap-pipeline.conf
-              path: onap-pipeline.conf
-
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: log-logstash-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/logstash/conf/logstash.yml").AsConfig . | indent 2 }}
-{{ tpl (.Files.Glob "resources/logstash/pipeline/onap-pipeline.conf").AsConfig . | indent 2 }}
-#{{ end }}
index 0b8d1fe..088ad5d 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-nsPrefix: onap
-pullPolicy: Always
-nodePortPrefix: 302
-dataRootDir: /dockerdata-nfs
-elasticsearchReplicas: 1
-kibanaReplicas: 1
-logstashReplicas: 1
-image:
-  readiness: oomk8s/readiness-check:1.1.0
-  logstash: docker.elastic.co/logstash/logstash:5.4.3
-  kibana: docker.elastic.co/kibana/kibana:5.5.0
-  elasticsearch: docker.elastic.co/elasticsearch/elasticsearch:5.5.0
-  es_bb: busybox
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
index 89c6932..b0d4690 100644 (file)
@@ -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.{{.Values.nsPrefix}}:5044"]
+  hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"]
   #If enable will do load balancing among availabe Logstash, automatically.
   loadbalance: true
 
index 8b2e185..410246f 100644 (file)
@@ -29,3 +29,7 @@ image:
   mso: nexus3.onap.org:10001/openecomp/mso:v1.1.2
   mariadb: nexus3.onap.org:10001/mariadb:10.1.11
   filebeat: docker.elastic.co/beats/filebeat:5.5.0
+
+config:
+  logstashServiceName: log-ls
+  logstashPort: 5044
index 706f24d..a6dd579 100644 (file)
@@ -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.{{.Values.nsPrefix}}:5044"]
+  hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"]
   #If enable will do load balancing among availabe Logstash, automatically.
   loadbalance: true
 
index 2f76d6a..d43ee61 100644 (file)
@@ -30,3 +30,7 @@ image:
 # domain name of msb gateway
 msbgateway: msb-iag.{{ .Values.nsPrefix }}
 msbPort: 80
+
+config:
+  logstashServiceName: log-ls
+  logstashPort: 5044
index 7c81478..91943f4 100644 (file)
@@ -53,7 +53,7 @@ dependencies:
     repository: '@local'
     condition: esr.enabled
   - name: log
-    version: ~0.1.0
+    version: ~2.0.0
     repository: '@local'
     condition: log.enabled
   - name: message-router
index 0c3ff85..ee7d00b 100644 (file)
@@ -63,7 +63,7 @@ dcaegen2:
   enabled: true
 esr:
   enabled: true
-log:
+log: # ONAP Logging ElasticStack
   enabled: true
 message-router:
   enabled: true
index 89c6932..b0d4690 100644 (file)
@@ -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.{{.Values.nsPrefix}}:5044"]
+  hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"]
   #If enable will do load balancing among availabe Logstash, automatically.
   loadbalance: true
 
index 5a04070..49ad892 100644 (file)
@@ -38,3 +38,7 @@ image:
   policyNexusVersion: v1.1.1
   ubuntu: ubuntu:16.04
   filebeat: docker.elastic.co/beats/filebeat:5.5.0
+
+config:
+  logstashServiceName: log-ls
+  logstashPort: 5044
index 89c6932..b0d4690 100644 (file)
@@ -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.{{.Values.nsPrefix}}:5044"]
+  hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"]
   #If enable will do load balancing among availabe Logstash, automatically.
   loadbalance: true
 
index ed520d6..89c2dbc 100644 (file)
@@ -31,3 +31,6 @@ image:
   ubuntuInit: oomk8s/ubuntu-init:1.0.0
 onapPortal:
   webappsDir: "/opt/apache-tomcat-8.0.37/webapps"
+config:
+  logstashServiceName: log-ls
+  logstashPort: 5044
index 89c6932..b0d4690 100644 (file)
@@ -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.{{.Values.nsPrefix}}:5044"]
+  hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"]
   #If enable will do load balancing among availabe Logstash, automatically.
   loadbalance: true
 
index 13f41aa..40b3ec3 100644 (file)
@@ -25,3 +25,6 @@ image:
   sdcBackend: nexus3.onap.org:10001/openecomp/sdc-backend:v1.1.0
   filebeat: docker.elastic.co/beats/filebeat:5.5.0
   ubuntuInit: oomk8s/ubuntu-init:1.0.0
+config:
+  logstashServiceName: log-ls
+  logstashPort: 5044
index 2cd63e1..49d818a 100644 (file)
@@ -29,7 +29,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.{{.Values.nsPrefix}}:5044"]
+  hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"]
   #If enable will do load balancing among availabe Logstash, automatically.
   loadbalance: true
 
index 9c706b8..9402917 100644 (file)
@@ -37,4 +37,6 @@ portalReplicas: 1
 disableSdncSdncDgbuilder: false
 disableSdncSdncPortal: false
 disableNfsProvisioner: false
-
+config:
+  logstashServiceName: log-ls
+  logstashPort: 5044
index 9ad559c..b0d4690 100644 (file)
@@ -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.{{ .Release.Name }}-log:5044"]
+  hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"]
   #If enable will do load balancing among availabe Logstash, automatically.
   loadbalance: true
 
index d62465d..3ca60b0 100644 (file)
@@ -44,7 +44,8 @@ config:
   openStackKeyStoneUrl: "http://1.2.3.4:5000"
   openStackServiceTenantName: "service"
   openStackEncryptedPasswordHere: "c124921a3a0efbe579782cde8227681e"
-
+  logstashServiceName: log-ls
+  logstashPort: 5044
 
 # default number of instances
 replicaCount: 1
index 89c6932..b0d4690 100644 (file)
@@ -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.{{.Values.nsPrefix}}:5044"]
+  hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"]
   #If enable will do load balancing among availabe Logstash, automatically.
   loadbalance: true
 
index 258177b..f177476 100644 (file)
@@ -23,3 +23,6 @@ image:
   mariadb: nexus3.onap.org:10001/library/mariadb:10
   vid: nexus3.onap.org:10001/openecomp/vid:v1.1.1
   filebeat: docker.elastic.co/beats/filebeat:5.5.0
+config:
+  logstashServiceName: log-ls
+  logstashPort: 5044