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
This commit is contained in:
parent
1ade2e91be
commit
d209db907a
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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 }}
|
|
@ -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" }}
|
|
@ -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: {}
|
|
@ -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: {}
|
|
@ -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 }}
|
|
@ -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
|
|
@ -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 }}
|
|
@ -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 }}
|
|
@ -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 }}
|
|
@ -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 }}
|
|
@ -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
|
|
@ -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 }}
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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 }}
|
|
@ -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" }}
|
|
@ -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
|
|
@ -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 <jimmidyson@gmail.com>
|
||||
#
|
||||
# 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"}
|
||||
|
||||
<source>
|
||||
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
|
||||
</source>
|
||||
|
||||
<filter kubernetes.**>
|
||||
type kubernetes_metadata
|
||||
</filter>
|
||||
|
||||
# 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
|
||||
<source>
|
||||
@type tail
|
||||
format /^time="(?<time>[^)]*)" level=(?<severity>[^ ]*) msg="(?<message>[^"]*)"( err="(?<error>[^"]*)")?( statusCode=($<status_code>\d+))?/
|
||||
path /var/log/docker.log
|
||||
pos_file /var/log/es-docker.log.pos
|
||||
tag docker
|
||||
</source>
|
||||
|
||||
# Example:
|
||||
# 2016/02/04 06:52:38 filePurge: successfully removed file /var/etcd/data/member/wal/00000000000006d0-00000000010a23d1.wal
|
||||
<source>
|
||||
@type tail
|
||||
# Not parsing this, because it doesn't have anything particularly useful to
|
||||
# parse out of it (like severities).
|
||||
format none
|
||||
path /var/log/etcd.log
|
||||
pos_file /var/log/es-etcd.log.pos
|
||||
tag etcd
|
||||
</source>
|
||||
|
||||
# Multi-line parsing is required for all the kube logs because very large log
|
||||
# statements, such as those that include entire object bodies, get split into
|
||||
# multiple lines by glog.
|
||||
|
||||
# Example:
|
||||
# I0204 07:32:30.020537 3368 server.go:1048] POST /stats/container/: (13.972191ms) 200 [[Go-http-client/1.1] 10.244.1.3:40537]
|
||||
<source>
|
||||
@type tail
|
||||
format multiline
|
||||
multiline_flush_interval 5s
|
||||
format_firstline /^\w\d{4}/
|
||||
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||
time_format %m%d %H:%M:%S.%N
|
||||
path /var/log/kubelet.log
|
||||
pos_file /var/log/es-kubelet.log.pos
|
||||
tag kube.kubelet
|
||||
</source>
|
||||
|
||||
# Example:
|
||||
# I1118 21:26:53.975789 6 proxier.go:1096] Port "nodePort for kube-system/default-http-backend:http" (:31429/tcp) was open before and is still needed
|
||||
<source>
|
||||
@type tail
|
||||
format multiline
|
||||
multiline_flush_interval 5s
|
||||
format_firstline /^\w\d{4}/
|
||||
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||
time_format %m%d %H:%M:%S.%N
|
||||
path /var/log/kube-proxy.log
|
||||
pos_file /var/log/es-kube-proxy.log.pos
|
||||
tag kube.proxy
|
||||
</source>
|
||||
|
||||
# Example:
|
||||
# I0204 07:00:19.604280 5 handlers.go:131] GET /api/v1/nodes: (1.624207ms) 200 [[kube-controller-manager/v1.1.3 (linux/amd64) kubernetes/6a81b50] 127.0.0.1:38266]
|
||||
<source>
|
||||
@type tail
|
||||
format multiline
|
||||
multiline_flush_interval 5s
|
||||
format_firstline /^\w\d{4}/
|
||||
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||
time_format %m%d %H:%M:%S.%N
|
||||
path /var/log/kube-apiserver.log
|
||||
pos_file /var/log/es-kube-apiserver.log.pos
|
||||
tag kube.apiserver
|
||||
</source>
|
||||
|
||||
# Example:
|
||||
# I0204 06:55:31.872680 5 servicecontroller.go:277] LB already exists and doesn't need update for service kube-system/kube-ui
|
||||
<source>
|
||||
@type tail
|
||||
format multiline
|
||||
multiline_flush_interval 5s
|
||||
format_firstline /^\w\d{4}/
|
||||
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||
time_format %m%d %H:%M:%S.%N
|
||||
path /var/log/kube-controller-manager.log
|
||||
pos_file /var/log/es-kube-controller-manager.log.pos
|
||||
tag kube.controller.manager
|
||||
</source>
|
||||
|
||||
# Example:
|
||||
# W0204 06:49:18.239674 7 reflector.go:245] pkg/scheduler/factory/factory.go:193: watch of *api.Service ended with: 401: The event in requested index is outdated and cleared (the requested history has been cleared [2578313/2577886]) [2579312]
|
||||
<source>
|
||||
@type tail
|
||||
format multiline
|
||||
multiline_flush_interval 5s
|
||||
format_firstline /^\w\d{4}/
|
||||
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
|
||||
time_format %m%d %H:%M:%S.%N
|
||||
path /var/log/kube-scheduler.log
|
||||
pos_file /var/log/es-kube-scheduler.log.pos
|
||||
tag kube.scheduler
|
||||
</source>
|
||||
|
||||
<match **>
|
||||
@type elasticsearch
|
||||
include_tag_key true
|
||||
host elasticsearch-logging
|
||||
port 9200
|
||||
logstash_format true
|
||||
# Set the chunk limit the same as for fluentd-gcp.
|
||||
buffer_chunk_limit 2M
|
||||
# Cap buffer memory usage to 2MiB/chunk * 32 chunks = 64 MiB
|
||||
buffer_queue_limit 32
|
||||
# Flush buffer every 30s to write to Elasticsearch
|
||||
flush_interval 30s
|
||||
# Never wait longer than 5 minutes between retries.
|
||||
max_retry_wait 300
|
||||
# Disable the limit on the number of retries (retry forever).
|
||||
disable_retry_limit
|
||||
# Use multiple threads for processing.
|
||||
num_threads 8
|
||||
</match>
|
|
@ -1,44 +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:
|
||||
containers:
|
||||
- name: {{ .Release.Name }}-helm-tests
|
||||
image: {{ .Values.images.helm_tests }}
|
||||
command:
|
||||
- /tmp/fluentd-test.sh
|
||||
env:
|
||||
- name: ELASTICSEARCH_ENDPOINT
|
||||
value: {{ tuple "logging_db" "internal" "client" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
|
||||
volumeMounts:
|
||||
- name: fluentd-bin
|
||||
mountPath: /tmp/fluentd-test.sh
|
||||
subPath: fluentd-test.sh
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: fluentd-bin
|
||||
configMap:
|
||||
name: fluentd-bin
|
||||
defaultMode: 0555
|
||||
restartPolicy: Never
|
|
@ -1,62 +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 fluentd.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
images:
|
||||
fluentd: gcr.io/google_containers/fluentd-elasticsearch:1.23
|
||||
helm_tests: docker.io/kolla/ubuntu-source-elasticsearch:3.0.3
|
||||
pull_policy: IfNotPresent
|
||||
|
||||
conf:
|
||||
td_agent:
|
||||
override:
|
||||
|
||||
endpoints:
|
||||
cluster_domain_suffix: cluster.local
|
||||
logging_db:
|
||||
name: elasticsearch
|
||||
hosts:
|
||||
default: elasticsearch-logging
|
||||
public: elasticsearch
|
||||
host_fqdn_override:
|
||||
default: null
|
||||
path:
|
||||
default: null
|
||||
scheme:
|
||||
default: http
|
||||
port:
|
||||
client:
|
||||
default: 9200
|
||||
|
||||
pod:
|
||||
lifecycle:
|
||||
upgrades:
|
||||
daemonsets:
|
||||
pod_replacement_strategy: RollingUpdate
|
||||
fluentd:
|
||||
enabled: true
|
||||
min_ready_seconds: 0
|
||||
max_unavailable: 1
|
||||
resources:
|
||||
fluentd:
|
||||
enabled: false
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "2000m"
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "500m"
|
|
@ -1,23 +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.
|
||||
|
||||
description: OpenStack-Helm Kibana
|
||||
name: kibana
|
||||
version: 0.1.0
|
||||
home: https://www.elastic.co/products/kibana
|
||||
sources:
|
||||
- https://github.com/elastic/kibana
|
||||
- https://git.openstack.org/cgit/openstack/openstack-helm-addons
|
||||
maintainers:
|
||||
- name: OpenStack-Helm Authors
|
|
@ -1,30 +0,0 @@
|
|||
======
|
||||
Kibana
|
||||
======
|
||||
|
||||
This chart provides a visual dashboard for logs ingested into an Elasticsearch
|
||||
deployment. The chart leverages the kolla image for Kibana, and includes a
|
||||
templated configuration file that allows configuration overrides similar to
|
||||
other charts in OpenStack-Helm.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Out of the box, the Kibana chart assumes the Elasticsearch deployment is mapped
|
||||
to "elasticsearch-logging" and is serving on port 9200. In order to deploy
|
||||
Kibana, change the host url for Elasticsearch if necessary and run:
|
||||
|
||||
::
|
||||
helm install --name=kibana local/kibana --namespace=kube-system
|
||||
|
||||
|
||||
This will install Kibana into your cluster appropriately. The values file
|
||||
includes the ability to enable a nodeport to access Kibana if necessary.
|
||||
|
||||
|
||||
Configuration Options
|
||||
---------------------
|
||||
|
||||
The full list of configuration options for Kibana can be found here_.
|
||||
|
||||
.. _here: https://www.elastic.co/guide/en/kibana/current/settings.html
|
|
@ -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
|
|
@ -1,29 +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 kibana
|
||||
}
|
||||
|
||||
function stop () {
|
||||
kill -TERM 1
|
||||
}
|
||||
|
||||
$COMMAND
|
|
@ -1,23 +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: kibana-bin
|
||||
data:
|
||||
kibana.sh: |
|
||||
{{ tuple "bin/_kibana.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
|
@ -1,33 +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: kibana-etc
|
||||
data:
|
||||
kibana.yml: |+
|
||||
{{- if .Values.conf.kibana.override -}}
|
||||
{{ .Values.conf.kibana.override | indent 4 }}
|
||||
{{- else -}}
|
||||
{{- if .Values.conf.kibana.prefix -}}
|
||||
{{ .Values.conf.kibana.prefix | indent 4 }}
|
||||
{{- end }}
|
||||
{{ tuple "etc/_kibana.yml.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.conf.kibana.append -}}
|
||||
{{ .Values.conf.kibana.append | indent 4 }}
|
||||
{{- end }}
|
|
@ -1,65 +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: kibana
|
||||
spec:
|
||||
replicas: {{ .Values.pod.replicas.kibana }}
|
||||
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{ tuple $envAll "kibana" "dashboard" | 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: kibana
|
||||
image: {{ .Values.images.kibana }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.kibana | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
command:
|
||||
- /tmp/kibana.sh
|
||||
- start
|
||||
ports:
|
||||
- containerPort: {{ .Values.network.kibana.port }}
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: kibana-bin
|
||||
mountPath: /tmp/kibana.sh
|
||||
subPath: kibana.sh
|
||||
readOnly: true
|
||||
- name: etckibana
|
||||
mountPath: /etc/kibana
|
||||
- name: kibana-etc
|
||||
mountPath: /etc/kibana/kibana.yml
|
||||
subPath: kibana.yml
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: kibana-bin
|
||||
configMap:
|
||||
name: kibana-bin
|
||||
defaultMode: 0555
|
||||
- name: etckibana
|
||||
emptyDir: {}
|
||||
- name: kibana-etc
|
||||
configMap:
|
||||
name: kibana-etc
|
||||
defaultMode: 0444
|
|
@ -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.
|
||||
*/}}
|
||||
|
||||
# Kibana is served by a back end server. This setting specifies the port to use.
|
||||
server.port: {{ .Values.network.kibana.port }}
|
||||
|
||||
# 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.
|
||||
# To allow connections from remote users, set this parameter to a non-loopback address.
|
||||
server.host: {{ .Values.conf.server.host | default "localhost" }}
|
||||
|
||||
# The maximum payload size in bytes for incoming server requests.
|
||||
server.maxPayloadBytes: {{ .Values.conf.server.max_payload_bytes | default 1048576 }}
|
||||
|
||||
# The URL of the Elasticsearch instance to use for all your queries.
|
||||
elasticsearch.url: {{ tuple "log_database" "default" "client" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }}
|
||||
|
||||
# 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.
|
||||
elasticsearch.preserveHost: {{ .Values.conf.elasticsearch.preserve_host | default true }}
|
||||
|
||||
# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
|
||||
# dashboards. Kibana creates a new index if the index doesn't already exist.
|
||||
kibana.index: {{ .Values.conf.kibana.index | default ".kibana" }}
|
||||
|
||||
# The default application to load.
|
||||
kibana.defaultAppId: {{ .Values.conf.kibana.default_app_id | default "discover" }}
|
||||
|
||||
# If your Elasticsearch is protected with basic authentication, these settings provide
|
||||
# the username and password that the Kibana server uses to perform maintenance on the Kibana
|
||||
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
|
||||
# is proxied through the Kibana server.
|
||||
{{ if .Values.conf.elasticsearch.auth.enabled }}
|
||||
elasticsearch.username: {{ .Values.conf.elasticsearch.username }}
|
||||
elasticsearch.password: {{ .Values.conf.elasticsearch.password }}
|
||||
{{ end }}
|
||||
|
||||
# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.
|
||||
# These settings enable SSL for outgoing requests from the Kibana server to the browser.
|
||||
{{ if .Values.conf.server.ssl.enabled }}
|
||||
server.ssl.enabled: {{ .Values.conf.server.ssl.enabled }}
|
||||
server.ssl.certificate: {{ .Values.conf.server.ssl.certificate }}
|
||||
server.ssl.key: {{ .Values.conf.server.ssl.key }}
|
||||
{{ end }}
|
||||
|
||||
# Optional settings that provide the paths to the PEM-format SSL certificate and key files.
|
||||
# These files validate that your Elasticsearch backend uses the same key files.
|
||||
{{ if .Values.conf.elasticsearch.ssl.enabled }}
|
||||
elasticsearch.ssl.certificate: {{ .Values.conf.elasticsearch.ssl.certificate }}
|
||||
elasticsearch.ssl.key: {{ .Values.conf.elasticsearch.ssl.key }}
|
||||
|
||||
# Optional setting that enables you to specify a path to the PEM file for the certificate
|
||||
# authority for your Elasticsearch instance.
|
||||
# example: elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ]
|
||||
elasticsearch.ssl.certificateAuthorities: {{ .Values.conf.elasticsearch.ssl.certificate_authorities }}
|
||||
|
||||
# To disregard the validity of SSL certificates, change this setting's value to 'none'.
|
||||
elasticsearch.ssl.verificationMode: {{ .Values.conf.elasticsearch.ssl.verification_mode }}
|
||||
{{ end }}
|
||||
|
||||
# Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of
|
||||
# the elasticsearch.requestTimeout setting.
|
||||
elasticsearch.pingTimeout: {{ .Values.conf.elasticsearch.ping_timeout }}
|
||||
|
||||
# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value
|
||||
# must be a positive integer.
|
||||
elasticsearch.requestTimeout: {{ .Values.conf.elasticsearch.request_timeout }}
|
||||
|
||||
# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side
|
||||
# headers, set this value to [] (an empty list).
|
||||
# example: elasticsearch.requestHeadersWhitelist: [ authorization ]
|
||||
elasticsearch.requestHeadersWhitelist: {{ .Values.conf.elasticsearch.request_headers_whitelist }}
|
||||
|
||||
# Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten
|
||||
# by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist confuration.
|
||||
elasticsearch.customHeaders: {{ .Values.conf.elasticsearch.custom_headers }}
|
||||
|
||||
# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
|
||||
elasticsearch.shardTimeout: {{ .Values.conf.elasticsearch.shard_timeout }}
|
||||
|
||||
# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.
|
||||
elasticsearch.startupTimeout: {{ .Values.conf.elasticsearch.startup_timeout }}
|
||||
|
||||
# Enables you specify a file where Kibana stores log output.
|
||||
logging.dest: "stdout"
|
||||
|
||||
# Set the value of this setting to true to suppress all logging output.
|
||||
logging.silent: {{ .Values.conf.logging.silent }}
|
||||
|
||||
# Set the value of this setting to true to suppress all logging output other than error messages.
|
||||
logging.quiet: {{ .Values.conf.logging.quiet }}
|
||||
|
||||
# Set the value of this setting to true to log all events, including system usage information
|
||||
# and all requests.
|
||||
logging.verbose: {{ .Values.conf.logging.verbose }}
|
||||
|
||||
# Set the interval in milliseconds to sample system and process performance
|
||||
# metrics. Minimum is 100ms. Defaults to 5000.
|
||||
ops.interval: {{ .Values.conf.ops.interval }}
|
||||
|
||||
# The default locale. This locale can be used in certain circumstances to substitute any missing
|
||||
# translations.
|
||||
i18n.defaultLocale: {{ .Values.conf.il8n.default_locale }}
|
|
@ -1,33 +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 "log_dashboard" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.network.kibana.port }}
|
||||
protocol: TCP
|
||||
{{ if .Values.network.kibana.node_port.enabled }}
|
||||
nodePort: {{ .Values.network.kibana.node_port.port }}
|
||||
{{ end }}
|
||||
selector:
|
||||
{{ tuple $envAll "kibana" "dashboard" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||
{{ if .Values.network.kibana.node_port.enabled }}
|
||||
type: NodePort
|
||||
{{ end }}
|
|
@ -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.
|
||||
|
||||
labels:
|
||||
node_selector_key:
|
||||
node_selector_value:
|
||||
|
||||
images:
|
||||
kibana: 'docker.io/kibana:5.4.2'
|
||||
pull_policy: IfNotPresent
|
||||
|
||||
conf:
|
||||
elasticsearch:
|
||||
auth:
|
||||
enabled: false
|
||||
password: null
|
||||
username: null
|
||||
custom_headers: '{}'
|
||||
ping_timeout: 1500
|
||||
preserve_host: true
|
||||
request_headers_whitelist: '[]'
|
||||
request_timeout: 30000
|
||||
shard_timeout: 0
|
||||
ssl:
|
||||
certificate: null
|
||||
certificate_authorities: null
|
||||
enabled: null
|
||||
key: null
|
||||
startup_timeout: 5000
|
||||
il8n:
|
||||
default_locale: en
|
||||
kibana:
|
||||
default_app_id: discover
|
||||
index: .kibana
|
||||
logging:
|
||||
quiet: false
|
||||
silent: false
|
||||
verbose: false
|
||||
ops:
|
||||
interval: 5000
|
||||
server:
|
||||
host: 0.0.0.0
|
||||
ssl:
|
||||
certificate: null
|
||||
enabled: false
|
||||
key: null
|
||||
override:
|
||||
prefix:
|
||||
append:
|
||||
|
||||
endpoints:
|
||||
cluster_domain_suffix: cluster.local
|
||||
log_database:
|
||||
hosts:
|
||||
default: elasticsearch-logging
|
||||
public: elasticsearch
|
||||
host_fqdn_override:
|
||||
default: null
|
||||
name: elasticsearch
|
||||
path:
|
||||
default: null
|
||||
port:
|
||||
client:
|
||||
default: 9200
|
||||
scheme:
|
||||
default: http
|
||||
log_dashboard:
|
||||
hosts:
|
||||
default: kibana-dash
|
||||
public: kibana
|
||||
host_fqdn_override:
|
||||
default: null
|
||||
name: kibana
|
||||
path:
|
||||
default: null
|
||||
port:
|
||||
dashboard:
|
||||
default: 5601
|
||||
|
||||
network:
|
||||
kibana:
|
||||
node_port:
|
||||
enabled: false
|
||||
port: 30905
|
||||
port: 5601
|
||||
|
||||
pod:
|
||||
lifecycle:
|
||||
upgrades:
|
||||
deployments:
|
||||
pod_replacement_strategy: RollingUpdate
|
||||
revision_history: 3
|
||||
rolling_update:
|
||||
max_surge: 3
|
||||
max_unavailable: 1
|
||||
replicas:
|
||||
kibana: 3
|
||||
resources:
|
||||
kibana:
|
||||
enabled: false
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
|
@ -20,19 +20,9 @@ helm_build
|
|||
|
||||
helm search
|
||||
|
||||
helm install --name=kibana local/kibana --namespace=kube-system
|
||||
|
||||
kube_wait_for_pods kube-system 600
|
||||
|
||||
# todo(srwilkers): implement helm tests for postgresql
|
||||
#helm_test_deployment postgresql openstack
|
||||
|
||||
helm install --name=elasticsearch local/elasticsearch --namespace=kube-system \
|
||||
--set conf.elasticsearch.bootstrap.memory_lock=false
|
||||
|
||||
helm install --name=fluentd local/fluentd --namespace=kube-system
|
||||
|
||||
kube_wait_for_pods kube-system 600
|
||||
|
||||
helm_test_deployment elasticsearch kube-system
|
||||
helm_test_deployment fluentd kube-system
|
||||
|
|
Loading…
Reference in New Issue