Add command and args parameters to beats and logstash
Task: 39337 Change-Id: If35ea14aabe10ecfd017648a1c40b2c5917d6c13 Signed-off-by: Simon Cousineau <Simon.Cousineau@windriver.com>
This commit is contained in:
parent
d1ee1b4c3b
commit
f97b837f49
@ -24,6 +24,7 @@ Patch03: 0003-set-initial-masters-to-master-0.patch
|
||||
Patch04: 0004-Update-Elastic-Apps-to-7.6.0-Releases.patch
|
||||
Patch05: 0005-readiness-probe-enhancements.patch
|
||||
Patch06: 0006-Metricbeat-nodeSelector-and-tolerations-config.patch
|
||||
Patch07: 0007-Add-command-and-args-parameters-to-beats-and-logstash.patch
|
||||
|
||||
BuildRequires: helm
|
||||
|
||||
@ -38,6 +39,7 @@ Monitor Helm elasticsearch charts
|
||||
%patch04 -p1
|
||||
%patch05 -p1
|
||||
%patch06 -p1
|
||||
%patch07 -p1
|
||||
|
||||
%build
|
||||
# initialize helm and build the toolkit
|
||||
|
@ -0,0 +1,152 @@
|
||||
From cb973a12ae6bd542cf25881afb56155f7c397d3c Mon Sep 17 00:00:00 2001
|
||||
From: Simon Cousineau <Simon.Cousineau@windriver.com>
|
||||
Date: Wed, 8 Apr 2020 11:03:14 -0400
|
||||
Subject: [PATCH 1/1] Add command and args parameters to beats and logstash
|
||||
|
||||
---
|
||||
filebeat/templates/daemonset.yaml | 8 ++++++++
|
||||
filebeat/values.yaml | 6 ++++++
|
||||
logstash/templates/statefulset.yaml | 8 ++++++++
|
||||
logstash/values.yaml | 6 ++++++
|
||||
metricbeat/templates/daemonset.yaml | 8 ++++++++
|
||||
metricbeat/templates/deployment.yaml | 8 ++++++++
|
||||
metricbeat/values.yaml | 10 ++++++++++
|
||||
7 files changed, 54 insertions(+)
|
||||
|
||||
diff --git a/filebeat/templates/daemonset.yaml b/filebeat/templates/daemonset.yaml
|
||||
index 6e8be91..e0b67ba 100644
|
||||
--- a/filebeat/templates/daemonset.yaml
|
||||
+++ b/filebeat/templates/daemonset.yaml
|
||||
@@ -148,9 +148,17 @@ spec:
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
|
||||
args:
|
||||
+{{- if .Values.args }}
|
||||
+{{ toYaml .Values.args | indent 8 }}
|
||||
+{{- else }}
|
||||
- "-e"
|
||||
- "-E"
|
||||
- "http.enabled=true"
|
||||
+{{- end }}
|
||||
+{{- if .Values.command }}
|
||||
+ command:
|
||||
+{{ toYaml .Values.command | indent 8 }}
|
||||
+{{- end }}
|
||||
livenessProbe:
|
||||
{{ toYaml .Values.livenessProbe | indent 10 }}
|
||||
readinessProbe:
|
||||
diff --git a/filebeat/values.yaml b/filebeat/values.yaml
|
||||
index f83a19f..015e6fd 100755
|
||||
--- a/filebeat/values.yaml
|
||||
+++ b/filebeat/values.yaml
|
||||
@@ -140,3 +140,9 @@ fullnameOverride: ""
|
||||
# Will be used in index name
|
||||
systemNameForIndex: ""
|
||||
indexNamePrefix: filebeat-%{[agent.version]}
|
||||
+
|
||||
+# pass custom command. This is equivalent of Entrypoint in docker
|
||||
+command: []
|
||||
+
|
||||
+# pass custom args. This is equivalent of Cmd in docker
|
||||
+args: []
|
||||
diff --git a/logstash/templates/statefulset.yaml b/logstash/templates/statefulset.yaml
|
||||
index 09ddfd0..e162023 100644
|
||||
--- a/logstash/templates/statefulset.yaml
|
||||
+++ b/logstash/templates/statefulset.yaml
|
||||
@@ -170,6 +170,14 @@ spec:
|
||||
{{ toYaml .Values.securityContext | indent 10 }}
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
|
||||
+{{- if .Values.args }}
|
||||
+ args:
|
||||
+{{ toYaml .Values.args | indent 8 }}
|
||||
+{{- end }}
|
||||
+{{- if .Values.command }}
|
||||
+ command:
|
||||
+{{ toYaml .Values.command | indent 8 }}
|
||||
+{{- end }}
|
||||
livenessProbe:
|
||||
{{ toYaml .Values.livenessProbe | indent 10 }}
|
||||
readinessProbe:
|
||||
diff --git a/logstash/values.yaml b/logstash/values.yaml
|
||||
index 990287b..9fedf40 100755
|
||||
--- a/logstash/values.yaml
|
||||
+++ b/logstash/values.yaml
|
||||
@@ -206,3 +206,9 @@ service: {}
|
||||
# port: 8080
|
||||
# protocol: TCP
|
||||
# targetPort: 8080
|
||||
+
|
||||
+# pass custom command. This is equivalent of Entrypoint in docker
|
||||
+command: []
|
||||
+
|
||||
+# pass custom args. This is equivalent of Cmd in docker
|
||||
+args: []
|
||||
diff --git a/metricbeat/templates/daemonset.yaml b/metricbeat/templates/daemonset.yaml
|
||||
index db02a29..f2beba9 100644
|
||||
--- a/metricbeat/templates/daemonset.yaml
|
||||
+++ b/metricbeat/templates/daemonset.yaml
|
||||
@@ -152,10 +152,18 @@ spec:
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
|
||||
args:
|
||||
+{{- if .Values.args.daemonset }}
|
||||
+{{ toYaml .Values.args.daemonset | indent 8 }}
|
||||
+{{- else }}
|
||||
- "-e"
|
||||
- "-E"
|
||||
- "http.enabled=true"
|
||||
- "--system.hostfs=/hostfs"
|
||||
+{{- end }}
|
||||
+{{- if .Values.command.daemonset }}
|
||||
+ command:
|
||||
+{{ toYaml .Values.command.daemonset | indent 8 }}
|
||||
+{{- end }}
|
||||
livenessProbe:
|
||||
{{ toYaml .Values.livenessProbe | indent 10 }}
|
||||
readinessProbe:
|
||||
diff --git a/metricbeat/templates/deployment.yaml b/metricbeat/templates/deployment.yaml
|
||||
index 2585651..59cf07b 100644
|
||||
--- a/metricbeat/templates/deployment.yaml
|
||||
+++ b/metricbeat/templates/deployment.yaml
|
||||
@@ -125,11 +125,19 @@ spec:
|
||||
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
|
||||
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
|
||||
args:
|
||||
+{{- if .Values.args.deployment }}
|
||||
+{{ toYaml .Values.args.deployment | indent 8 }}
|
||||
+{{- else }}
|
||||
- "-c"
|
||||
- "/usr/share/metricbeat/kube-state-metrics-metricbeat.yml"
|
||||
- "-e"
|
||||
- "-E"
|
||||
- "http.enabled=true"
|
||||
+{{- end }}
|
||||
+{{- if .Values.command.deployment }}
|
||||
+ command:
|
||||
+{{ toYaml .Values.command.deployment | indent 8 }}
|
||||
+{{- end }}
|
||||
livenessProbe:
|
||||
{{ toYaml .Values.livenessProbe | indent 10 }}
|
||||
readinessProbe:
|
||||
diff --git a/metricbeat/values.yaml b/metricbeat/values.yaml
|
||||
index 78ad798..3b394a4 100755
|
||||
--- a/metricbeat/values.yaml
|
||||
+++ b/metricbeat/values.yaml
|
||||
@@ -208,3 +208,13 @@ updateStrategy: RollingUpdate
|
||||
# Only edit these if you know what you're doing
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
+
|
||||
+# pass custom command. This is equivalent of Entrypoint in docker
|
||||
+command:
|
||||
+ daemonset: []
|
||||
+ deployment: []
|
||||
+
|
||||
+# pass custom args. This is equivalent of Cmd in docker
|
||||
+args:
|
||||
+ daemonset: []
|
||||
+ deployment: []
|
||||
--
|
||||
2.20.1
|
||||
|
@ -421,6 +421,7 @@ data:
|
||||
values:
|
||||
filebeatConfig:
|
||||
filebeat.yml:
|
||||
http.port: 5066
|
||||
filebeat.inputs:
|
||||
- type: log
|
||||
enabled: true
|
||||
@ -608,6 +609,7 @@ data:
|
||||
values:
|
||||
metricbeatConfig:
|
||||
metricbeat.yml:
|
||||
http.port: 5066
|
||||
output.file:
|
||||
enabled: false
|
||||
output.logstash:
|
||||
@ -636,6 +638,7 @@ data:
|
||||
host: ${NODE_NAME}
|
||||
hints.enabled: true
|
||||
kube-state-metrics-metricbeat.yml:
|
||||
http.port: 5066
|
||||
output.file:
|
||||
enabled: false
|
||||
output.logstash:
|
||||
|
Loading…
x
Reference in New Issue
Block a user