diff options
Diffstat (limited to 'kubernetes/log')
-rw-r--r-- | kubernetes/log/resources/elasticsearch/conf/elasticsearch.yml | 2 | ||||
-rw-r--r-- | kubernetes/log/resources/kibana/conf/kibana.yml | 4 | ||||
-rw-r--r-- | kubernetes/log/resources/logstash/pipeline/onap-pipeline.conf | 2 | ||||
-rw-r--r-- | kubernetes/log/templates/all-services.yaml | 10 | ||||
-rw-r--r-- | kubernetes/log/templates/elasticsearch-deployment.yaml | 13 | ||||
-rw-r--r-- | kubernetes/log/templates/kibana-deployment.yaml | 15 | ||||
-rw-r--r-- | kubernetes/log/templates/log-pv-pvc.yaml | 10 | ||||
-rw-r--r-- | kubernetes/log/templates/logstash-deployment.yaml | 19 | ||||
-rw-r--r-- | kubernetes/log/values.yaml | 3 |
9 files changed, 42 insertions, 36 deletions
diff --git a/kubernetes/log/resources/elasticsearch/conf/elasticsearch.yml b/kubernetes/log/resources/elasticsearch/conf/elasticsearch.yml index 0b579d0729..f038a10775 100644 --- a/kubernetes/log/resources/elasticsearch/conf/elasticsearch.yml +++ b/kubernetes/log/resources/elasticsearch/conf/elasticsearch.yml @@ -86,7 +86,7 @@ network.host: 0.0.0.0 # By default, Elasticsearch will bind to the available loopback addresses and will scan ports 9300 to 9305 to try # to connect to other nodes running on the same server. # -#discovery.zen.ping.unicast.hosts: ["elasticsearch.onap-log" +#discovery.zen.ping.unicast.hosts: ["elasticsearch.{{.Values.nsPrefix}}" #$discovery.zen.ping.unicast.hosts # # This setting tells Elasticsearch to not elect a master unless there are enough master-eligible nodes diff --git a/kubernetes/log/resources/kibana/conf/kibana.yml b/kubernetes/log/resources/kibana/conf/kibana.yml index 3b96bd33c2..df0d71abab 100644 --- a/kubernetes/log/resources/kibana/conf/kibana.yml +++ b/kubernetes/log/resources/kibana/conf/kibana.yml @@ -31,8 +31,8 @@ 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.onap-log:9200" -#elasticsearch-service.onap-log:9200" +elasticsearch.url: "http://elasticsearch.{{.Values.nsPrefix}}:9200" +#elasticsearch-service.{{.Values.nsPrefix}}:9200" #elasticsearch.url: "http://10.247.47.3:9200" # 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 diff --git a/kubernetes/log/resources/logstash/pipeline/onap-pipeline.conf b/kubernetes/log/resources/logstash/pipeline/onap-pipeline.conf index 123ceb5f28..8289b49f6e 100644 --- a/kubernetes/log/resources/logstash/pipeline/onap-pipeline.conf +++ b/kubernetes/log/resources/logstash/pipeline/onap-pipeline.conf @@ -225,7 +225,7 @@ output { #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.onap-log:9200"] + hosts => ["http://elasticsearch.{{.Values.nsPrefix}}:9200"] ## 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/templates/all-services.yaml b/kubernetes/log/templates/all-services.yaml index e8b6b816da..a40a4da0e8 100644 --- a/kubernetes/log/templates/all-services.yaml +++ b/kubernetes/log/templates/all-services.yaml @@ -5,7 +5,7 @@ metadata: labels: app: elasticsearch name: elasticsearch - namespace: {{ .Values.nsPrefix }}-log + namespace: {{ .Values.nsPrefix }} spec: ports: - name: http @@ -20,7 +20,7 @@ apiVersion: v1 kind: Service metadata: name: elasticsearchtcp - namespace: {{ .Values.nsPrefix }}-log + namespace: {{ .Values.nsPrefix }} labels: app: elasticsearch spec: @@ -37,7 +37,7 @@ apiVersion: v1 kind: Service metadata: name: logstashinternal - namespace: {{ .Values.nsPrefix }}-log + namespace: {{ .Values.nsPrefix }} labels: app: logstash spec: @@ -52,7 +52,7 @@ apiVersion: v1 kind: Service metadata: name: logstash - namespace: {{ .Values.nsPrefix }}-log + namespace: {{ .Values.nsPrefix }} labels: app: logstash spec: @@ -71,7 +71,7 @@ metadata: labels: app: kibana name: kibana - namespace: {{ .Values.nsPrefix }}-log + namespace: {{ .Values.nsPrefix }} spec: ports: - name: tcp-ks diff --git a/kubernetes/log/templates/elasticsearch-deployment.yaml b/kubernetes/log/templates/elasticsearch-deployment.yaml index 85e57460bc..cbc19a8591 100644 --- a/kubernetes/log/templates/elasticsearch-deployment.yaml +++ b/kubernetes/log/templates/elasticsearch-deployment.yaml @@ -4,9 +4,10 @@ kind: Deployment metadata: labels: app: elasticsearch - name: elasticsearch - namespace: {{ .Values.nsPrefix }}-log + name: log-elasticsearch + namespace: {{ .Values.nsPrefix }} spec: + replicas: {{ .Values.elasticsearchReplicas }} selector: matchLabels: app: elasticsearch @@ -14,7 +15,7 @@ spec: metadata: labels: app: elasticsearch - name: elasticsearch + name: log-elasticsearch spec: initContainers: - command: @@ -70,7 +71,7 @@ spec: path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/log/ - name: elasticsearch-conf configMap: - name: elasticsearch-configmap + name: log-elasticsearch-configmap items: - key: elasticsearch.yml path: elasticsearch.yml @@ -78,8 +79,8 @@ spec: apiVersion: v1 kind: ConfigMap metadata: - name: elasticsearch-configmap - namespace: {{ .Values.nsPrefix }}-log + 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 index 2de825e516..6e5c36c993 100644 --- a/kubernetes/log/templates/kibana-deployment.yaml +++ b/kubernetes/log/templates/kibana-deployment.yaml @@ -4,9 +4,10 @@ kind: Deployment metadata: labels: app: kibana - name: kibana - namespace: {{ .Values.nsPrefix }}-log + name: log-kibana + namespace: {{ .Values.nsPrefix }} spec: + replicas: {{ .Values.kibanaReplicas }} selector: matchLabels: app: kibana @@ -14,7 +15,7 @@ spec: metadata: labels: app: kibana - name: kibana + name: log-kibana spec: initContainers: - command: @@ -47,7 +48,7 @@ spec: volumes: - name: kibana-conf configMap: - name: kibana-configmap + name: log-kibana-configmap items: - key: kibana.yml path: kibana.yml @@ -55,8 +56,8 @@ spec: apiVersion: v1 kind: ConfigMap metadata: - name: kibana-configmap - namespace: {{ .Values.nsPrefix }}-log + name: log-kibana-configmap + namespace: {{ .Values.nsPrefix }} data: -{{ (.Files.Glob "resources/kibana/conf/kibana.yml").AsConfig | indent 2 }} +{{ 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 index a5e5ff76e1..d0176a5462 100644 --- a/kubernetes/log/templates/log-pv-pvc.yaml +++ b/kubernetes/log/templates/log-pv-pvc.yaml @@ -2,10 +2,10 @@ apiVersion: v1 kind: PersistentVolume metadata: - name: elasticsearch-db - namespace: "{{ .Values.nsPrefix }}-log" + name: {{ .Values.nsPrefix }}-elasticsearch-db + namespace: "{{ .Values.nsPrefix }}" labels: - name: elasticsearch-db + name: {{ .Values.nsPrefix }}-elasticsearch-db spec: capacity: storage: 2Gi @@ -19,7 +19,7 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: name: elasticsearch-db - namespace: "{{ .Values.nsPrefix }}-log" + namespace: "{{ .Values.nsPrefix }}" spec: accessModes: - ReadWriteMany @@ -28,5 +28,5 @@ spec: storage: 2Gi selector: matchLabels: - name: elasticsearch-db + name: {{ .Values.nsPrefix }}-elasticsearch-db #{{ end }} diff --git a/kubernetes/log/templates/logstash-deployment.yaml b/kubernetes/log/templates/logstash-deployment.yaml index f99657a039..1d3b945711 100644 --- a/kubernetes/log/templates/logstash-deployment.yaml +++ b/kubernetes/log/templates/logstash-deployment.yaml @@ -4,9 +4,10 @@ kind: Deployment metadata: labels: app: logstash - name: logstash - namespace: {{ .Values.nsPrefix }}-log + name: log-logstash + namespace: {{ .Values.nsPrefix }} spec: + replicas: {{ .Values.logstashReplicas }} selector: matchLabels: app: logstash @@ -14,7 +15,7 @@ spec: metadata: labels: app: logstash - name: logstash + name: log-logstash spec: initContainers: - command: @@ -52,13 +53,13 @@ spec: volumes: - name: logstash-conf configMap: - name: logstash-configmap + name: log-logstash-configmap items: - key: logstash.yml path: logstash.yml - name: logstash-pipeline configMap: - name: logstash-configmap + name: log-logstash-configmap items: - key: onap-pipeline.conf path: onap-pipeline.conf @@ -67,9 +68,9 @@ spec: apiVersion: v1 kind: ConfigMap metadata: - name: logstash-configmap - namespace: {{ .Values.nsPrefix }}-log + name: log-logstash-configmap + namespace: {{ .Values.nsPrefix }} data: -{{ (.Files.Glob "resources/logstash/conf/logstash.yml").AsConfig | indent 2 }} -{{ (.Files.Glob "resources/logstash/pipeline/onap-pipeline.conf").AsConfig | indent 2 }} +{{ tpl (.Files.Glob "resources/logstash/conf/logstash.yml").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/logstash/pipeline/onap-pipeline.conf").AsConfig . | indent 2 }} #{{ end }} diff --git a/kubernetes/log/values.yaml b/kubernetes/log/values.yaml index af53915d27..69efa27b3d 100644 --- a/kubernetes/log/values.yaml +++ b/kubernetes/log/values.yaml @@ -2,6 +2,9 @@ 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 |