mirror of
https://github.com/bitnami/charts.git
synced 2026-03-11 15:37:20 +08:00
Merge pull request #1498 from juan131/logstash-chart
Add new Logstash chart
This commit is contained in:
22
bitnami/logstash/.helmignore
Normal file
22
bitnami/logstash/.helmignore
Normal file
@@ -0,0 +1,22 @@
|
||||
# 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
|
||||
.vscode/
|
||||
17
bitnami/logstash/Chart.yaml
Normal file
17
bitnami/logstash/Chart.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
appVersion: 7.4.0
|
||||
description: Logstash is an open source, server-side data processing pipeline that ingests data from a multitude of sources simultaneously, transforms it, and then sends it to your favorite "stash".
|
||||
engine: gotpl
|
||||
home: https://www.elastic.co/products/logstash
|
||||
icon: https://bitnami.com/assets/stacks/logstash/img/logstash-stack-220x234.png
|
||||
keywords:
|
||||
- logstash
|
||||
- logging
|
||||
- elk
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
name: logstash
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-logstash
|
||||
version: 0.2.0
|
||||
198
bitnami/logstash/README.md
Normal file
198
bitnami/logstash/README.md
Normal file
@@ -0,0 +1,198 @@
|
||||
# Logstash
|
||||
|
||||
[Logstash](https://www.elastic.co/products/logstash) is an open source, server-side data processing pipeline that ingests data from a multitude of sources simultaneously, transforms it, and then sends it to your favorite "stash".
|
||||
|
||||
## TL;DR;
|
||||
|
||||
```console
|
||||
$ helm repo add bitnami https://charts.bitnami.com/bitnami
|
||||
$ helm install bitnami/logstash
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
This chart bootstraps a [logstash](https://github.com/bitnami/bitnami-docker-logstash) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes 1.12+
|
||||
- Helm 2.11+ or Helm 3.0-beta3+
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```console
|
||||
$ helm repo add bitnami https://charts.bitnami.com/bitnami
|
||||
$ helm install --name my-release bitnami/logstash
|
||||
```
|
||||
|
||||
These commands deploy logstash on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
|
||||
|
||||
> **Tip**: List all releases using `helm list`
|
||||
|
||||
## Uninstalling the Chart
|
||||
|
||||
To uninstall/delete the `my-release` statefulset:
|
||||
|
||||
```console
|
||||
$ helm delete my-release
|
||||
```
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release. Use the option `--purge` to delete all history too.
|
||||
|
||||
## Configuration
|
||||
|
||||
The following tables lists the configurable parameters of the Logstash chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|--------------------------------------------|----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|
|
||||
| `global.imageRegistry` | Global Docker image registry | `nil` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `global.storageClass` | Global storage class for dynamic provisioning | `nil` |
|
||||
| `image.registry` | Logstash image registry | `docker.io` |
|
||||
| `image.repository` | Logstash image name | `bitnami/logstash` |
|
||||
| `image.tag` | Logstash image tag | `{TAG_NAME}` |
|
||||
| `image.pullPolicy` | Logstash image pull policy | `IfNotPresent` |
|
||||
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `image.debug` | Specify if debug logs should be enabled | `false` |
|
||||
| `nameOverride` | String to partially override logstash.fullname template with a string (will prepend the release name) | `nil` |
|
||||
| `fullnameOverride` | String to fully override logstash.fullname template with a string | `nil` |
|
||||
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
|
||||
| `configFileName` | Logstash configuration file name. It must match the name of the configuration file mounted as a configmap. | `logstash.conf` |
|
||||
| `enableMonitoringAPI` | Whether to enable the Logstash Monitoring API or not Kubernetes cluster domain | `true` |
|
||||
| `monitoringAPIPort` | Logstash Monitoring API Port | `9600` |
|
||||
| `extraEnvVars` | Array containing extra env vars to configure Logstash | `nil` |
|
||||
| `input` | Input Plugins configuration | `Check values.yaml file` |
|
||||
| `filter` | Filter Plugins configuration | `nil` |
|
||||
| `output` | Output Plugins configuration | `Check values.yaml file` |
|
||||
| `existingConfiguration` | Name of existing ConfigMap object with the Logstash configuration (`input`, `filter`, and `output` will be ignored). | `nil` |
|
||||
| `containerPorts` | Array containing the ports to open in the Logstash container | `Check values.yaml file` |
|
||||
| `replicaCount` | The number of Logstash replicas to deploy | `1` |
|
||||
| `updateStrategy` | Update strategy (`RollingUpdate`, or `OnDelete`) | `RollingUpdate` |
|
||||
| `podManagementPolicy` | Pod management policy | `OrderedReady` |
|
||||
| `antiAffinity` | Pod anti-affinity policy | `soft` |
|
||||
| `nodeAffinity` | Node affinity policy | `{}` (The value is evaluated as a template) |
|
||||
| `nodeSelector` | Node labels for pod assignment | `{}` (The value is evaluated as a template) |
|
||||
| `tolerations` | Tolerations for pod assignment | `[]` (The value is evaluated as a template) |
|
||||
| `priorityClassName` | Controller priorityClassName | `nil` |
|
||||
| `securityContext.enabled` | Enable security context for Logstash | `true` |
|
||||
| `securityContext.fsGroup` | Group ID for the Logstash filesystem | `1001` |
|
||||
| `securityContext.runAsUser` | User ID for the Logstash container | `1001` |
|
||||
| `resources.limits` | The resources limits for the Logstash container | `{}` |
|
||||
| `resources.requests` | The requested resources for the Logstash container | `{}` |
|
||||
| `livenessProbe` | Liveness probe configuration for Logstash | `Check values.yaml file` |
|
||||
| `readinessProbe` | Readiness probe configuration for Logstash | `Check values.yaml file` |
|
||||
| `service.type` | Kubernetes service type (`ClusterIP`, `NodePort`, or `LoadBalancer`) | `ClusterIP` |
|
||||
| `service.ports` | Array containing the Logstash service ports | `Check values.yaml file` |
|
||||
| `service.annotations` | Annotations for Logstash service | `{}` |
|
||||
| `service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
|
||||
| `service.loadBalancerSourceRanges` | Address that are allowed when service is LoadBalancer | `[]` |
|
||||
| `service.clusterIP` | Static clusterIP or None for headless services | `nil` |
|
||||
| `ingress.enabled` | Enable ingress controller resource | `false` |
|
||||
| `ingress.certManager` | Add annotations for cert-manager | `false` |
|
||||
| `ingress.annotations` | Ingress annotations | `{}` |
|
||||
| `ingress.hosts[0].name` | Hostname for Logstash service | `logstash.local` |
|
||||
| `ingress.hosts[0].path` | Path within the url structure | `/` |
|
||||
| `ingress.tls[0].hosts[0]` | TLS hosts | `logstash.local` |
|
||||
| `ingress.tls[0].secretName` | TLS Secret (certificates) | `logstash.local-tls` |
|
||||
| `ingress.secrets[0].name` | TLS Secret Name | `nil` |
|
||||
| `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` |
|
||||
| `ingress.secrets[0].key` | TLS Secret Key | `nil` |
|
||||
| `metrics.enabled` | Enable the export of Prometheus metrics | `false` |
|
||||
| `metrics.image.registry` | Logstash Relay image registry | `docker.io` |
|
||||
| `metrics.image.repository` | Logstash Relay image name | `bitnami/logstash-exporter` |
|
||||
| `metrics.image.tag` | Logstash Relay image tag | `{TAG_NAME}` |
|
||||
| `metrics.image.pullPolicy` | Logstash Relay image pull policy | `IfNotPresent` |
|
||||
| `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `metrics.resources.limits` | The resources limits for the Logstash Prometheus Exporter container | `{}` |
|
||||
| `metrics.resources.requests` | The requested resources for the Logstash Prometheus Exporter container | `{}` |
|
||||
| `metrics.livenessProbe` | Liveness probe configuration for Logstash Prometheus Exporter | `Check values.yaml file` |
|
||||
| `metrics.readinessProbe` | Readiness probe configuration for Logstash Prometheus Exporter | `Check values.yaml file` |
|
||||
| `metrics.service.type` | Kubernetes service type (`ClusterIP`, `NodePort` or `LoadBalancer`) | `ClusterIP` |
|
||||
| `metrics.service.port` | Logstash Prometheus Exporter port | `9122` |
|
||||
| `metrics.service.nodePort` | Kubernetes HTTP node port | `""` |
|
||||
| `metrics.service.annotations` | Annotations for Logstash Prometheus Exporter service | `Check values.yaml file` |
|
||||
| `metrics.service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
|
||||
| `metrics.service.loadBalancerSourceRanges` | Address that are allowed when service is LoadBalancer | `[]` |
|
||||
| `metrics.service.clusterIP` | Static clusterIP or None for headless services | `nil` |
|
||||
| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
|
||||
| `metrics.serviceMonitor.namespace` | Namespace in which Prometheus is running | `nil` |
|
||||
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `nil` (Prometheus Operator default value) |
|
||||
| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `nil` (Prometheus Operator default value) |
|
||||
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `nil` |
|
||||
| `podDisruptionBudget.create` | If true, create a pod disruption budget for pods. | `false` |
|
||||
| `podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` |
|
||||
| `podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```console
|
||||
$ helm install --name my-release \
|
||||
--set enableMonitoringAPI=false bitnami/logstash
|
||||
```
|
||||
|
||||
The above command disables the Logstash Monitoring API.
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
|
||||
|
||||
```console
|
||||
$ helm install --name my-release -f values.yaml bitnami/logstash
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
|
||||
### Configure the way how to expose Logstash
|
||||
|
||||
- **Ingress**: The ingress controller must be installed in the Kubernetes cluster. Set `ingress.enabled=true` to expose Logstash through Ingress.
|
||||
- **ClusterIP**: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. Set `logstash.service.type=ClusterIP` to choose this service type.
|
||||
- **NodePort**: Exposes the service on each Node's IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting `NodeIP:NodePort`. Set `logstash.service.type=NodePort` to choose this service type.
|
||||
- **LoadBalancer**: Exposes the service externally using a cloud provider's load balancer. Set `logstash.service.type=LoadBalancer` to choose this service type.
|
||||
|
||||
### Production configuration
|
||||
|
||||
This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`:
|
||||
|
||||
- Increase the number of Logstash replicas:
|
||||
|
||||
```diff
|
||||
- replicaCount: 1
|
||||
+ replicaCount: 3
|
||||
```
|
||||
|
||||
- Enable Prometheus metrics:
|
||||
|
||||
```diff
|
||||
- metrics.enabled: false
|
||||
+ metrics.enabled: true
|
||||
```
|
||||
|
||||
### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/)
|
||||
|
||||
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
|
||||
|
||||
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
|
||||
|
||||
### Using custom configuration
|
||||
|
||||
By default, this Helm chart provides a very basic configuration for Logstash, which listen HTTP requests on port 8080 and writes them to stdout.
|
||||
|
||||
You can achieve any Logstash configuration by providing your custom configuration files. To do so, this helm chart supports to customize every configuration file.
|
||||
|
||||
Add your custom configuration files to "files/conf" in your working directory. These files will be mounted as a configMap to the containers and they will be used for configuring Logstash.
|
||||
|
||||
Alternatively, you can specify the Logstash configuration using the `logstash.input`, `logstash.filter`, and `logstash.output` parameters. Each of them, allows you to specify the Input Plugins, Filter Plugins, and Output Plugins configuration, respectively.
|
||||
|
||||
In addition to these options, you can also set an external ConfigMap with all the configuration files. This is done by setting the `logstash.existingConfiguration` parameter. Note that this will override the two previous options.
|
||||
|
||||
### Adding extra environment variables
|
||||
|
||||
In case you want to add extra environment variables, you can use the `logstash.extraEnvVars` property.
|
||||
|
||||
```yaml
|
||||
extraEnvVars:
|
||||
- name: ELASTICSEARCH_HOST
|
||||
value: "x.y.z"
|
||||
```
|
||||
3
bitnami/logstash/files/conf/README.md
Normal file
3
bitnami/logstash/files/conf/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
Place your Logstash configuration files here. This will not be used in case the value *existingConfiguration* is used.
|
||||
|
||||
More information [here](https://github.com/bitnami/bitnami-docker-logstash#configuration)
|
||||
50
bitnami/logstash/templates/NOTES.txt
Normal file
50
bitnami/logstash/templates/NOTES.txt
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
** Please be patient while the chart is being deployed **
|
||||
|
||||
Logstash can be accessed through following DNS names from within your cluster:
|
||||
|
||||
Logstash: {{ include "logstash.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
Logstash Prometheus Metrics: {{ include "logstash.fullname" . }}-metrics.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} (port {{ .Values.metrics.service.port }})
|
||||
{{- end }}
|
||||
|
||||
|
||||
To access Logstash from outside the cluster execute the following commands:
|
||||
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- $ingressHost := first .Values.ingress.hosts }}
|
||||
|
||||
You should be able to access your new Logstash server(s) through:
|
||||
|
||||
{{- range .Values.ingress.hosts }}
|
||||
{{ if .tls }}https{{- else }}http{{ end }}://{{ .name }}
|
||||
{{- end }}
|
||||
|
||||
e.g.:
|
||||
|
||||
curl {{ if .tls }}https{{- else }}http{{ end }}://{{ $ingressHost.name }}
|
||||
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "logstash.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.service.type }}
|
||||
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "logstash.fullname" . }}'
|
||||
export SERVICE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].port}" services {{ include "logstash.fullname" . }})
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "logstash.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
echo "http://${SERVICE_IP}:${SERVICE_PORT}"
|
||||
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
|
||||
export SERVICE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].port}" services {{ include "logstash.fullname" . }})
|
||||
kubectl port-forward svc/{{ include "logstash.fullname" . }} ${SERVICE_PORT}:${SERVICE_PORT} &
|
||||
echo "http://127.0.0.1:${SERVICE_PORT}"
|
||||
|
||||
{{- end }}
|
||||
|
||||
{{ include "logstash.validateValues" . }}
|
||||
{{ include "logstash.checkRollingTags" . }}
|
||||
192
bitnami/logstash/templates/_helpers.tpl
Normal file
192
bitnami/logstash/templates/_helpers.tpl
Normal file
@@ -0,0 +1,192 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "logstash.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 "logstash.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 "logstash.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "logstash.labels" -}}
|
||||
app.kubernetes.io/name: {{ include "logstash.name" . }}
|
||||
helm.sh/chart: {{ include "logstash.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
|
||||
*/}}
|
||||
{{- define "logstash.matchLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "logstash.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Logstash image name
|
||||
*/}}
|
||||
{{- define "logstash.image" -}}
|
||||
{{- $registryName := .Values.image.registry -}}
|
||||
{{- $repositoryName := .Values.image.repository -}}
|
||||
{{- $tag := .Values.image.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Prometheus metrics image name
|
||||
*/}}
|
||||
{{- define "logstash.metrics.image" -}}
|
||||
{{- $registryName := .Values.metrics.image.registry -}}
|
||||
{{- $repositoryName := .Values.metrics.image.repository -}}
|
||||
{{- $tag := .Values.metrics.image.tag | toString -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
|
||||
Also, we can't use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "logstash.imagePullSecrets" -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
|
||||
Also, we can not use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.global.imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.metrics.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.metrics.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Logstash configuration configmap.
|
||||
*/}}
|
||||
{{- define "logstash.configmapName" -}}
|
||||
{{- if .Values.existingConfiguration -}}
|
||||
{{- printf "%s" (tpl .Values.existingConfiguration $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" (include "logstash.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Renders a value that contains template.
|
||||
Usage:
|
||||
{{ include "logstash.tplValue" ( dict "value" .Values.path.to.the.Value "context" $) }}
|
||||
*/}}
|
||||
{{- define "logstash.tplValue" -}}
|
||||
{{- if typeIs "string" .value }}
|
||||
{{- tpl .value .context }}
|
||||
{{- else }}
|
||||
{{- tpl (.value | toYaml) .context }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Check if there are rolling tags in the images
|
||||
*/}}
|
||||
{{- define "logstash.checkRollingTags" -}}
|
||||
{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }}
|
||||
WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment.
|
||||
+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/
|
||||
{{- end }}
|
||||
{{- if and (contains "bitnami/" .Values.metrics.image.repository) (not (.Values.metrics.image.tag | toString | regexFind "-r\\d+$|sha256:")) }}
|
||||
WARNING: Rolling tag detected ({{ .Values.metrics.image.repository }}:{{ .Values.metrics.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment.
|
||||
+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Compile all warnings into a single message, and call fail.
|
||||
*/}}
|
||||
{{- define "logstash.validateValues" -}}
|
||||
{{- $messages := list -}}
|
||||
{{- $messages := append $messages (include "logstash.validateValues.metrics" .) -}}
|
||||
{{- $messages := without $messages "" -}}
|
||||
{{- $message := join "\n" $messages -}}
|
||||
|
||||
{{- if $message -}}
|
||||
{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Validate values of Logstash - Monitoring API must be enabled when metrics are enabled */}}
|
||||
{{- define "logstash.validateValues.metrics" -}}
|
||||
{{- if and .Values.metrics.enabled (not .Values.enableMonitoringAPI) -}}
|
||||
logstash: metrics
|
||||
The Logstash Monitoring API must be enabled when metrics are enabled (metrics.enabled=true).
|
||||
Please enable the Montoring API (--set enableMonitoringAPI="true")
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
28
bitnami/logstash/templates/configuration-cm.yaml
Normal file
28
bitnami/logstash/templates/configuration-cm.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
{{ if and (or (.Files.Glob "files/conf/*") .Values.input .Values.filter .Values.output) (not .Values.existingConfiguration) }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "logstash.fullname" . }}
|
||||
labels: {{- include "logstash.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{- if (.Files.Glob "files/conf/*") }}
|
||||
{{ (.Files.Glob "files/conf/*").AsConfig | indent 2 }}
|
||||
{{- else if (or .Values.input .Values.filter .Values.output) }}
|
||||
logstash.conf: |-
|
||||
{{- if .Values.input }}
|
||||
input {
|
||||
{{ tpl .Values.input $ | indent 6 }}
|
||||
}
|
||||
{{- end }}
|
||||
{{- if .Values.filter }}
|
||||
filter {
|
||||
{{ tpl .Values.filter $ | indent 6 }}
|
||||
}
|
||||
{{- end }}
|
||||
{{- if .Values.output }}
|
||||
output {
|
||||
{{ tpl .Values.output $ | indent 6 }}
|
||||
}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
14
bitnami/logstash/templates/headless-svc.yaml
Normal file
14
bitnami/logstash/templates/headless-svc.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "logstash.fullname" . }}-headless
|
||||
labels: {{- include "logstash.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
ports:
|
||||
{{- range $key, $value := .Values.service.ports }}
|
||||
- name: {{ $key }}
|
||||
{{ toYaml $value | indent 6 }}
|
||||
{{- end }}
|
||||
selector: {{ include "logstash.matchLabels" . | nindent 4 }}
|
||||
29
bitnami/logstash/templates/ingress.yaml
Normal file
29
bitnami/logstash/templates/ingress.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "logstash.fullname" . }}
|
||||
labels: {{ include "logstash.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- if .Values.ingress.certManager }}
|
||||
kubernetes.io/tls-acme: "true"
|
||||
{{- end }}
|
||||
{{- range $key, $value := .Values.ingress.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .name }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
backend:
|
||||
serviceName: {{ include "logstash.fullname" $ }}
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- toYaml .Values.ingress.tls | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
35
bitnami/logstash/templates/metrics-svc.yaml
Normal file
35
bitnami/logstash/templates/metrics-svc.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
{{- if .Values.metrics.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "logstash.fullname" . }}-metrics
|
||||
labels: {{ include "logstash.labels" . | nindent 4 }}
|
||||
{{- if .Values.metrics.service.annotations }}
|
||||
annotations: {{- include "logstash.tplValue" (dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.metrics.service.type }}
|
||||
{{- if and .Values.metrics.service.loadBalancerIP (eq .Values.metrics.service.type "LoadBalancer") }}
|
||||
loadBalancerIP: {{ .Values.metrics.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.metrics.service.type "LoadBalancer") .Values.metrics.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{- with .Values.metrics.service.loadBalancerSourceRanges }}
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.metrics.service.type "ClusterIP") .Values.metrics.service.clusterIP }}
|
||||
clusterIP: {{ .Values.metrics.service.clusterIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- port: {{ .Values.metrics.service.port }}
|
||||
targetPort: metrics
|
||||
protocol: TCP
|
||||
name: metrics
|
||||
{{- if (and (or (eq .Values.metrics.service.type "NodePort") (eq .Values.metrics.service.type "LoadBalancer")) (not (empty .Values.metrics.service.nodePort)))}}
|
||||
nodePort: {{ .Values.metrics.service.nodePort }}
|
||||
{{- else if eq .Values.metrics.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
selector: {{ include "logstash.matchLabels" . | nindent 4 }}
|
||||
{{- end }}
|
||||
16
bitnami/logstash/templates/pdb.yaml
Normal file
16
bitnami/logstash/templates/pdb.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
{{- if .Values.podDisruptionBudget.create }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "logstash.fullname" . }}
|
||||
labels: {{- include "logstash.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if .Values.podDisruptionBudget.minAvailable }}
|
||||
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.podDisruptionBudget.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels: {{ include "logstash.matchLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
28
bitnami/logstash/templates/servicemonitor.yaml
Normal file
28
bitnami/logstash/templates/servicemonitor.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ include "logstash.fullname" . }}
|
||||
{{- if .Values.metrics.serviceMonitor.namespace }}
|
||||
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
|
||||
{{- end }}
|
||||
labels: {{- include "logstash.labels" . | nindent 4 }}
|
||||
{{- range $key, $value := .Values.metrics.serviceMonitor.selector }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels: {{ include "logstash.matchLabels" . | nindent 6 }}
|
||||
endpoints:
|
||||
- port: metrics
|
||||
path: "/metrics"
|
||||
{{- if .Values.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
121
bitnami/logstash/templates/sts.yaml
Normal file
121
bitnami/logstash/templates/sts.yaml
Normal file
@@ -0,0 +1,121 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "logstash.fullname" . }}
|
||||
labels: {{- include "logstash.labels" . | nindent 4 }}
|
||||
spec:
|
||||
serviceName: {{ include "logstash.fullname" . }}-headless
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
podManagementPolicy: {{ .Values.podManagementPolicy }}
|
||||
updateStrategy:
|
||||
type: {{ .Values.updateStrategy }}
|
||||
{{- if (eq "OnDelete" .Values.updateStrategy) }}
|
||||
rollingUpdate: null
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels: {{- include "logstash.matchLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "logstash.labels" . | nindent 8 }}
|
||||
annotations:
|
||||
checksum/configuration: {{ include (print $.Template.BasePath "/configuration-cm.yaml") . | sha256sum }}
|
||||
spec:
|
||||
{{- include "logstash.imagePullSecrets" . | nindent 6 }}
|
||||
affinity:
|
||||
{{- if eq .Values.antiAffinity "hard" }}
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- topologyKey: "kubernetes.io/hostname"
|
||||
labelSelector:
|
||||
matchLabels: {{- include "logstash.matchLabels" . | nindent 20 }}
|
||||
{{- else if eq .Values.antiAffinity "soft" }}
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
labelSelector:
|
||||
matchLabels: {{- include "logstash.matchLabels" . | nindent 20 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeAffinity }}
|
||||
nodeAffinity: {{- toYaml .Values.nodeAffinity | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector: {{- include "logstash.tplValue" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.tolerations }}
|
||||
tolerations: {{- include "logstash.tplValue" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.priorityClassName }}
|
||||
priorityClassName: {{ .Values.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: logstash
|
||||
image: {{ include "logstash.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
{{- if .Values.configFileName }}
|
||||
- name: LOGSTASH_CONF_FILENAME
|
||||
value: {{ .Values.configFileName | quote }}
|
||||
{{- end }}
|
||||
- name: LOGSTASH_EXPOSE_API
|
||||
value: {{ ternary "yes" "no" .Values.enableMonitoringAPI | quote }}
|
||||
- name: LOGSTASH_API_PORT_NUMBER
|
||||
value: {{ .Values.monitoringAPIPort | quote }}
|
||||
{{- if .Values.extraEnvVars }}
|
||||
{{- include "logstash.tplValue" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.containerPorts }}
|
||||
ports: {{ toYaml .Values.containerPorts | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.livenessProbe }}
|
||||
livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.readinessProbe }}
|
||||
readinessProbe: {{- toYaml .Values.readinessProbe | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.resources }}
|
||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if or (.Files.Glob "files/conf/*") .Values.input .Values.filter .Values.output .Values.existingConfiguration }}
|
||||
- name: configurations
|
||||
mountPath: /bitnami/logstash/config
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: metrics
|
||||
image: {{ include "logstash.metrics.image" . }}
|
||||
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- |
|
||||
sleep 60
|
||||
exec logstash_exporter --logstash.endpoint=http://127.0.0.1:{{ .Values.monitoringAPIPort }} --web.listen-address=:9198
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9198
|
||||
protocol: TCP
|
||||
{{- if .Values.metrics.livenessProbe }}
|
||||
livenessProbe: {{- toYaml .Values.metrics.livenessProbe | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.readinessProbe }}
|
||||
readinessProbe: {{- toYaml .Values.metrics.readinessProbe | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.resources }}
|
||||
resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if or (.Files.Glob "files/conf/*") .Values.input .Values.filter .Values.output .Values.existingConfiguration }}
|
||||
- name: configurations
|
||||
configMap:
|
||||
name: {{ include "logstash.configmapName" . }}
|
||||
{{- end }}
|
||||
28
bitnami/logstash/templates/svc.yaml
Normal file
28
bitnami/logstash/templates/svc.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "logstash.fullname" . }}
|
||||
labels: {{- include "logstash.labels" . | nindent 4 }}
|
||||
{{- if .Values.service.annotations }}
|
||||
annotations: {{- include "logstash.tplValue" (dict "value" .Values.service.annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if and .Values.service.loadBalancerIP (eq .Values.service.type "LoadBalancer") }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{- with .Values.service.loadBalancerSourceRanges }}
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.service.type "ClusterIP") .Values.service.clusterIP }}
|
||||
clusterIP: {{ .Values.service.clusterIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
{{- range $key, $value := .Values.service.ports }}
|
||||
- name: {{ $key }}
|
||||
{{ toYaml $value | indent 6 }}
|
||||
{{- end }}
|
||||
selector: {{ include "logstash.matchLabels" . | nindent 4 }}
|
||||
404
bitnami/logstash/values-production.yaml
Normal file
404
bitnami/logstash/values-production.yaml
Normal file
@@ -0,0 +1,404 @@
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry, and imagePullSecrets
|
||||
##
|
||||
# global:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Bitnami Logstash image
|
||||
## ref: https://hub.docker.com/r/bitnami/logstash/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/logstash
|
||||
tag: 7.4.2-debian-9-r0
|
||||
## Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
|
||||
##
|
||||
debug: false
|
||||
|
||||
## String to partially override logstash.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override logstash.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
|
||||
## Kubernetes Cluster Domain
|
||||
##
|
||||
clusterDomain: cluster.local
|
||||
|
||||
## Logstash configuration file name. It must match the name of the configuration file mounted as a configmap
|
||||
##
|
||||
configFileName: logstash.conf
|
||||
## Whether to enable the Logstash Monitoring API or not Kubernetes cluster domain
|
||||
##
|
||||
enableMonitoringAPI: true
|
||||
## Logstash Monitoring API Port
|
||||
##
|
||||
monitoringAPIPort: 9600
|
||||
|
||||
## An array to add extra environment variables
|
||||
## For example:
|
||||
## extraEnvVars:
|
||||
## - name: ELASTICSEARCH_HOST
|
||||
## value: "x.y.z"
|
||||
##
|
||||
# extraEnvVars:
|
||||
|
||||
## Input Plugins configuration
|
||||
## ref: https://www.elastic.co/guide/en/logstash/current/input-plugins.html
|
||||
##
|
||||
input: |-
|
||||
# udp {
|
||||
# port => 1514
|
||||
# type => syslog
|
||||
# }
|
||||
# tcp {
|
||||
# port => 1514
|
||||
# type => syslog
|
||||
# }
|
||||
http { port => 8080 }
|
||||
## Filter Plugins configuration
|
||||
## ref: https://www.elastic.co/guide/en/logstash/current/filter-plugins.html
|
||||
##
|
||||
# filter: |-
|
||||
# grok {
|
||||
# match => { "message" => "%{COMBINEDAPACHELOG}" }
|
||||
# }
|
||||
# date {
|
||||
# match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
|
||||
# }
|
||||
## Output Plugins configuration
|
||||
## ref: https://www.elastic.co/guide/en/logstash/current/output-plugins.html
|
||||
##
|
||||
output: |-
|
||||
# elasticsearch {
|
||||
# hosts => ["${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}"]
|
||||
# manage_template => false
|
||||
# index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
|
||||
# }
|
||||
# gelf {
|
||||
# host => "${GRAYLOG_HOST}"
|
||||
# port => ${GRAYLOG_PORT}
|
||||
# }
|
||||
stdout {}
|
||||
|
||||
## ConfigMap with Logstash configuration
|
||||
## NOTE: This will override input, filter, and output parameters
|
||||
##
|
||||
# existingConfiguration:
|
||||
|
||||
containerPorts:
|
||||
# - name: syslog-udp
|
||||
# containerPort: 1514
|
||||
# protocol: UDP
|
||||
# - name: syslog-tcp
|
||||
# containerPort: 1514
|
||||
# protocol: TCP
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
- name: monitoring
|
||||
containerPort: 9600
|
||||
protocol: TCP
|
||||
|
||||
## Number of Logstash replicas to deploy
|
||||
##
|
||||
replicaCount: 3
|
||||
|
||||
## Update strategy, can be set to RollingUpdate or OnDelete by default.
|
||||
## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
|
||||
##
|
||||
updateStrategy: RollingUpdate
|
||||
|
||||
## Pod management policy
|
||||
## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
|
||||
##
|
||||
podManagementPolicy: OrderedReady
|
||||
|
||||
## Pod AntiAffinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
antiAffinity: soft
|
||||
|
||||
## Node Affinity. The value is evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature
|
||||
##
|
||||
nodeAffinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
|
||||
## Pod priority
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
|
||||
##
|
||||
# priorityClassName: ""
|
||||
|
||||
## K8s Security Context for Logstash pods
|
||||
## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## Logstash containers' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Logstash pods' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: monitoring
|
||||
initialDelaySeconds: 60
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 6
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: monitoring
|
||||
initialDelaySeconds: 60
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 6
|
||||
|
||||
## Service paramaters
|
||||
##
|
||||
service:
|
||||
## Service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## Logstash svc ports
|
||||
##
|
||||
ports:
|
||||
# syslog-udp:
|
||||
# port: 1514
|
||||
# targetPort: syslog-udp
|
||||
# protocol: UDP
|
||||
# syslog-tcp:
|
||||
# port: 1514
|
||||
# targetPort: syslog-tcp
|
||||
# protocol: TCP
|
||||
http:
|
||||
port: 8080
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
# loadBalancerIP:
|
||||
## Load Balancer sources
|
||||
## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
|
||||
##
|
||||
# loadBalancerSourceRanges:
|
||||
# - 10.10.10.0/24
|
||||
## Set the Cluster IP to use
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
|
||||
##
|
||||
# clusterIP: None
|
||||
## Provide any additional annotations which may be required
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## Ingress paramaters
|
||||
##
|
||||
ingress:
|
||||
## Set to true to enable ingress record generation
|
||||
enabled: false
|
||||
|
||||
## Set this to true in order to add the corresponding annotations for cert-manager
|
||||
certManager: false
|
||||
|
||||
## Ingress annotations done as key:value pairs
|
||||
## For a full list of possible ingress annotations, please see
|
||||
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/annotations.md
|
||||
##
|
||||
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
|
||||
## The list of hostnames to be covered with this ingress record.
|
||||
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||
hosts:
|
||||
- name: logstash.local
|
||||
path: /
|
||||
|
||||
## The tls configuration for the ingress
|
||||
## see: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
|
||||
# tls:
|
||||
# - hosts:
|
||||
# - logstash.local
|
||||
# secretName: logstash.local-tls
|
||||
|
||||
secrets:
|
||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||
## key and certificate should start with -----BEGIN CERTIFICATE----- or
|
||||
## -----BEGIN RSA PRIVATE KEY-----
|
||||
##
|
||||
## name should line up with a tlsSecret set further up
|
||||
## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
|
||||
##
|
||||
## It is also possible to create and manage the certificates outside of this helm chart
|
||||
## Please see README.md for more information
|
||||
# - name: logstash.local-tls
|
||||
# key:
|
||||
# certificate:
|
||||
|
||||
## Prometheus metrics
|
||||
##
|
||||
metrics:
|
||||
enabled: true
|
||||
## Bitnami Logstash Promtheus Exporter image
|
||||
## ref: https://hub.docker.com/r/bitnami/logstash-exporter/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/logstash-exporter
|
||||
tag: 0.1.2-debian-9-r15
|
||||
## Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Logstash Prometheus Exporter containers' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Prometheus Operator ServiceMonitor configuration
|
||||
##
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
## Namespace in which Prometheus is running
|
||||
##
|
||||
# namespace: monitoring
|
||||
|
||||
## Interval at which metrics should be scraped.
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
|
||||
##
|
||||
# interval: 10s
|
||||
|
||||
## Timeout after which the scrape is ended
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
|
||||
##
|
||||
# scrapeTimeout: 10s
|
||||
|
||||
## ServiceMonitor selector labels
|
||||
## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
|
||||
##
|
||||
# selector:
|
||||
# prometheus: my-prometheus
|
||||
|
||||
## Logstash Prometheus Exporter containers' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 60
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 6
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 60
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 6
|
||||
|
||||
service:
|
||||
## Service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## Logstash Prometheus port
|
||||
##
|
||||
port: 9198
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
nodePort: ""
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
## Load Balancer sources
|
||||
## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
|
||||
##
|
||||
# loadBalancerSourceRanges:
|
||||
# - 10.10.10.0/24
|
||||
## Set the Cluster IP to use
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
|
||||
##
|
||||
# clusterIP: None
|
||||
## Annotations for the Prometheus metrics service
|
||||
##
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9198"
|
||||
prometheus.io/path: "/metrics"
|
||||
|
||||
## Pod disruption budget configuration
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
|
||||
##
|
||||
podDisruptionBudget:
|
||||
## Specifies whether a Pod disruption budget should be created
|
||||
##
|
||||
create: false
|
||||
minAvailable: 1
|
||||
# maxUnavailable: 1
|
||||
404
bitnami/logstash/values.yaml
Normal file
404
bitnami/logstash/values.yaml
Normal file
@@ -0,0 +1,404 @@
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry, and imagePullSecrets
|
||||
##
|
||||
# global:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Bitnami Logstash image
|
||||
## ref: https://hub.docker.com/r/bitnami/logstash/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/logstash
|
||||
tag: 7.4.2-debian-9-r0
|
||||
## Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
|
||||
##
|
||||
debug: false
|
||||
|
||||
## String to partially override logstash.fullname template (will maintain the release name)
|
||||
##
|
||||
# nameOverride:
|
||||
|
||||
## String to fully override logstash.fullname template
|
||||
##
|
||||
# fullnameOverride:
|
||||
|
||||
## Kubernetes Cluster Domain
|
||||
##
|
||||
clusterDomain: cluster.local
|
||||
|
||||
## Logstash configuration file name. It must match the name of the configuration file mounted as a configmap
|
||||
##
|
||||
configFileName: logstash.conf
|
||||
## Whether to enable the Logstash Monitoring API or not Kubernetes cluster domain
|
||||
##
|
||||
enableMonitoringAPI: true
|
||||
## Logstash Monitoring API Port
|
||||
##
|
||||
monitoringAPIPort: 9600
|
||||
|
||||
## An array to add extra environment variables
|
||||
## For example:
|
||||
## extraEnvVars:
|
||||
## - name: ELASTICSEARCH_HOST
|
||||
## value: "x.y.z"
|
||||
##
|
||||
# extraEnvVars:
|
||||
|
||||
## Input Plugins configuration
|
||||
## ref: https://www.elastic.co/guide/en/logstash/current/input-plugins.html
|
||||
##
|
||||
input: |-
|
||||
# udp {
|
||||
# port => 1514
|
||||
# type => syslog
|
||||
# }
|
||||
# tcp {
|
||||
# port => 1514
|
||||
# type => syslog
|
||||
# }
|
||||
http { port => 8080 }
|
||||
## Filter Plugins configuration
|
||||
## ref: https://www.elastic.co/guide/en/logstash/current/filter-plugins.html
|
||||
##
|
||||
# filter: |-
|
||||
# grok {
|
||||
# match => { "message" => "%{COMBINEDAPACHELOG}" }
|
||||
# }
|
||||
# date {
|
||||
# match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
|
||||
# }
|
||||
## Output Plugins configuration
|
||||
## ref: https://www.elastic.co/guide/en/logstash/current/output-plugins.html
|
||||
##
|
||||
output: |-
|
||||
# elasticsearch {
|
||||
# hosts => ["${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}"]
|
||||
# manage_template => false
|
||||
# index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
|
||||
# }
|
||||
# gelf {
|
||||
# host => "${GRAYLOG_HOST}"
|
||||
# port => ${GRAYLOG_PORT}
|
||||
# }
|
||||
stdout {}
|
||||
|
||||
## ConfigMap with Logstash configuration
|
||||
## NOTE: This will override input, filter, and output parameters
|
||||
##
|
||||
# existingConfiguration:
|
||||
|
||||
containerPorts:
|
||||
# - name: syslog-udp
|
||||
# containerPort: 1514
|
||||
# protocol: UDP
|
||||
# - name: syslog-tcp
|
||||
# containerPort: 1514
|
||||
# protocol: TCP
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
- name: monitoring
|
||||
containerPort: 9600
|
||||
protocol: TCP
|
||||
|
||||
## Number of Logstash replicas to deploy
|
||||
##
|
||||
replicaCount: 1
|
||||
|
||||
## Update strategy, can be set to RollingUpdate or OnDelete by default.
|
||||
## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
|
||||
##
|
||||
updateStrategy: RollingUpdate
|
||||
|
||||
## Pod management policy
|
||||
## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
|
||||
##
|
||||
podManagementPolicy: OrderedReady
|
||||
|
||||
## Pod AntiAffinity
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
antiAffinity: soft
|
||||
|
||||
## Node Affinity. The value is evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature
|
||||
##
|
||||
nodeAffinity: {}
|
||||
|
||||
## Node labels for pod assignment. Evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment. Evaluated as a template.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: {}
|
||||
|
||||
## Pod priority
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
|
||||
##
|
||||
# priorityClassName: ""
|
||||
|
||||
## K8s Security Context for Logstash pods
|
||||
## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
##
|
||||
securityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
|
||||
## Logstash containers' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Logstash pods' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: monitoring
|
||||
initialDelaySeconds: 60
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 6
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: monitoring
|
||||
initialDelaySeconds: 60
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 6
|
||||
|
||||
## Service paramaters
|
||||
##
|
||||
service:
|
||||
## Service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## Logstash svc ports
|
||||
##
|
||||
ports:
|
||||
# syslog-udp:
|
||||
# port: 1514
|
||||
# targetPort: syslog-udp
|
||||
# protocol: UDP
|
||||
# syslog-tcp:
|
||||
# port: 1514
|
||||
# targetPort: syslog-tcp
|
||||
# protocol: TCP
|
||||
http:
|
||||
port: 8080
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
# loadBalancerIP:
|
||||
## Load Balancer sources
|
||||
## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
|
||||
##
|
||||
# loadBalancerSourceRanges:
|
||||
# - 10.10.10.0/24
|
||||
## Set the Cluster IP to use
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
|
||||
##
|
||||
# clusterIP: None
|
||||
## Provide any additional annotations which may be required
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## Ingress paramaters
|
||||
##
|
||||
ingress:
|
||||
## Set to true to enable ingress record generation
|
||||
enabled: false
|
||||
|
||||
## Set this to true in order to add the corresponding annotations for cert-manager
|
||||
certManager: false
|
||||
|
||||
## Ingress annotations done as key:value pairs
|
||||
## For a full list of possible ingress annotations, please see
|
||||
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/annotations.md
|
||||
##
|
||||
## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
||||
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
|
||||
## The list of hostnames to be covered with this ingress record.
|
||||
## Most likely this will be just one host, but in the event more hosts are needed, this is an array
|
||||
hosts:
|
||||
- name: logstash.local
|
||||
path: /
|
||||
|
||||
## The tls configuration for the ingress
|
||||
## see: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
|
||||
# tls:
|
||||
# - hosts:
|
||||
# - logstash.local
|
||||
# secretName: logstash.local-tls
|
||||
|
||||
secrets:
|
||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
||||
## key and certificate should start with -----BEGIN CERTIFICATE----- or
|
||||
## -----BEGIN RSA PRIVATE KEY-----
|
||||
##
|
||||
## name should line up with a tlsSecret set further up
|
||||
## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
|
||||
##
|
||||
## It is also possible to create and manage the certificates outside of this helm chart
|
||||
## Please see README.md for more information
|
||||
# - name: logstash.local-tls
|
||||
# key:
|
||||
# certificate:
|
||||
|
||||
## Prometheus metrics
|
||||
##
|
||||
metrics:
|
||||
enabled: false
|
||||
## Bitnami Logstash Promtheus Exporter image
|
||||
## ref: https://hub.docker.com/r/bitnami/logstash-exporter/tags/
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/logstash-exporter
|
||||
tag: 0.1.2-debian-9-r15
|
||||
## Specify a imagePullPolicy. Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Logstash Prometheus Exporter containers' resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
limits: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
requests: {}
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
## Prometheus Operator ServiceMonitor configuration
|
||||
##
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
## Namespace in which Prometheus is running
|
||||
##
|
||||
# namespace: monitoring
|
||||
|
||||
## Interval at which metrics should be scraped.
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
|
||||
##
|
||||
# interval: 10s
|
||||
|
||||
## Timeout after which the scrape is ended
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
|
||||
##
|
||||
# scrapeTimeout: 10s
|
||||
|
||||
## ServiceMonitor selector labels
|
||||
## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
|
||||
##
|
||||
# selector:
|
||||
# prometheus: my-prometheus
|
||||
|
||||
## Logstash Prometheus Exporter containers' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
##
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 60
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 6
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 60
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 5
|
||||
# successThreshold: 1
|
||||
# failureThreshold: 6
|
||||
|
||||
service:
|
||||
## Service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## Logstash Prometheus port
|
||||
##
|
||||
port: 9198
|
||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
||||
##
|
||||
nodePort: ""
|
||||
## Set the LoadBalancer service type to internal only.
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
||||
##
|
||||
# loadBalancerIP:
|
||||
## Load Balancer sources
|
||||
## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
|
||||
##
|
||||
# loadBalancerSourceRanges:
|
||||
# - 10.10.10.0/24
|
||||
## Set the Cluster IP to use
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
|
||||
##
|
||||
# clusterIP: None
|
||||
## Annotations for the Prometheus metrics service
|
||||
##
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9198"
|
||||
prometheus.io/path: "/metrics"
|
||||
|
||||
## Pod disruption budget configuration
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
|
||||
##
|
||||
podDisruptionBudget:
|
||||
## Specifies whether a Pod disruption budget should be created
|
||||
##
|
||||
create: false
|
||||
minAvailable: 1
|
||||
# maxUnavailable: 1
|
||||
Reference in New Issue
Block a user