From d209db907ad9b91edf7f7320f10f699cce43ff36 Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Fri, 2 Feb 2018 14:23:40 -0600 Subject: [PATCH] Remove elasticsearch, fluentd, kibana from osh-addons This removes the charts from openstack-helm-addons as they now reside in osh-infra Change-Id: I32b35aab6fab8a1f421c720a260e678499980924 --- elasticsearch/Chart.yaml | 24 -- elasticsearch/requirements.yaml | 18 -- .../templates/bin/_elasticsearch.sh.tpl | 30 --- .../templates/bin/_helm-tests.sh.tpl | 81 ------ elasticsearch/templates/configmap-bin.yaml | 25 -- elasticsearch/templates/configmap-etc.yaml | 25 -- .../templates/deployment-client.yaml | 121 --------- .../templates/deployment-master.yaml | 121 --------- .../templates/etc/_elasticsearch.yml.tpl | 42 ---- .../templates/etc/_log4j2.properties.tpl | 35 --- elasticsearch/templates/pvc-elastic.yaml | 27 -- elasticsearch/templates/service-data.yaml | 34 --- .../templates/service-discovery.yaml | 34 --- elasticsearch/templates/service-logging.yaml | 34 --- elasticsearch/templates/serviceaccount.yaml | 20 -- elasticsearch/templates/statefulset-data.yaml | 117 --------- .../templates/tests/pod-helm-tests.yaml | 43 ---- elasticsearch/values.yaml | 139 ----------- fluentd/Chart.yaml | 24 -- fluentd/README.rst | 27 -- fluentd/requirements.yaml | 19 -- fluentd/templates/bin/_fluentd-test.sh.tpl | 48 ---- fluentd/templates/bin/_fluentd.sh.tpl | 30 --- fluentd/templates/configmap-bin.yaml | 27 -- fluentd/templates/configmap-etc.yaml | 25 -- fluentd/templates/daemonset.yaml | 73 ------ fluentd/templates/etc/_td-agent.conf.tpl | 234 ------------------ fluentd/templates/tests/pod-helm-test.yaml | 44 ---- fluentd/values.yaml | 62 ----- kibana/Chart.yaml | 23 -- kibana/README.rst | 30 --- kibana/requirements.yaml | 18 -- kibana/templates/bin/_kibana.sh.tpl | 29 --- kibana/templates/configmap-bin.yaml | 23 -- kibana/templates/configmap-etc.yaml | 33 --- kibana/templates/deployment.yaml | 65 ----- kibana/templates/etc/_kibana.yml.tpl | 117 --------- kibana/templates/service.yaml | 33 --- kibana/values.yaml | 117 --------- tools/gate/basic_launch.sh | 10 - 40 files changed, 2081 deletions(-) delete mode 100644 elasticsearch/Chart.yaml delete mode 100644 elasticsearch/requirements.yaml delete mode 100644 elasticsearch/templates/bin/_elasticsearch.sh.tpl delete mode 100644 elasticsearch/templates/bin/_helm-tests.sh.tpl delete mode 100644 elasticsearch/templates/configmap-bin.yaml delete mode 100644 elasticsearch/templates/configmap-etc.yaml delete mode 100644 elasticsearch/templates/deployment-client.yaml delete mode 100644 elasticsearch/templates/deployment-master.yaml delete mode 100644 elasticsearch/templates/etc/_elasticsearch.yml.tpl delete mode 100644 elasticsearch/templates/etc/_log4j2.properties.tpl delete mode 100644 elasticsearch/templates/pvc-elastic.yaml delete mode 100644 elasticsearch/templates/service-data.yaml delete mode 100644 elasticsearch/templates/service-discovery.yaml delete mode 100644 elasticsearch/templates/service-logging.yaml delete mode 100644 elasticsearch/templates/serviceaccount.yaml delete mode 100644 elasticsearch/templates/statefulset-data.yaml delete mode 100644 elasticsearch/templates/tests/pod-helm-tests.yaml delete mode 100644 elasticsearch/values.yaml delete mode 100644 fluentd/Chart.yaml delete mode 100644 fluentd/README.rst delete mode 100644 fluentd/requirements.yaml delete mode 100644 fluentd/templates/bin/_fluentd-test.sh.tpl delete mode 100644 fluentd/templates/bin/_fluentd.sh.tpl delete mode 100644 fluentd/templates/configmap-bin.yaml delete mode 100644 fluentd/templates/configmap-etc.yaml delete mode 100644 fluentd/templates/daemonset.yaml delete mode 100644 fluentd/templates/etc/_td-agent.conf.tpl delete mode 100644 fluentd/templates/tests/pod-helm-test.yaml delete mode 100644 fluentd/values.yaml delete mode 100644 kibana/Chart.yaml delete mode 100644 kibana/README.rst delete mode 100644 kibana/requirements.yaml delete mode 100644 kibana/templates/bin/_kibana.sh.tpl delete mode 100644 kibana/templates/configmap-bin.yaml delete mode 100644 kibana/templates/configmap-etc.yaml delete mode 100644 kibana/templates/deployment.yaml delete mode 100644 kibana/templates/etc/_kibana.yml.tpl delete mode 100644 kibana/templates/service.yaml delete mode 100644 kibana/values.yaml diff --git a/elasticsearch/Chart.yaml b/elasticsearch/Chart.yaml deleted file mode 100644 index 95d96f1c..00000000 --- a/elasticsearch/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2017 The Openstack-Helm Authors. -# -# 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: OpenStack-Helm ElasticSearch -name: elasticsearch -version: 0.1.0 -home: https://www.elastic.co/ -sources: - - https://github.com/elastic/elasticsearch - - https://git.openstack.org/cgit/openstack/openstack-helm-addons -maintainers: - - name: OpenStack-Helm Authors diff --git a/elasticsearch/requirements.yaml b/elasticsearch/requirements.yaml deleted file mode 100644 index 53782e69..00000000 --- a/elasticsearch/requirements.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2017 The Openstack-Helm Authors. -# -# 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: helm-toolkit - repository: http://localhost:8879/charts - version: 0.1.0 diff --git a/elasticsearch/templates/bin/_elasticsearch.sh.tpl b/elasticsearch/templates/bin/_elasticsearch.sh.tpl deleted file mode 100644 index 780ec6e7..00000000 --- a/elasticsearch/templates/bin/_elasticsearch.sh.tpl +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -set -ex -COMMAND="${@:-start}" - -function start () { - ulimit -l unlimited - exec /docker-entrypoint.sh elasticsearch -} - -function stop () { - kill -TERM 1 -} - -$COMMAND diff --git a/elasticsearch/templates/bin/_helm-tests.sh.tpl b/elasticsearch/templates/bin/_helm-tests.sh.tpl deleted file mode 100644 index b55e9176..00000000 --- a/elasticsearch/templates/bin/_helm-tests.sh.tpl +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - - -set -ex - -function create_index () { - index_result=$(curl -XPUT "${ELASTICSEARCH_ENDPOINT}test_index?pretty" -H 'Content-Type: application/json' -d' - { - "settings" : { - "index" : { - "number_of_shards" : 3, - "number_of_replicas" : 2 - } - } - } - ' | python -c "import sys, json; print json.load(sys.stdin)['acknowledged']") - if [ "$index_result" == "True" ]; - then - echo "PASS: Test index created!" - else - echo "FAIL: Test index not created!"; - exit 1; - fi -} - -function insert_test_data () { - insert_result=$(curl -XPUT "${ELASTICSEARCH_ENDPOINT}sample_index/sample_type/123/_create?pretty" -H 'Content-Type: application/json' -d' - { - "name" : "Elasticsearch", - "message" : "Test data text entry" - } - ' | python -c "import sys, json; print json.load(sys.stdin)['created']") - if [ "$insert_result" == "True" ]; then - sleep 20 - echo "PASS: Test data inserted into test index!" - else - echo "FAIL: Test data not inserted into test index!"; - exit 1; - fi -} - - -function check_hits () { - total_hits=$(curl -XGET "${ELASTICSEARCH_ENDPOINT}_search?pretty" -H 'Content-Type: application/json' -d' - { - "query" : { - "bool": { - "must": [ - { "match": { "name": "Elasticsearch" }}, - { "match": { "message": "Test data text entry" }} - ] - } - } - } - ' | python -c "import sys, json; print json.load(sys.stdin)['hits']['total']") - if [ "$total_hits" -gt 0 ]; then - echo "PASS: Successful hits on test data query!" - else - echo "FAIL: No hits on query for test data! Exiting"; - exit 1; - fi -} - -create_index -insert_test_data -check_hits diff --git a/elasticsearch/templates/configmap-bin.yaml b/elasticsearch/templates/configmap-bin.yaml deleted file mode 100644 index 9f39b31d..00000000 --- a/elasticsearch/templates/configmap-bin.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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: elastic-bin -data: - elasticsearch.sh: | -{{ tuple "bin/_elasticsearch.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} - helm-tests.sh: | -{{ tuple "bin/_helm-tests.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} diff --git a/elasticsearch/templates/configmap-etc.yaml b/elasticsearch/templates/configmap-etc.yaml deleted file mode 100644 index 586ce580..00000000 --- a/elasticsearch/templates/configmap-etc.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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: elastic-etc -data: - elasticsearch.yml: |+ -{{- tuple .Values.conf.elasticsearch "etc/_elasticsearch.yml.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - log4j2.properties: |+ -{{- tuple .Values.conf.elasticsearch "etc/_log4j2.properties.tpl" . | include "helm-toolkit.utils.configmap_templater" }} diff --git a/elasticsearch/templates/deployment-client.yaml b/elasticsearch/templates/deployment-client.yaml deleted file mode 100644 index 4ca28905..00000000 --- a/elasticsearch/templates/deployment-client.yaml +++ /dev/null @@ -1,121 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -{{- $envAll := . }} ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: elasticsearch-client -spec: - replicas: {{ .Values.pod.replicas.client }} -{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} - template: - metadata: - labels: -{{ tuple $envAll "elasticsearch" "client" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} - annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} - spec: - affinity: -{{ tuple $envAll "elasticsearch" "client" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} - serviceAccount: elasticsearch - terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.client.timeout | default "600" }} - initContainers: - - name: memory-map-increase - securityContext: - privileged: true - runAsUser: 0 - image: {{ .Values.images.memory_init }} - imagePullPolicy: {{ .Values.images.pull_policy }} - command: - - sysctl - - -w - - vm.max_map_count=262144 - containers: - - name: elasticsearch-client - securityContext: - capabilities: - add: - - IPC_LOCK - - SYS_RESOURCE - image: {{ .Values.images.elasticsearch }} - imagePullPolicy: {{ .Values.images.pull_policy }} -{{ tuple $envAll $envAll.Values.pod.resources.client | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }} - command: - - /tmp/elasticsearch.sh - - start - lifecycle: - preStop: - exec: - command: - - /tmp/elasticsearch.sh - - stop - env: - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: NODE_MASTER - value: "false" - - name: NODE_DATA - value: "false" - - name: HTTP_ENABLE - value: "true" - - name: DISCOVERY_SERVICE - value: {{ tuple "logging_db" "discovery" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - - name: ES_JAVA_OPTS - value: "{{ .Values.conf.elasticsearch.env.java_opts }}" - ports: - - containerPort: {{ .Values.network.client.port }} - name: {{ .Values.network.client.name }} - - containerPort: {{ .Values.network.discovery.port }} - name: {{ .Values.network.discovery.name }} - volumeMounts: - - name: elastic-bin - mountPath: /tmp/elasticsearch.sh - subPath: elasticsearch.sh - readOnly: true - - name: elastic-config - mountPath: /usr/share/elasticsearch/config - - name: elastic-etc - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml - subPath: elasticsearch.yml - readOnly: true - - name: elastic-etc - mountPath: /usr/share/elasticsearch/config/log4j2.properties - subPath: log4j2.properties - readOnly: true - - mountPath: {{ .Values.conf.elasticsearch.path.data }} - name: storage - volumes: - - name: elastic-bin - configMap: - name: elastic-bin - defaultMode: 0555 - - name: elastic-config - emptyDir: {} - - name: elastic-etc - configMap: - name: elastic-etc - defaultMode: 0444 - - name: storage - emptyDir: {} diff --git a/elasticsearch/templates/deployment-master.yaml b/elasticsearch/templates/deployment-master.yaml deleted file mode 100644 index 0e4cdbd0..00000000 --- a/elasticsearch/templates/deployment-master.yaml +++ /dev/null @@ -1,121 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -{{- $envAll := . }} ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: elasticsearch-master -spec: - replicas: {{ .Values.pod.replicas.master }} -{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} - template: - metadata: - labels: -{{ tuple $envAll "elasticsearch" "master" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} - annotations: - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} - spec: - affinity: -{{ tuple $envAll "elasticsearch" "master" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} - serviceAccount: elasticsearch - terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.master.timeout | default "600" }} - initContainers: - - name: memory-map-increase - securityContext: - privileged: true - runAsUser: 0 - image: {{ .Values.images.memory_init }} - imagePullPolicy: {{ .Values.images.pull_policy }} - command: - - sysctl - - -w - - vm.max_map_count=262144 - containers: - - name: elasticsearch-master - securityContext: - capabilities: - add: - - IPC_LOCK - - SYS_RESOURCE - image: {{ .Values.images.elasticsearch }} - imagePullPolicy: {{ .Values.images.pull_policy }} -{{ tuple $envAll $envAll.Values.pod.resources.master | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }} - command: - - /tmp/elasticsearch.sh - - start - lifecycle: - preStop: - exec: - command: - - /tmp/elasticsearch.sh - - stop - env: - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: NODE_MASTER - value: "true" - - name: NODE_INGEST - value: "false" - - name: NODE_DATA - value: "false" - - name: HTTP_ENABLE - value: "false" - - name: DISCOVERY_SERVICE - value: {{ tuple "logging_db" "discovery" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - - name: ES_JAVA_OPTS - value: "{{ .Values.conf.elasticsearch.env.java_opts }}" - ports: - - containerPort: {{ .Values.network.discovery.port }} - name: {{ .Values.network.discovery.name }} - volumeMounts: - - name: elastic-bin - mountPath: /tmp/elasticsearch.sh - subPath: elasticsearch.sh - readOnly: true - - name: elastic-config - mountPath: /usr/share/elasticsearch/config - - name: elastic-etc - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml - subPath: elasticsearch.yml - readOnly: true - - name: elastic-etc - mountPath: /usr/share/elasticsearch/config/log4j2.properties - subPath: log4j2.properties - readOnly: true - - mountPath: {{ .Values.conf.elasticsearch.path.data }} - name: storage - volumes: - - name: elastic-bin - configMap: - name: elastic-bin - defaultMode: 0555 - - name: elastic-config - emptyDir: {} - - name: elastic-etc - configMap: - name: elastic-etc - defaultMode: 0444 - - name: storage - emptyDir: {} diff --git a/elasticsearch/templates/etc/_elasticsearch.yml.tpl b/elasticsearch/templates/etc/_elasticsearch.yml.tpl deleted file mode 100644 index b150e5b6..00000000 --- a/elasticsearch/templates/etc/_elasticsearch.yml.tpl +++ /dev/null @@ -1,42 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -cluster: - name: {{ .Values.conf.elasticsearch.cluster.name }} - -node: - master: ${NODE_MASTER} - data: ${NODE_DATA} - name: ${NODE_NAME} - max_local_storage_nodes: {{ .Values.pod.replicas.data }} - -network.host: {{ .Values.conf.elasticsearch.network.host }} - -path: - data: {{ .Values.conf.elasticsearch.path.data }} - logs: {{ .Values.conf.elasticsearch.path.logs }} - -bootstrap: - memory_lock: {{ .Values.conf.elasticsearch.bootstrap.memory_lock }} - -http: - enabled: ${HTTP_ENABLE} - compression: true - -discovery: - zen: - ping.unicast.hosts: ${DISCOVERY_SERVICE} - minimum_master_nodes: {{ .Values.conf.elasticsearch.zen.min_masters }} diff --git a/elasticsearch/templates/etc/_log4j2.properties.tpl b/elasticsearch/templates/etc/_log4j2.properties.tpl deleted file mode 100644 index 9b2a1088..00000000 --- a/elasticsearch/templates/etc/_log4j2.properties.tpl +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2017 The Openstack-Helm Authors. -# -# 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. - -appender.console.type = Console -appender.console.name = console -appender.console.layout.type = PatternLayout -appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n - -appender.rolling.type = RollingFile -appender.rolling.name = rolling -appender.rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${hostName}.log -appender.rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${hostName}.log.%i -appender.rolling.layout.type = PatternLayout -appender.rolling.layout.pattern = [%d{DEFAULT}][%-5p][%-25c] %.10000m%n -appender.rolling.policies.type = Policies -appender.rolling.policies.size.type = SizeBasedTriggeringPolicy -appender.rolling.policies.size.size=100MB -appender.rolling.strategy.type = DefaultRolloverStrategy -appender.rolling.strategy.max = 5 -appender.rolling.strategy.fileIndex = min - -rootLogger.level = info -rootLogger.appenderRef.console.ref = console -rootLogger.appenderRef.rolling.ref = rolling diff --git a/elasticsearch/templates/pvc-elastic.yaml b/elasticsearch/templates/pvc-elastic.yaml deleted file mode 100644 index 95420edc..00000000 --- a/elasticsearch/templates/pvc-elastic.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ .Values.pvc.name }} -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.pvc.requests.storage }} - storageClassName: {{ .Values.pvc.storage_class }} diff --git a/elasticsearch/templates/service-data.yaml b/elasticsearch/templates/service-data.yaml deleted file mode 100644 index cd652ff8..00000000 --- a/elasticsearch/templates/service-data.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -{{- $envAll := . }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "logging_db" "data" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - port: {{ .Values.network.data.port }} - name: transport - {{- if .Values.network.data.node_port.enabled }} - nodePort: {{ .Values.network.data.node_port.port }} - {{- end }} - selector: -{{ tuple $envAll "elasticsearch" "data" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} - {{- if .Values.network.data.node_port.enabled }} - type: NodePort - {{- end }} \ No newline at end of file diff --git a/elasticsearch/templates/service-discovery.yaml b/elasticsearch/templates/service-discovery.yaml deleted file mode 100644 index a1b980dc..00000000 --- a/elasticsearch/templates/service-discovery.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -{{- $envAll := . }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "logging_db" "discovery" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: transport - port: {{ .Values.network.discovery.port }} - {{- if .Values.network.discovery.node_port.enabled }} - nodePort: {{ .Values.network.discovery.node_port.port }} - {{- end }} - selector: -{{ tuple $envAll "elasticsearch" "master" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} - {{- if .Values.network.discovery.node_port.enabled }} - type: NodePort - {{- end }} \ No newline at end of file diff --git a/elasticsearch/templates/service-logging.yaml b/elasticsearch/templates/service-logging.yaml deleted file mode 100644 index 19521596..00000000 --- a/elasticsearch/templates/service-logging.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -{{- $envAll := . }} ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ tuple "logging_db" "default" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} -spec: - ports: - - name: {{ .Values.network.client.name }} - port: {{ .Values.network.client.port }} - {{- if .Values.network.client.node_port.enabled }} - nodePort: {{ .Values.network.client.node_port.port }} - {{- end }} - selector: -{{ tuple $envAll "elasticsearch" "client" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} - {{- if .Values.network.client.node_port.enabled }} - type: NodePort - {{- end }} \ No newline at end of file diff --git a/elasticsearch/templates/serviceaccount.yaml b/elasticsearch/templates/serviceaccount.yaml deleted file mode 100644 index 94451b4a..00000000 --- a/elasticsearch/templates/serviceaccount.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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: ServiceAccount -metadata: - name: elasticsearch diff --git a/elasticsearch/templates/statefulset-data.yaml b/elasticsearch/templates/statefulset-data.yaml deleted file mode 100644 index f104ae92..00000000 --- a/elasticsearch/templates/statefulset-data.yaml +++ /dev/null @@ -1,117 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -{{- $envAll := . }} ---- -apiVersion: apps/v1beta1 -kind: StatefulSet -metadata: - name: elasticsearch-data -spec: - serviceName: elasticsearch-data - replicas: {{ .Values.pod.replicas.data }} - template: - metadata: - labels: -{{ tuple $envAll "elasticsearch" "data" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} - spec: - affinity: -{{ tuple $envAll "elasticsearch" "data" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} - serviceAccount: elasticsearch - terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.data.timeout | default "600" }} - initContainers: - - name: memory-map-increase - securityContext: - privileged: true - runAsUser: 0 - image: {{ .Values.images.memory_init }} - imagePullPolicy: {{ .Values.images.pull_policy }} -{{ tuple $envAll $envAll.Values.pod.resources.data | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }} - command: - - sysctl - - -w - - vm.max_map_count=262144 - containers: - - name: elasticsearch-data - securityContext: - privileged: true - capabilities: - add: - - IPC_LOCK - - SYS_RESOURCE - image: {{ .Values.images.elasticsearch }} - command: - - /tmp/elasticsearch.sh - - start - lifecycle: - preStop: - exec: - command: - - /tmp/elasticsearch.sh - - stop - env: - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: NODE_MASTER - value: "false" - - name: NODE_DATA - value: "true" - - name: HTTP_ENABLE - value: "false" - - name: ES_JAVA_OPTS - value: "{{ .Values.conf.elasticsearch.env.java_opts }}" - - name: DISCOVERY_SERVICE - value: {{ tuple "logging_db" "discovery" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} - ports: - - containerPort: {{ .Values.network.data.port }} - name: {{ .Values.network.data.name }} - volumeMounts: - - name: elastic-bin - mountPath: /tmp/elasticsearch.sh - subPath: elasticsearch.sh - readOnly: true - - name: elastic-config - mountPath: /usr/share/elasticsearch/config - - name: elastic-etc - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml - subPath: elasticsearch.yml - readOnly: true - - name: elastic-etc - mountPath: /usr/share/elasticsearch/config/log4j2.properties - subPath: log4j2.properties - readOnly: true - - name: storage - mountPath: {{ .Values.conf.elasticsearch.path.data }} - volumes: - - name: elastic-bin - configMap: - name: elastic-bin - defaultMode: 0555 - - name: elastic-config - emptyDir: {} - - name: elastic-etc - configMap: - name: elastic-etc - defaultMode: 0444 - - name: storage - persistentVolumeClaim: - claimName: {{ .Values.pvc.name }} diff --git a/elasticsearch/templates/tests/pod-helm-tests.yaml b/elasticsearch/templates/tests/pod-helm-tests.yaml deleted file mode 100644 index ef2515c9..00000000 --- a/elasticsearch/templates/tests/pod-helm-tests.yaml +++ /dev/null @@ -1,43 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -{{- $envAll := . }} -apiVersion: v1 -kind: Pod -metadata: - name: "{{.Release.Name}}-helm-tests" - annotations: - "helm.sh/hook": test-success -spec: - restartPolicy: Never - containers: - - name: {{.Release.Name}}-helm-tests - image: {{ .Values.images.helm_tests }} - command: - - /tmp/helm-tests.sh - env: - - name: ELASTICSEARCH_ENDPOINT - value: {{ tuple "logging_db" "internal" "client" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }} - volumeMounts: - - name: elastic-bin - mountPath: /tmp/helm-tests.sh - subPath: helm-tests.sh - readOnly: true - volumes: - - name: elastic-bin - configMap: - name: elastic-bin - defaultMode: 0555 diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml deleted file mode 100644 index 4506ea16..00000000 --- a/elasticsearch/values.yaml +++ /dev/null @@ -1,139 +0,0 @@ -# Copyright 2017 The Openstack-Helm Authors. -# -# 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. - -# Default values for elasticsearch -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -conf: - elasticsearch: - override: - prefix: - append: - bootstrap: - memory_lock: true - cluster: - name: elasticsearch - network: - host: 0.0.0.0 - path: - data: /var/lib/elasticsearch/data - # TODO(srwilkers): Update this log path with meaningful config overrides - logs: /var/lib/elasticsearch/data - zen: - min_masters: 2 - env: - java_opts: "-Xms256m -Xmx256m" - log4j2: - override: - prefix: - append: - -endpoints: - cluster_domain_suffix: cluster.local - logging_db: - name: elasticsearch - hosts: - data: elasticsearch-data - default: elasticsearch-logging - discovery: elasticsearch-discovery - public: elasticsearch - host_fqdn_override: - default: null - path: - default: null - scheme: - default: http - port: - client: - default: 9200 - -images: - memory_init: docker.io/kolla/ubuntu-source-kolla-toolbox:4.0.0 - elasticsearch: docker.io/elasticsearch:5.4.2 - helm_tests: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3 - pull_policy: "IfNotPresent" - -pod: - affinity: - anti: - type: - default: preferredDuringSchedulingIgnoredDuringExecution - topologyKey: - default: kubernetes.io/hostname - replicas: - master: 3 - data: 3 - client: 2 - lifecycle: - upgrades: - deployments: - revision_history: 3 - pod_replacement_strategy: RollingUpdate - rolling_update: - max_unavailable: 1 - max_surge: 3 - termination_grace_period: - master: - timeout: 600 - data: - timeout: 600 - client: - timeout: 600 - resources: - enabled: false - client: - limits: - memory: "1024Mi" - cpu: "2000m" - requests: - memory: "128Mi" - cpu: "500m" - master: - limits: - memory: "1024Mi" - cpu: "2000m" - requests: - memory: "128Mi" - cpu: "500m" - data: - limits: - memory: "1024Mi" - cpu: "2000m" - requests: - memory: "128Mi" - cpu: "500m" - -network: - client: - port: 9200 - node_port: - enabled: false - port: 30920 - discovery: - port: 9300 - node_port: - enabled: false - port: 30930 - data: - port: 9300 - node_port: - enabled: false - port: 30931 - -pvc: - name: pvc-elastic - requests: - storage: 2Gi - storage_class: general diff --git a/fluentd/Chart.yaml b/fluentd/Chart.yaml deleted file mode 100644 index ea80cc39..00000000 --- a/fluentd/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2017 The Openstack-Helm Authors. -# -# 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: OpenStack-Helm Fluentd -name: fluentd -version: 0.1.0 -home: http://www.fluentd.org/ -sources: - - https://github.com/fluent/fluentd - - https://git.openstack.org/cgit/openstack/openstack-helm-addons -maintainers: - - name: OpenStack-Helm Authors diff --git a/fluentd/README.rst b/fluentd/README.rst deleted file mode 100644 index ae5bb4ea..00000000 --- a/fluentd/README.rst +++ /dev/null @@ -1,27 +0,0 @@ -======= -Fluentd -======= - -This chart provides an end user with the ability to deploy fluentd with -td-agent. The chart leverages the kolla fluentd image and incorporates concepts -established in other charts in OpenStack-Helm. - -Installation ------------- - -Fluentd should be installed as part of bringing up your cluster in order to get -meaningful logs from your services and jobs. - -The provided configuration file, td-agent.conf, provides the basic filters and -matches to consume any logs output by containers into /var/lib/docker/containers. -These logs are then sent to an elasticsearch deployment. As of now, the -expectation is that the elasticsearch service is named "elasticsearch-logging", -but this will be templated out in the next iteration. The logs can then be -consumed from elasticsearch either through querying the elasticsearch service or -through a service such as Kibana. - -To install fluentd into a running cluster, simply run: - -:: - - helm install --name=fluentd local/fluentd --namespace=kube-system diff --git a/fluentd/requirements.yaml b/fluentd/requirements.yaml deleted file mode 100644 index 00a045b4..00000000 --- a/fluentd/requirements.yaml +++ /dev/null @@ -1,19 +0,0 @@ - -# Copyright 2017 The Openstack-Helm Authors. -# -# 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: helm-toolkit - repository: http://localhost:8879/charts - version: 0.1.0 diff --git a/fluentd/templates/bin/_fluentd-test.sh.tpl b/fluentd/templates/bin/_fluentd-test.sh.tpl deleted file mode 100644 index b299999b..00000000 --- a/fluentd/templates/bin/_fluentd-test.sh.tpl +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -set -ex - -# Tests whether fluentd has successfully indexed data into Elasticsearch under -# the logstash-* index via the fluent-elasticsearch plugin -function check_logstash_index () { - total_hits=$(curl -XGET "${ELASTICSEARCH_ENDPOINT}logstash-*/fluentd/_search?pretty" -H 'Content-Type: application/json' \ - | python -c "import sys, json; print json.load(sys.stdin)['hits']['total']") - if [ "$total_hits" -gt 0 ]; then - echo "PASS: Successful hits on logstash-* index, provided by fluentd!" - else - echo "FAIL: No hits on query for logstash-* index! Exiting"; - exit 1; - fi -} - -# Tests whether fluentd has successfully tagged data with the kubernetes.var.* -# prefix via the fluent-kubernetes plugin -function check_kubernetes_tag () { - total_hits=$(curl -XGET "${ELASTICSEARCH_ENDPOINT}logstash-*/fluentd/_search?q=tag:kubernetes.var.*" -H 'Content-Type: application/json' \ - | python -c "import sys, json; print json.load(sys.stdin)['hits']['total']") - if [ "$total_hits" -gt 0 ]; then - echo "PASS: Successful hits on logstash-* index, provided by fluentd!" - else - echo "FAIL: No hits on query for logstash-* index! Exiting"; - exit 1; - fi -} - -check_logstash_index -check_kubernetes_tag diff --git a/fluentd/templates/bin/_fluentd.sh.tpl b/fluentd/templates/bin/_fluentd.sh.tpl deleted file mode 100644 index 0450572c..00000000 --- a/fluentd/templates/bin/_fluentd.sh.tpl +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -set -ex -COMMAND="${@:-start}" - -function start () { - exec /usr/sbin/td-agent -} - -function stop () { - kill -TERM 1 -} - -$COMMAND diff --git a/fluentd/templates/configmap-bin.yaml b/fluentd/templates/configmap-bin.yaml deleted file mode 100644 index 979dd365..00000000 --- a/fluentd/templates/configmap-bin.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -{{- $envAll := . }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: fluentd-bin -data: - fluentd.sh: | -{{ tuple "bin/_fluentd.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} - fluentd-test.sh: | -{{ tuple "bin/_fluentd-test.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} diff --git a/fluentd/templates/configmap-etc.yaml b/fluentd/templates/configmap-etc.yaml deleted file mode 100644 index 38d872ae..00000000 --- a/fluentd/templates/configmap-etc.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -{{- $envAll := . }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: fluentd-etc -data: - td-agent.conf: |+ -{{- tuple .Values.conf.td_agent "etc/_td-agent.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }} diff --git a/fluentd/templates/daemonset.yaml b/fluentd/templates/daemonset.yaml deleted file mode 100644 index 9ea42f38..00000000 --- a/fluentd/templates/daemonset.yaml +++ /dev/null @@ -1,73 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -{{- $envAll := . }} ---- -apiVersion: extensions/v1beta1 -kind: DaemonSet -metadata: - name: fluentd -spec: -{{ tuple $envAll "fluentd" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }} - template: - metadata: - labels: -{{ tuple $envAll "fluentd" "daemon" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} - annotations: - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} - configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} - spec: - containers: - - name: fluentd - image: {{ .Values.images.fluentd }} - imagePullPolicy: {{ .Values.images.pull_policy }} -{{ tuple $envAll $envAll.Values.pod.resources.fluentd | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} - command: - - /tmp/fluentd.sh - - start - volumeMounts: - - name: varlog - mountPath: /var/log - - name: varlibdockercontainers - mountPath: /var/lib/docker/containers - readOnly: true - - name: pod-etc-fluentd - mountPath: /etc/td-agent - - name: fluentd-etc - mountPath: /etc/td-agent/td-agent.conf - subPath: td-agent.conf - readOnly: true - - name: fluentd-bin - mountPath: /tmp/fluentd.sh - subPath: fluentd.sh - readOnly: true - volumes: - - name: varlog - hostPath: - path: /var/log - - name: varlibdockercontainers - hostPath: - path: /var/lib/docker/containers - - name: pod-etc-fluentd - emptyDir: {} - - name: fluentd-etc - configMap: - name: fluentd-etc - defaultMode: 0444 - - name: fluentd-bin - configMap: - name: fluentd-bin - defaultMode: 0555 diff --git a/fluentd/templates/etc/_td-agent.conf.tpl b/fluentd/templates/etc/_td-agent.conf.tpl deleted file mode 100644 index 1548c4ce..00000000 --- a/fluentd/templates/etc/_td-agent.conf.tpl +++ /dev/null @@ -1,234 +0,0 @@ -# This configuration file for Fluentd / td-agent is used -# to watch changes to Docker log files. The kubelet creates symlinks that -# capture the pod name, namespace, container name & Docker container ID -# to the docker logs for pods in the /var/log/containers directory on the host. -# If running this fluentd configuration in a Docker container, the /var/log -# directory should be mounted in the container. -# -# These logs are then submitted to Elasticsearch which assumes the -# installation of the fluent-plugin-elasticsearch & the -# fluent-plugin-kubernetes_metadata_filter plugins. -# See https://github.com/uken/fluent-plugin-elasticsearch & -# https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter for -# more information about the plugins. -# Maintainer: Jimmi Dyson -# -# Example -# ======= -# A line in the Docker log file might look like this JSON: -# {"log":"2014/09/25 21:15:03 Got request with path wombat\n", -# "stream":"stderr", -# "time":"2014-09-25T21:15:03.499185026Z"} -# -# The time_format specification below makes sure we properly -# parse the time format produced by Docker. This will be -# submitted to Elasticsearch and should appear like: -# $ curl 'http://elasticsearch-logging:9200/_search?pretty' -# ... -# { -# "_index" : "logstash-2014.09.25", -# "_type" : "fluentd", -# "_id" : "VBrbor2QTuGpsQyTCdfzqA", -# "_score" : 1.0, -# "_source":{"log":"2014/09/25 22:45:50 Got request with path wombat\n", -# "stream":"stderr","tag":"docker.container.all", -# "@timestamp":"2014-09-25T22:45:50+00:00"} -# }, -# ... -# -# The Kubernetes fluentd plugin is used to write the Kubernetes metadata to the log -# record & add labels to the log record if properly configured. This enables users -# to filter & search logs on any metadata. -# For example a Docker container's logs might be in the directory: -# -# /var/lib/docker/containers/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b -# -# and in the file: -# -# 997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b-json.log -# -# where 997599971ee6... is the Docker ID of the running container. -# The Kubernetes kubelet makes a symbolic link to this file on the host machine -# in the /var/log/containers directory which includes the pod name and the Kubernetes -# container name: -# -# synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log -# -> -# /var/lib/docker/containers/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b-json.log -# -# The /var/log directory on the host is mapped to the /var/log directory in the container -# running this instance of Fluentd and we end up collecting the file: -# -# /var/log/containers/synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log -# -# This results in the tag: -# -# var.log.containers.synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log -# -# The Kubernetes fluentd plugin is used to extract the namespace, pod name & container name -# which are added to the log message as a kubernetes field object & the Docker container ID -# is also added under the docker field object. -# The final tag is: -# -# kubernetes.var.log.containers.synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log -# -# And the final log record look like: -# -# { -# "log":"2014/09/25 21:15:03 Got request with path wombat\n", -# "stream":"stderr", -# "time":"2014-09-25T21:15:03.499185026Z", -# "kubernetes": { -# "namespace": "default", -# "pod_name": "synthetic-logger-0.25lps-pod", -# "container_name": "synth-lgr" -# }, -# "docker": { -# "container_id": "997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b" -# } -# } -# -# This makes it easier for users to search for logs by pod name or by -# the name of the Kubernetes container regardless of how many times the -# Kubernetes pod has been restarted (resulting in a several Docker container IDs). -# -# TODO: Propagate the labels associated with a container along with its logs -# so users can query logs using labels as well as or instead of the pod name -# and container name. This is simply done via configuration of the Kubernetes -# fluentd plugin but requires secrets to be enabled in the fluent pod. This is a -# problem yet to be solved as secrets are not usable in static pods which the fluentd -# pod must be until a per-node controller is available in Kubernetes. - -# Example: -# {"log":"[info:2016-02-16T16:04:05.930-08:00] Some log text here\n","stream":"stdout","time":"2016-02-17T00:04:05.931087621Z"} - - - type tail - path /var/lib/docker/containers/*/*-json.log - pos_file fluentd-docker.pos - time_format %Y-%m-%dT%H:%M:%S - tag kubernetes.* - format json - read_from_head true - - - - type kubernetes_metadata - - -# Examples: -# time="2016-02-04T06:51:03.053580605Z" level=info msg="GET /containers/json" -# time="2016-02-04T07:53:57.505612354Z" level=error msg="HTTP Error" err="No such lteimage: -f" statusCode=404 - - @type tail - format /^time="(?