diff --git a/incubator/elastic-stack/Chart.yaml b/incubator/elastic-stack/Chart.yaml index fc311b4a29..bfcc998b1e 100644 --- a/incubator/elastic-stack/Chart.yaml +++ b/incubator/elastic-stack/Chart.yaml @@ -1,14 +1,9 @@ +# elastic-stack has been promoted to stable +deprecated: true apiVersion: v1 description: A Helm chart for ELK home: https://www.elastic.co/products icon: https://www.elastic.co/assets/bltb35193323e8f1770/logo-elastic-stack-lt.svg name: elastic-stack -version: 0.11.0 +version: 0.11.1 appVersion: 6.0 -maintainers: -- name: rendhalver - email: pete.brown@powerhrg.com -- name: jar361 - email: jrodgers@powerhrg.com -- name: christian-roggia - email: christian.roggia@gmail.com diff --git a/incubator/elastic-stack/README.md b/incubator/elastic-stack/README.md index 3d857a41f4..cd35cf940c 100644 --- a/incubator/elastic-stack/README.md +++ b/incubator/elastic-stack/README.md @@ -1,5 +1,7 @@ # Elastic-stack Helm Chart +**Note - this chart has been deprecated and [moved to stable](../../stable/elastic-stack)**. + This chart installs an elasticsearch cluster with kibana and logstash by default. You can optionally disable logstash and install Fluentd if you prefer. It also optionally installs filebeat, nginx-ldapauth-proxy and elasticsearch-curator. diff --git a/incubator/elastic-stack/templates/NOTES.txt b/incubator/elastic-stack/templates/NOTES.txt index 96ae71d8eb..1b2a70852a 100644 --- a/incubator/elastic-stack/templates/NOTES.txt +++ b/incubator/elastic-stack/templates/NOTES.txt @@ -1,5 +1,10 @@ The elasticsearch cluster and associated extras have been installed. +*** +Please note that this chart has been deprecated and moved to stable. +Going forward please use the stable version of this chart. +*** + Kibana can be accessed: * Within your cluster, at the following DNS name at port 9200: diff --git a/stable/elastic-stack/.helmignore b/stable/elastic-stack/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/stable/elastic-stack/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/stable/elastic-stack/Chart.yaml b/stable/elastic-stack/Chart.yaml new file mode 100644 index 0000000000..8387c6ea97 --- /dev/null +++ b/stable/elastic-stack/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +description: A Helm chart for ELK +home: https://www.elastic.co/products +icon: https://www.elastic.co/assets/bltb35193323e8f1770/logo-elastic-stack-lt.svg +name: elastic-stack +version: 1.0.0 +appVersion: 6.0 +maintainers: +- name: rendhalver + email: pete.brown@powerhrg.com +- name: jar361 + email: jrodgers@powerhrg.com +- name: christian-roggia + email: christian.roggia@gmail.com diff --git a/stable/elastic-stack/OWNERS b/stable/elastic-stack/OWNERS new file mode 100644 index 0000000000..ee2cba86a8 --- /dev/null +++ b/stable/elastic-stack/OWNERS @@ -0,0 +1,6 @@ +approvers: +- christian-roggia +- rendhalver +reviewers: +- christian-roggia +- rendhalver diff --git a/stable/elastic-stack/README.md b/stable/elastic-stack/README.md new file mode 100644 index 0000000000..a11e3273a4 --- /dev/null +++ b/stable/elastic-stack/README.md @@ -0,0 +1,43 @@ +# Elastic-stack Helm Chart + +This chart installs an elasticsearch cluster with kibana and logstash by default. +You can optionally disable logstash and install Fluentd if you prefer. It also optionally installs filebeat, nginx-ldapauth-proxy and elasticsearch-curator. + +## Prerequisites Details + +* Kubernetes 1.8+ +* PV dynamic provisioning support on the underlying infrastructure + +## Chart Details +This chart will do the following: + +* Implemented a dynamically scalable elasticsearch cluster using Kubernetes StatefulSets/Deployments +* Multi-role deployment: master, client (coordinating) and data nodes +* Statefulset Supports scaling down without degrading the cluster + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install --name my-release stable/elastic-stack +``` + +## Deleting the Charts + +Delete the Helm deployment as normal + +``` +$ helm delete my-release +``` + +Deletion of the StatefulSet doesn't cascade to deleting associated PVCs. To delete them: + +``` +$ kubectl delete pvc -l release=my-release,component=data +``` + +## Configuration + +Each requirement is configured with the options provided by that Chart. +Please consult the relevant charts for their configuration options. diff --git a/stable/elastic-stack/requirements.lock b/stable/elastic-stack/requirements.lock new file mode 100644 index 0000000000..e11a7e201e --- /dev/null +++ b/stable/elastic-stack/requirements.lock @@ -0,0 +1,33 @@ +dependencies: +- name: elasticsearch + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 1.13.2 +- name: kibana + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 0.16.4 +- name: filebeat + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 1.0.3 +- name: logstash + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 1.1.0 +- name: fluentd + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 1.0.0 +- name: fluent-bit + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 0.15.0 +- name: fluentd-elasticsearch + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 1.1.0 +- name: nginx-ldapauth-proxy + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 0.1.2 +- name: elasticsearch-curator + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 1.0.1 +- name: elasticsearch-exporter + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 0.4.1 +digest: sha256:8107bab1d2e9cff9bb3452bd3f21fa0e3a681a62a79a732466a2dafb7ad2d3d3 +generated: 2018-11-01T13:44:47.784814059-04:00 diff --git a/stable/elastic-stack/requirements.yaml b/stable/elastic-stack/requirements.yaml new file mode 100644 index 0000000000..13cc84b2f3 --- /dev/null +++ b/stable/elastic-stack/requirements.yaml @@ -0,0 +1,39 @@ +dependencies: +- name: elasticsearch + version: ^1.10.0 + repository: https://kubernetes-charts.storage.googleapis.com/ +- name: kibana + version: ^0.16.0 + repository: https://kubernetes-charts.storage.googleapis.com/ +- name: filebeat + version: ^1.0.0 + repository: https://kubernetes-charts.storage.googleapis.com/ + condition: filebeat.enabled +- name: logstash + version: ^1.1.0 + repository: https://kubernetes-charts.storage.googleapis.com/ + condition: logstash.enabled +- name: fluentd + version: ^1.0.0 + repository: https://kubernetes-charts.storage.googleapis.com/ + condition: fluentd.enabled +- name: fluent-bit + version: ^0.13.0 + repository: https://kubernetes-charts.storage.googleapis.com/ + condition: fluent-bit.enabled +- name: fluentd-elasticsearch + version: ^1.0.0 + repository: https://kubernetes-charts.storage.googleapis.com/ + condition: fluentd-elasticsearch.enabled +- name: nginx-ldapauth-proxy + version: ^0.1.0 + repository: https://kubernetes-charts.storage.googleapis.com/ + condition: nginx-ldapauth-proxy.enabled +- name: elasticsearch-curator + version: ^1.0.0 + repository: https://kubernetes-charts.storage.googleapis.com/ + condition: elasticsearch-curator.enabled +- name: elasticsearch-exporter + version: ^0.4.0 + repository: https://kubernetes-charts.storage.googleapis.com/ + condition: elasticsearch-exporter.enabled diff --git a/stable/elastic-stack/templates/NOTES.txt b/stable/elastic-stack/templates/NOTES.txt new file mode 100644 index 0000000000..96ae71d8eb --- /dev/null +++ b/stable/elastic-stack/templates/NOTES.txt @@ -0,0 +1,31 @@ +The elasticsearch cluster and associated extras have been installed. + +Kibana can be accessed: + + * Within your cluster, at the following DNS name at port 9200: + + {{ template "kibana.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local + + * From outside the cluster, run these commands in the same shell: + {{- if contains "NodePort" .Values.kibana.service.type }} + + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "kibana.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT + {{- else if contains "LoadBalancer" .Values.kibana.service.type }} + + WARNING: You have likely exposed your Elasticsearch cluster direct to the internet. + Elasticsearch does not implement any security for public facing clusters by default. + As a minimum level of security; switch to ClusterIP/NodePort and place an Nginx gateway infront of the cluster in order to lock down access to dangerous HTTP endpoints and verbs. + + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ template "kibana.fullname" . }}' + + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kibana.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:9200 + {{- else if contains "ClusterIP" .Values.kibana.service.type }} + + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "kibana.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:5601 to use Kibana" + kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME 5601:5601 + {{- end }} diff --git a/stable/elastic-stack/templates/_helpers.tpl b/stable/elastic-stack/templates/_helpers.tpl new file mode 100644 index 0000000000..c23cdb96b1 --- /dev/null +++ b/stable/elastic-stack/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "elastic-stack.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "elastic-stack.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "elastic-stack.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/stable/elastic-stack/values.yaml b/stable/elastic-stack/values.yaml new file mode 100644 index 0000000000..0310401ca6 --- /dev/null +++ b/stable/elastic-stack/values.yaml @@ -0,0 +1,63 @@ +# Default values for elk. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +kibana: + env: + ELASTICSEARCH_URL: http://http.default.svc.cluster.local:9200 + +logstash: + enabled: true + # elasticsearch: + # host: elastic-stack-elasticsearch-client + +filebeat: + enabled: false + # config: + # output.file.enabled: false + # output.logstash: + # hosts: ["elastic-stack-logstash:5044"] + # indexTemplateLoad: + # - elastic-stack-elasticsearch-client:9200 + +fluentd: + enabled: false + +fluent-bit: + enabled: false + +fluentd-elasticsearch: + enabled: false + +nginx-ldapauth-proxy: + enabled: false + # Example config to get it working with ELK. Adjust as you need to. + # proxy: + # port: 5601 + # # This is the internal hostname for the kibana service + # host: "elk-kibana.default.svc.cluster.local" + # authName: "ELK:Infrastructure:LDAP" + # ldapHost: "ldap.example.com" + # ldapDN: "dc=example,dc=com" + # ldapFilter: "objectClass=organizationalPerson" + # ldapBindDN: "cn=reader,dc=example,dc=com" + # requires: + # - name: "ELK-USER" + # filter: "cn=elkuser,ou=groups,dc=example,dc=com" + # ingress: + # enabled: true + # hosts: + # - "elk.example.com" + # annotations: + # kubernetes.io/ingress.class: nginx + # tls: + # - hosts: + # - elk.example.com + # secretName: example-elk-tls + # secrets: + # ldapBindPassword: PASSWORD +elasticsearch-curator: + enabled: false + +elasticsearch-exporter: + enabled: false