This repository has been archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[logstash] first version of logstash helm chart
- Loading branch information
Showing
16 changed files
with
740 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tests/ | ||
.pytest_cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
description: Official Elastic helm chart for Logstash | ||
home: https://github.com/elastic/helm-charts | ||
maintainers: | ||
- email: helm-charts@elastic.co | ||
name: Elastic | ||
name: logstash | ||
version: 7.4.0 | ||
appVersion: 7.4.0 | ||
sources: | ||
- https://github.com/elastic/logstash | ||
icon: https://helm.elastic.co/icons/logstash.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../helpers/common.mk |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "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). | ||
*/}} | ||
{{- define "fullname" -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return the appropriate apiVersion for statefulset. | ||
*/}} | ||
{{- define "logstash.statefulset.apiVersion" -}} | ||
{{- if semverCompare "<1.9-0" .Capabilities.KubeVersion.GitVersion -}} | ||
{{- print "apps/v1beta2" -}} | ||
{{- else -}} | ||
{{- print "apps/v1" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Return the appropriate apiVersion for ingress. | ||
*/}} | ||
{{- define "logstash.ingress.apiVersion" -}} | ||
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} | ||
{{- print "extensions/v1beta1" -}} | ||
{{- else -}} | ||
{{- print "networking.k8s.io/v1beta1" -}} | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if .Values.logstashConfig }} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "fullname" . }}-config | ||
labels: | ||
app: "{{ template "fullname" . }}" | ||
chart: "{{ .Chart.Name }}" | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
data: | ||
{{- range $path, $config := .Values.logstashConfig }} | ||
{{ $path }}: | | ||
{{ $config | indent 4 -}} | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if .Values.logstashPipeline }} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "fullname" . }}-pipeline | ||
labels: | ||
app: "{{ template "fullname" . }}" | ||
chart: "{{ .Chart.Name }}" | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
data: | ||
{{- range $path, $config := .Values.logstashPipeline }} | ||
{{ $path }}: | | ||
{{ $config | indent 4 -}} | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
{{- $fullName := include "fullname" . -}} | ||
{{- $servicePort := .Values.service.port -}} | ||
{{- $ingressPath := .Values.ingress.path -}} | ||
apiVersion: {{ template "logstash.ingress.apiVersion" . }} | ||
kind: Ingress | ||
metadata: | ||
name: {{ $fullName }} | ||
labels: | ||
app: "{{ template "fullname" . }}" | ||
chart: "{{ .Chart.Name }}" | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
{{- with .Values.ingress.annotations }} | ||
annotations: | ||
{{ toYaml . | indent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
{{ toYaml .Values.ingress.tls | indent 4 }} | ||
{{- end }} | ||
rules: | ||
{{- range .Values.ingress.hosts }} | ||
- host: {{ . }} | ||
http: | ||
paths: | ||
- path: {{ $ingressPath }} | ||
backend: | ||
serviceName: {{ $fullName }} | ||
servicePort: {{ $servicePort }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
{{- if .Values.maxUnavailable }} | ||
apiVersion: policy/v1beta1 | ||
kind: PodDisruptionBudget | ||
metadata: | ||
name: "{{ template "fullname" . }}-pdb" | ||
labels: | ||
app: "{{ template "fullname" . }}" | ||
chart: "{{ .Chart.Name }}" | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
spec: | ||
maxUnavailable: {{ .Values.maxUnavailable }} | ||
selector: | ||
matchLabels: | ||
app: "{{ template "fullname" . }}" | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{- if .Values.podSecurityPolicy.create -}} | ||
{{- $fullName := include "fullname" . -}} | ||
apiVersion: policy/v1beta1 | ||
kind: PodSecurityPolicy | ||
metadata: | ||
name: {{ default $fullName .Values.podSecurityPolicy.name | quote }} | ||
labels: | ||
app: "{{ template "fullname" . }}" | ||
chart: "{{ .Chart.Name }}" | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
spec: | ||
{{ toYaml .Values.podSecurityPolicy.spec | indent 2 }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{{- if .Values.rbac.create -}} | ||
{{- $fullName := include "fullname" . -}} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: {{ $fullName | quote }} | ||
labels: | ||
app: "{{ template "fullname" . }}" | ||
chart: "{{ .Chart.Name }}" | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
rules: | ||
- apiGroups: | ||
- extensions | ||
resources: | ||
- podsecuritypolicies | ||
resourceNames: | ||
{{- if eq .Values.podSecurityPolicy.name "" }} | ||
- {{ $fullName | quote }} | ||
{{- else }} | ||
- {{ .Values.podSecurityPolicy.name | quote }} | ||
{{- end }} | ||
verbs: | ||
- use | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{{- if .Values.rbac.create -}} | ||
{{- $fullName := include "fullname" . -}} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: {{ $fullName | quote }} | ||
labels: | ||
app: "{{ template "fullname" . }}" | ||
chart: "{{ .Chart.Name }}" | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
subjects: | ||
- kind: ServiceAccount | ||
{{- if eq .Values.rbac.serviceAccountName "" }} | ||
name: {{ $fullName | quote }} | ||
{{- else }} | ||
name: {{ .Values.rbac.serviceAccountName | quote }} | ||
{{- end }} | ||
namespace: {{ .Release.Namespace | quote }} | ||
roleRef: | ||
kind: Role | ||
name: {{ $fullName | quote }} | ||
apiGroup: rbac.authorization.k8s.io | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ template "fullname" . }} | ||
labels: | ||
app: "{{ template "fullname" . }}" | ||
chart: "{{ .Chart.Name }}" | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
annotations: | ||
{{ toYaml .Values.service.annotations | indent 4 }} | ||
spec: | ||
type: {{ .Values.service.type }} | ||
selector: | ||
app: "{{ template "fullname" . }}" | ||
chart: "{{ .Chart.Name }}" | ||
release: {{ .Release.Name | quote }} | ||
heritage: {{ .Release.Service | quote }} | ||
ports: | ||
- name: http | ||
port: {{ .Values.service.port }} | ||
protocol: TCP | ||
targetPort: {{ .Values.httpPort }} | ||
{{- if .Values.service.nodePort }} | ||
nodePort: {{ .Values.service.nodePort }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{- if .Values.rbac.create -}} | ||
{{- $fullName := include "fullname" . -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
{{- if eq .Values.rbac.serviceAccountName "" }} | ||
name: {{ $fullName | quote }} | ||
{{- else }} | ||
name: {{ .Values.rbac.serviceAccountName | quote }} | ||
{{- end }} | ||
labels: | ||
app: "{{ template "fullname" . }}" | ||
chart: "{{ .Chart.Name }}" | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
{{- end -}} |
Oops, something went wrong.