monitor-helm-elastic: remove dl_hook

Use debian method to apply local patches instead of patching in rules.

Add "dl_path" and "src_files" in meta_data.yaml to download tarball and
copy local files.

No need dl_hook

Test Plan:

Pass: successfully build monitor-helm-elastic.
Pass: No difference comparing with the result of dl_hook

Story: 2009101
Task: 43838

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Change-Id: I068f3ae0cbf9e0661abc12adcec005be145f2462
This commit is contained in:
Yue Tao 2022-01-13 10:50:41 +08:00 committed by Yue Tao
parent cd71553493
commit b6dbc770fc
15 changed files with 1628 additions and 40 deletions

View File

@ -0,0 +1,61 @@
From c9c3e8ff214360eb2e5d9e7728b7bee8fe771eea Mon Sep 17 00:00:00 2001
From: Kevin Smith <kevin.smith@windriver.com>
Date: Tue, 1 Oct 2019 15:25:32 -0400
Subject: [PATCH 1/1] add makefile
---
Makefile | 44 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 00e154d..5cf4447
--- a/Makefile
+++ b/Makefile
@@ -1,1 +1,43 @@
-include helpers/common.mk
+#
+# Copyright 2017 The Openstack-Helm Authors.
+#
+# Copyright (c) 2018 Wind River Systems, Inc.
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# It's necessary to set this because some environments don't link sh -> bash.
+SHELL := /bin/bash
+TASK := build
+
+EXCLUDES := helm-toolkit doc tests tools logs tmp
+CHARTS := helm-toolkit $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.)))
+
+.PHONY: $(EXCLUDES) $(CHARTS)
+
+all: $(CHARTS)
+
+$(CHARTS):
+ @if [ -d $@ ]; then \
+ echo; \
+ echo "===== Processing [$@] chart ====="; \
+ make $(TASK)-$@; \
+ fi
+
+init-%:
+ if [ -f $*/Makefile ]; then make -C $*; fi
+ if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
+
+lint-%: init-%
+ if [ -d $* ]; then helm lint $*; fi
+
+build-%: lint-%
+ if [ -d $* ]; then helm package $*; fi
+
+clean:
+ @echo "Clean all build artifacts"
+ rm -f */templates/_partials.tpl */templates/_globals.tpl
+ rm -f *tgz */charts/*tgz */requirements.lock
+ rm -rf */charts */tmpcharts
+
+%:
+ @:
--
1.8.3.1

View File

@ -0,0 +1,25 @@
From a1ea0a2f488660f9cfbab44a4fb8b163e135ebf5 Mon Sep 17 00:00:00 2001
From: Kevin Smith <kevin.smith@windriver.com>
Date: Tue, 8 Oct 2019 13:35:57 -0400
Subject: [PATCH 1/1] use oss image
---
elasticsearch/values.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml
index ccab462..f4fca1f 100755
--- a/elasticsearch/values.yaml
+++ b/elasticsearch/values.yaml
@@ -42,7 +42,7 @@ secretMounts: []
# secretName: elastic-certificates
# path: /usr/share/elasticsearch/config/certs
-image: "docker.elastic.co/elasticsearch/elasticsearch"
+image: "docker.elastic.co/elasticsearch/elasticsearch-oss"
imageTag: "7.6.0"
imagePullPolicy: "IfNotPresent"
--
1.8.3.1

View File

@ -0,0 +1,40 @@
From 066b7c9996d9bdee56857eca8a1af72bbbaaafff Mon Sep 17 00:00:00 2001
From: Kevin Smith <kevin.smith@windriver.com>
Date: Thu, 24 Oct 2019 11:06:30 -0400
Subject: [PATCH 1/1] set initial masters to master-0
---
elasticsearch/templates/statefulset.yaml | 2 +-
elasticsearch/values.yaml | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml
index 36c7af6..e17d39e 100644
--- a/elasticsearch/templates/statefulset.yaml
+++ b/elasticsearch/templates/statefulset.yaml
@@ -241,7 +241,7 @@ spec:
{{- if eq .Values.roles.master "true" }}
{{- if ge (int (include "elasticsearch.esMajorVersion" .)) 7 }}
- name: cluster.initial_master_nodes
- value: "{{ template "elasticsearch.endpoints" . }}"
+ value: "{{ .Values.initialMasterNodes }}"
{{- else }}
- name: discovery.zen.minimum_master_nodes
value: "{{ .Values.minimumMasterNodes }}"
diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml
index 6175540..0d983eb 100755
--- a/elasticsearch/values.yaml
+++ b/elasticsearch/values.yaml
@@ -6,6 +6,9 @@ nodeGroup: "master"
# This should be set to clusterName + "-" + nodeGroup for your master group
masterService: ""
+# On initial cluster formation, the initial set of masters.
+initialMasterNodes: "mon-elasticsearch-master-0"
+
# Elasticsearch roles that will be applied to this nodeGroup
# These will be set as environment variables. E.g. node.master=true
roles:
--
1.8.3.1

View File

@ -0,0 +1,944 @@
From cf8a4f75684e78920f1c464d06558daa8fc61fbc Mon Sep 17 00:00:00 2001
From: Simon Cousineau <Simon.Cousineau@windriver.com>
Date: Mon, 6 Apr 2020 18:10:31 -0400
Subject: [PATCH 1/1] Update Elastic Apps to 7.6.0 Releases
---
elasticsearch/templates/statefulset.yaml | 5 ++
elasticsearch/values.yaml | 2 +
filebeat/templates/_helpers.tpl | 9 +++
filebeat/templates/configmap.yaml | 4 +
filebeat/templates/daemonset.yaml | 92 ++++++++++++++++++++++-
filebeat/values.yaml | 16 +++-
kibana/templates/_helpers.tpl | 24 +++++-
kibana/templates/deployment.yaml | 8 +-
kibana/templates/service.yaml | 26 ++++++-
kibana/templates/serviceaccount.yaml | 11 +++
logstash/templates/_helpers.tpl | 5 ++
logstash/templates/configmap-config.yaml | 4 +
logstash/templates/statefulset.yaml | 49 +++++++++++-
logstash/values.yaml | 19 +++--
metricbeat/requirements.yaml | 8 +-
metricbeat/templates/_helpers.tpl | 9 +++
metricbeat/templates/configmap.yaml | 4 +
metricbeat/templates/daemonset.yaml | 92 ++++++++++++++++++++++-
metricbeat/templates/deployment.yaml | 96 +++++++++++++++++++++++-
metricbeat/templates/serviceaccount.yaml | 2 +
metricbeat/values.yaml | 20 +++--
21 files changed, 468 insertions(+), 37 deletions(-)
create mode 100644 kibana/templates/serviceaccount.yaml
diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml
index 5217270..61b59af 100644
--- a/elasticsearch/templates/statefulset.yaml
+++ b/elasticsearch/templates/statefulset.yaml
@@ -251,8 +251,13 @@ spec:
- name: discovery.zen.ping.unicast.hosts
value: "{{ template "elasticsearch.masterService" . }}-headless"
{{- else }}
+ {{- if empty .Values.seedHosts }}
- name: discovery.seed_hosts
value: "{{ template "elasticsearch.masterService" . }}-headless"
+ {{- else }}
+ - name: discovery.seed_hosts
+ value: "{{ .Values.seedHosts }}"
+ {{- end }}
{{- end }}
- name: cluster.name
value: "{{ .Values.clusterName }}"
diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml
index e2a5d96..a446316 100755
--- a/elasticsearch/values.yaml
+++ b/elasticsearch/values.yaml
@@ -259,3 +259,5 @@ sysctlInitContainer:
enabled: true
keystore: []
+
+seedHosts: ""
diff --git a/filebeat/templates/_helpers.tpl b/filebeat/templates/_helpers.tpl
index a52a937..df294e9 100755
--- a/filebeat/templates/_helpers.tpl
+++ b/filebeat/templates/_helpers.tpl
@@ -9,15 +9,20 @@ Expand the name of the chart.
{{/*
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 "filebeat.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 -}}
{{/*
Use the fullname if the serviceAccount value is not set
@@ -27,6 +32,10 @@ Use the fullname if the serviceAccount value is not set
{{- .Values.serviceAccount -}}
{{- 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 -}}
diff --git a/filebeat/templates/configmap.yaml b/filebeat/templates/configmap.yaml
index 32df8d8..581179f 100644
--- a/filebeat/templates/configmap.yaml
+++ b/filebeat/templates/configmap.yaml
@@ -12,6 +12,10 @@ metadata:
data:
{{- range $path, $config := .Values.filebeatConfig }}
{{ $path }}: |
+{{- if eq $path "filebeat.yml" }}
+{{ toYaml $config | indent 4 -}}
+{{- else }}
{{ $config | indent 4 -}}
{{- end -}}
{{- end -}}
+{{- end -}}
diff --git a/filebeat/templates/daemonset.yaml b/filebeat/templates/daemonset.yaml
index d2f5a23..6e8be91 100644
--- a/filebeat/templates/daemonset.yaml
+++ b/filebeat/templates/daemonset.yaml
@@ -26,7 +26,7 @@ spec:
{{- end }}
{{/* This forces a restart if the configmap has changed */}}
{{- if .Values.filebeatConfig }}
- configChecksum: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }}
+ configchecksum: {{ toYaml .Values.filebeatConfig | sha256sum | trunc 63 }}
{{- end }}
name: "{{ template "filebeat.fullname" . }}"
labels:
@@ -87,10 +87,64 @@ spec:
{{- end }}
{{- if .Values.extraInitContainers }}
initContainers:
-{{ toYaml .Values.extraInitContainers | indent 8 }}
+{{- range $name, $config := .Values.extraInitContainers }}
+ - name: {{ $name }}
+{{- if $config.image }}
+ image: "{{ $config.image.repository }}:{{ $config.image.tag }}"
+ imagePullPolicy: {{ $config.image.pullPolicy }}
+{{- else }}
+ image: "{{ $.Values.image }}:{{ $.Values.imageTag }}"
+ imagePullPolicy: {{ $.Values.imagePullPolicy }}
+{{- end }}
+{{ toYaml $config.container | indent 10 }}
+ env:
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: NODE_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.nodeName
+ ## make output.elasticsearch parms visible
+ {{- range $path, $config := $.Values.filebeatConfig}}
+ {{- if eq $path "filebeat.yml" -}}
+ {{- range $key, $value := $config}}
+ {{- $configname := $key | upper | replace "." "_" }}
+ {{- if eq $configname "OUTPUT_ELASTICSEARCH" -}}
+ {{- range $key2, $value2 := $value}}
+ - name: "{{ $configname }}_{{ $key2 | upper }}"
+ value: {{ $value2 | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ ## make system name and index parms visible
+ {{- if $.Values.systemNameForIndex}}
+ {{ $systemNameNoSpecial := regexReplaceAll "[^A-Za-z0-9-]+" $.Values.systemNameForIndex "" }}
+ {{ $systemNameFormatted := $systemNameNoSpecial | lower | trunc 200 }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: {{ printf "-%s" $systemNameFormatted | quote }}
+ - name: INDEX_PATTERN
+ value: "{{ $.Values.indexNamePrefix }}-{{$systemNameFormatted}}-*"
+ - name: INDEX_NAME
+ value: "{{ $.Values.indexNamePrefix }}-{{$systemNameFormatted}}"
+ {{- else }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: "unset"
+ - name: INDEX_PATTERN
+ value: "{{ $.Values.indexNamePrefix }}-*"
+ - name: INDEX_NAME
+ value: "{{ $.Values.indexNamePrefix }}"
+ {{- end }}
+{{- if $.Values.extraEnvs }}
+{{ toYaml $.Values.extraEnvs | indent 12 }}
+{{- end }}
+{{- end }}
{{- end }}
containers:
- - name: "filebeat"
+ - name: {{ template "filebeat.name" . }}
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
args:
@@ -112,6 +166,38 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
+ ## make output.elasticsearch parms visible
+ {{- range $path, $config := .Values.filebeatConfig}}
+ {{- if eq $path "filebeat.yml" -}}
+ {{- range $key, $value := $config}}
+ {{- $configname := $key | upper | replace "." "_" }}
+ {{- if eq $configname "OUTPUT_ELASTICSEARCH" -}}
+ {{- range $key2, $value2 := $value}}
+ - name: "{{ $configname }}_{{ $key2 | upper }}"
+ value: {{ $value2 | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ ## make system name and index parms visible
+ {{- if .Values.systemNameForIndex}}
+ {{ $systemNameNoSpecial := regexReplaceAll "[^A-Za-z0-9-]+" .Values.systemNameForIndex "" }}
+ {{ $systemNameFormatted := $systemNameNoSpecial | lower | trunc 200 }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: {{ printf "-%s" $systemNameFormatted | quote }}
+ - name: INDEX_PATTERN
+ value: "{{ .Values.indexNamePrefix }}-{{$systemNameFormatted}}-*"
+ - name: INDEX_NAME
+ value: "{{ .Values.indexNamePrefix }}-{{$systemNameFormatted}}"
+ {{- else }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: "unset"
+ - name: INDEX_PATTERN
+ value: "{{ .Values.indexNamePrefix }}-*"
+ - name: INDEX_NAME
+ value: "{{ .Values.indexNamePrefix }}"
+ {{- end }}
{{- if .Values.extraEnvs }}
{{ toYaml .Values.extraEnvs | indent 8 }}
{{- end }}
diff --git a/filebeat/values.yaml b/filebeat/values.yaml
index d3c575c..f83a19f 100755
--- a/filebeat/values.yaml
+++ b/filebeat/values.yaml
@@ -2,7 +2,7 @@
# Allows you to add any config files in /usr/share/filebeat
# such as filebeat.yml
filebeatConfig:
- filebeat.yml: |
+ filebeat.yml:
filebeat.inputs:
- type: docker
containers.ids:
@@ -36,9 +36,13 @@ extraContainers: ""
# command: ['echo', 'hey']
extraInitContainers: []
-# - name: dummy-init
-# image: busybox
-# command: ['echo', 'hey']
+ # "dummy-init":
+ # image:
+ # repository: busybox
+ # tag: latest
+ # pullPolicy: IfNotPresent
+ # container:
+ # command: ['echo', 'hey']
envFrom: []
# - configMapRef:
@@ -132,3 +136,7 @@ updateStrategy: RollingUpdate
# Only edit these if you know what you're doing
nameOverride: ""
fullnameOverride: ""
+
+# Will be used in index name
+systemNameForIndex: ""
+indexNamePrefix: filebeat-%{[agent.version]}
diff --git a/kibana/templates/_helpers.tpl b/kibana/templates/_helpers.tpl
index 2fe259e..0558ced 100755
--- a/kibana/templates/_helpers.tpl
+++ b/kibana/templates/_helpers.tpl
@@ -9,13 +9,18 @@ Expand the name of the chart.
{{/*
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 "kibana.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
-{{- $name := default .Release.Name .Values.nameOverride -}}
-{{- printf "%s-%s" $name .Chart.Name | trunc 63 | trimSuffix "-" -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
{{- end -}}
{{- end -}}
@@ -29,3 +34,18 @@ Return the appropriate apiVersion for ingress.
{{- print "networking.k8s.io/v1beta1" -}}
{{- end -}}
{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "serviceAccountName" -}}
+{{- if .Values.serviceAccountCreate -}}
+{{ default (include "kibana.fullname" .) .Values.serviceAccountName }}
+{{- else -}}
+{{- if .Values.serviceAccountName -}}
+{{- .Values.serviceAccountName }}
+{{- else -}}
+{{ default "default" .Values.serviceAccountName }}
+{{- end -}}
+{{- end -}}
+{{- end -}}
diff --git a/kibana/templates/deployment.yaml b/kibana/templates/deployment.yaml
index ad563b3..15343eb 100644
--- a/kibana/templates/deployment.yaml
+++ b/kibana/templates/deployment.yaml
@@ -14,12 +14,12 @@ spec:
{{ toYaml .Values.updateStrategy | indent 4 }}
selector:
matchLabels:
- app: kibana
+ app: {{ template "kibana.name" . }}
release: {{ .Release.Name | quote }}
template:
metadata:
labels:
- app: kibana
+ app: {{ template "kibana.name" . }}
release: {{ .Release.Name | quote }}
{{- range $key, $value := .Values.labels }}
{{ $key }}: {{ $value | quote }}
@@ -30,7 +30,7 @@ spec:
{{- end }}
{{/* This forces a restart if the configmap has changed */}}
{{- if .Values.kibanaConfig }}
- configchecksum: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }}
+ configchecksum: {{ toYaml .Values.kibanaConfig | sha256sum | trunc 63 }}
{{- end }}
spec:
{{- if .Values.priorityClassName }}
@@ -73,7 +73,7 @@ spec:
{{ tpl .Values.extraInitContainers . | indent 6 }}
{{- end }}
containers:
- - name: kibana
+ - name: {{ template "kibana.name" . }}
securityContext:
{{ toYaml .Values.securityContext | indent 10 }}
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
diff --git a/kibana/templates/service.yaml b/kibana/templates/service.yaml
index 5734580..c2f8d9e 100644
--- a/kibana/templates/service.yaml
+++ b/kibana/templates/service.yaml
@@ -20,14 +20,36 @@ spec:
loadBalancerSourceRanges:
{{ toYaml . | indent 4 }}
{{- end }}
+ {{- if and (eq .Values.service.type "ClusterIP") .Values.service.clusterIP }}
+ clusterIP: {{ .Values.service.clusterIP }}
+ {{- end }}
ports:
- port: {{ .Values.service.port }}
{{- if .Values.service.nodePort }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
protocol: TCP
- name: http
- targetPort: {{ .Values.httpPort }}
+{{ if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
+ nodePort: {{ .Values.service.nodePort }}
+{{ end }}
+{{- if .Values.service.portName }}
+ name: {{ .Values.service.portName }}
+{{- end }}
+{{- if not .Values.authProxyEnabled }}
+ targetPort: {{ .Values.service.internalPort }}
+{{- else }}
+ targetPort: {{ .Values.service.authProxyPort }}
+{{- end }}
+{{- if .Values.service.externalIPs }}
+ externalIPs:
+{{ toYaml .Values.service.externalIPs | indent 4 }}
+{{- end }}
selector:
app: {{ .Chart.Name }}
release: {{ .Release.Name | quote }}
+{{- range $key, $value := .Values.service.selector }}
+ {{ $key }}: {{ $value | quote }}
+{{- end }}
+{{- if .Values.service.loadBalancerIP }}
+ loadBalancerIP: {{ .Values.service.loadBalancerIP }}
+{{- end }}
diff --git a/kibana/templates/serviceaccount.yaml b/kibana/templates/serviceaccount.yaml
new file mode 100644
index 0000000..c40b687
--- /dev/null
+++ b/kibana/templates/serviceaccount.yaml
@@ -0,0 +1,11 @@
+{{- if .Values.managedServiceAccount -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ template "serviceAccountName" . }}
+ labels:
+ app: {{ template "kibana.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+ heritage: {{ .Release.Service }}
+ release: {{ .Release.Name }}
+{{- end -}}
diff --git a/logstash/templates/_helpers.tpl b/logstash/templates/_helpers.tpl
index 162a3ee..a0a0321 100755
--- a/logstash/templates/_helpers.tpl
+++ b/logstash/templates/_helpers.tpl
@@ -9,15 +9,20 @@ Expand the name of the chart.
{{/*
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 -}}
{{/*
Return the appropriate apiVersion for statefulset.
diff --git a/logstash/templates/configmap-config.yaml b/logstash/templates/configmap-config.yaml
index e69d524..e9e7a5b 100644
--- a/logstash/templates/configmap-config.yaml
+++ b/logstash/templates/configmap-config.yaml
@@ -12,6 +12,10 @@ metadata:
data:
{{- range $path, $config := .Values.logstashConfig }}
{{ $path }}: |
+{{- if eq $path "logstash.yml" }}
+{{ toYaml $config | indent 4 -}}
+{{- else }}
{{ $config | indent 4 -}}
{{- end -}}
{{- end -}}
+{{- end -}}
diff --git a/logstash/templates/statefulset.yaml b/logstash/templates/statefulset.yaml
index f953ec8..09ddfd0 100644
--- a/logstash/templates/statefulset.yaml
+++ b/logstash/templates/statefulset.yaml
@@ -51,11 +51,11 @@ spec:
{{- end }}
{{/* This forces a restart if the configmap has changed */}}
{{- if .Values.logstashConfig }}
- configchecksum: {{ include (print .Template.BasePath "/configmap-config.yaml") . | sha256sum | trunc 63 }}
+ configchecksum: {{ toYaml .Values.logstashConfig | sha256sum | trunc 63 }}
{{- end }}
{{/* This forces a restart if the configmap has changed */}}
{{- if .Values.logstashPipeline }}
- pipelinechecksum: {{ include (print .Template.BasePath "/configmap-pipeline.yaml") . | sha256sum | trunc 63 }}
+ pipelinechecksum: {{ toYaml .Values.logstashPipeline | sha256sum | trunc 63 }}
{{- end }}
spec:
{{- if .Values.schedulerName }}
@@ -135,7 +135,34 @@ spec:
{{- end }}
{{- if .Values.extraInitContainers }}
initContainers:
-{{ tpl .Values.extraInitContainers . | indent 6 }}
+{{- range $name, $config := .Values.extraInitContainers }}
+ - name: {{ $name }}
+{{- if $config.image }}
+ image: "{{ $config.image.repository }}:{{ $config.image.tag }}"
+ imagePullPolicy: {{ $config.image.pullPolicy }}
+{{- else }}
+ image: "{{ $.Values.image }}:{{ $.Values.imageTag }}"
+ imagePullPolicy: {{ $.Values.imagePullPolicy }}
+{{- end }}
+{{ toYaml $config.container | indent 8 }}
+ env:
+ ## Elasticsearch output
+ - name: ELASTICSEARCH_HOST
+ value: {{ $.Values.elasticsearchHosts | quote }}
+ ## make system name visible for in setting index.
+ {{- if $.Values.systemNameForIndex}}
+ {{ $systemNameNoSpecial := regexReplaceAll "[^A-Za-z0-9-]+" $.Values.systemNameForIndex "" }}
+ {{ $systemNameFormatted := $systemNameNoSpecial | lower | trunc 200 }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: {{ printf "-%s" $systemNameFormatted | quote }}
+ {{- else }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: ""
+ {{- end }}
+{{- if $.Values.extraEnvs }}
+{{ toYaml $.Values.extraEnvs | indent 10 }}
+{{- end }}
+{{- end }}
{{- end }}
containers:
- name: "{{ template "logstash.name" . }}"
@@ -150,9 +177,25 @@ spec:
ports:
- name: http
containerPort: {{ .Values.httpPort }}
+{{- if .Values.ports }}
+{{ toYaml .Values.ports | indent 8 }}
+{{- end }}
resources:
{{ toYaml .Values.resources | indent 10 }}
env:
+ ## Elasticsearch output
+ - name: ELASTICSEARCH_HOST
+ value: {{ .Values.elasticsearchHosts | quote }}
+ ## make system name visible for in setting index.
+ {{- if .Values.systemNameForIndex}}
+ {{ $systemNameNoSpecial := regexReplaceAll "[^A-Za-z0-9-]+" .Values.systemNameForIndex "" }}
+ {{ $systemNameFormatted := $systemNameNoSpecial | lower | trunc 200 }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: {{ printf "-%s" $systemNameFormatted | quote }}
+ {{- else }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: ""
+ {{- end }}
- name: LS_JAVA_OPTS
value: "{{ .Values.logstashJavaOpts }}"
{{- if .Values.extraEnvs }}
diff --git a/logstash/values.yaml b/logstash/values.yaml
index 498136a..990287b 100755
--- a/logstash/values.yaml
+++ b/logstash/values.yaml
@@ -4,7 +4,7 @@ replicas: 1
# Allows you to add any config files in /usr/share/logstash/config/
# such as logstash.yml and log4j2.properties
logstashConfig: {}
-# logstash.yml: |
+# logstash.yml:
# key:
# nestedkey: value
# log4j2.properties: |
@@ -97,10 +97,14 @@ extraContainers: ""
# image: busybox
# command: ['do', 'something']
-extraInitContainers: ""
- # - name: do-something
- # image: busybox
- # command: ['do', 'something']
+extraInitContainers: []
+ # "do-something":
+ # image:
+ # repository: busybox
+ # tag: latest
+ # pullPolicy: IfNotPresent
+ # container:
+ # command: ['do', 'something']
# This is the PriorityClass settings as defined in
# https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass
@@ -185,6 +189,11 @@ lifecycle: {}
# exec:
# command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]
+# Will be used in index names
+systemNameForIndex: ""
+
+ports: []
+
service: {}
# annotations: {}
# type: ClusterIP
diff --git a/metricbeat/requirements.yaml b/metricbeat/requirements.yaml
index 0f8c03d..7ee66b5 100644
--- a/metricbeat/requirements.yaml
+++ b/metricbeat/requirements.yaml
@@ -1,4 +1,4 @@
-dependencies:
- - name: 'kube-state-metrics'
- version: '2.4.1'
- repository: '@stable'
+dependencies: []
+ # - name: 'kube-state-metrics'
+ # version: '2.4.1'
+ # repository: '@stable'
diff --git a/metricbeat/templates/_helpers.tpl b/metricbeat/templates/_helpers.tpl
index 35f776c..38e2cc7 100755
--- a/metricbeat/templates/_helpers.tpl
+++ b/metricbeat/templates/_helpers.tpl
@@ -9,15 +9,20 @@ Expand the name of the chart.
{{/*
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 "metricbeat.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 -}}
{{/*
Use the fullname if the serviceAccount value is not set
@@ -27,6 +32,10 @@ Use the fullname if the serviceAccount value is not set
{{- .Values.serviceAccount -}}
{{- 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 -}}
diff --git a/metricbeat/templates/configmap.yaml b/metricbeat/templates/configmap.yaml
index 09e381c..56af441 100644
--- a/metricbeat/templates/configmap.yaml
+++ b/metricbeat/templates/configmap.yaml
@@ -12,6 +12,10 @@ metadata:
data:
{{- range $path, $config := .Values.metricbeatConfig }}
{{ $path }}: |
+{{- if or (eq $path "metricbeat.yml") (eq $path "kube-state-metrics-metricbeat.yml") }}
+{{ toYaml $config | indent 4 -}}
+{{- else }}
{{ $config | indent 4 -}}
{{- end -}}
{{- end -}}
+{{- end -}}
diff --git a/metricbeat/templates/daemonset.yaml b/metricbeat/templates/daemonset.yaml
index 392b7cf..db02a29 100644
--- a/metricbeat/templates/daemonset.yaml
+++ b/metricbeat/templates/daemonset.yaml
@@ -26,7 +26,7 @@ spec:
{{- end }}
{{/* This forces a restart if the configmap has changed */}}
{{- if .Values.metricbeatConfig }}
- configChecksum: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }}
+ configchecksum: {{ toYaml .Values.metricbeatConfig | sha256sum | trunc 63 }}
{{- end }}
name: "{{ template "metricbeat.fullname" . }}"
labels:
@@ -52,6 +52,8 @@ spec:
{{- end }}
serviceAccountName: {{ template "metricbeat.serviceAccount" . }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriod }}
+ hostNetwork: true
+ dnsPolicy: ClusterFirstWithHostNet
volumes:
{{- range .Values.secretMounts }}
- name: {{ .name }}
@@ -89,7 +91,61 @@ spec:
{{- end }}
{{- if .Values.extraInitContainers }}
initContainers:
-{{ tpl .Values.extraInitContainers . | indent 6 }}
+{{- range $name, $config := .Values.extraInitContainers }}
+ - name: {{ $name }}
+{{- if $config.image }}
+ image: "{{ $config.image.repository }}:{{ $config.image.tag }}"
+ imagePullPolicy: {{ $config.image.pullPolicy }}
+{{- else }}
+ image: "{{ $.Values.image }}:{{ $.Values.imageTag }}"
+ imagePullPolicy: {{ $.Values.imagePullPolicy }}
+{{- end }}
+{{ toYaml $config.container | indent 8 }}
+ env:
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: NODE_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.nodeName
+ ## make output.elasticsearch parms visible
+ {{- range $path, $config := $.Values.metricbeatConfig}}
+ {{- if eq $path "metricbeat.yml" -}}
+ {{- range $key, $value := $config}}
+ {{- $configname := $key | upper | replace "." "_" }}
+ {{- if eq $configname "OUTPUT_ELASTICSEARCH" -}}
+ {{- range $key2, $value2 := $value}}
+ - name: "{{ $configname }}_{{ $key2 | upper }}"
+ value: {{ $value2 | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ ## make system name and index parms visible
+ {{- if $.Values.systemNameForIndex}}
+ {{ $systemNameNoSpecial := regexReplaceAll "[^A-Za-z0-9-]+" $.Values.systemNameForIndex "" }}
+ {{ $systemNameFormatted := $systemNameNoSpecial | lower | trunc 200 }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: {{ printf "-%s" $systemNameFormatted | quote }}
+ - name: INDEX_PATTERN
+ value: "{{ $.Values.indexNamePrefix }}-{{$systemNameFormatted}}-*"
+ - name: INDEX_NAME
+ value: "{{ $.Values.indexNamePrefix }}-{{$systemNameFormatted}}"
+ {{- else }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: "unset"
+ - name: INDEX_PATTERN
+ value: "{{ $.Values.indexNamePrefix }}-*"
+ - name: INDEX_NAME
+ value: "{{ $.Values.indexNamePrefix }}"
+ {{- end }}
+{{- if $.Values.extraEnvs }}
+{{ toYaml $.Values.extraEnvs | indent 10 }}
+{{- end }}
+{{- end }}
{{- end }}
containers:
- name: "metricbeat"
@@ -115,6 +171,38 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
+ ## make output.elasticsearch parms visible
+ {{- range $path, $config := .Values.metricbeatConfig}}
+ {{- if eq $path "metricbeat.yml" -}}
+ {{- range $key, $value := $config}}
+ {{- $configname := $key | upper | replace "." "_" }}
+ {{- if eq $configname "OUTPUT_ELASTICSEARCH" -}}
+ {{- range $key2, $value2 := $value}}
+ - name: "{{ $configname }}_{{ $key2 | upper }}"
+ value: {{ $value2 | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ ## make system name and index parms visible
+ {{- if .Values.systemNameForIndex}}
+ {{ $systemNameNoSpecial := regexReplaceAll "[^A-Za-z0-9-]+" .Values.systemNameForIndex "" }}
+ {{ $systemNameFormatted := $systemNameNoSpecial | lower | trunc 200 }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: {{ printf "-%s" $systemNameFormatted | quote }}
+ - name: INDEX_PATTERN
+ value: "{{ .Values.indexNamePrefix }}-{{$systemNameFormatted}}-*"
+ - name: INDEX_NAME
+ value: "{{ .Values.indexNamePrefix }}-{{$systemNameFormatted}}"
+ {{- else }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: "unset"
+ - name: INDEX_PATTERN
+ value: "{{ .Values.indexNamePrefix }}-*"
+ - name: INDEX_NAME
+ value: "{{ .Values.indexNamePrefix }}"
+ {{- end }}
{{- if .Values.extraEnvs }}
{{ toYaml .Values.extraEnvs | indent 8 }}
{{- end }}
diff --git a/metricbeat/templates/deployment.yaml b/metricbeat/templates/deployment.yaml
index 225160b..2585651 100644
--- a/metricbeat/templates/deployment.yaml
+++ b/metricbeat/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
{{- end }}
{{/* This forces a restart if the configmap has changed */}}
{{- if .Values.metricbeatConfig }}
- configChecksum: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }}
+ configchecksum: {{ toYaml .Values.metricbeatConfig | sha256sum | trunc 63 }}
{{- end }}
labels:
app: '{{ template "metricbeat.fullname" . }}-metrics'
@@ -62,7 +62,63 @@ spec:
{{- end }}
{{- if .Values.extraInitContainers }}
initContainers:
-{{ tpl .Values.extraInitContainers . | indent 6 }}
+{{- range $name, $config := .Values.extraInitContainers }}
+ - name: {{ $name }}
+{{- if $config.image }}
+ image: "{{ $config.image.repository }}:{{ $config.image.tag }}"
+ imagePullPolicy: {{ $config.image.pullPolicy }}
+{{- else }}
+ image: "{{ $.Values.image }}:{{ $.Values.imageTag }}"
+ imagePullPolicy: {{ $.Values.imagePullPolicy }}
+{{- end }}
+{{ toYaml $config.container | indent 8 }}
+ env:
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: KUBE_STATE_METRICS_HOSTS
+ value: "$({{ $.Release.Name | replace "-" "_" | upper }}_KUBE_STATE_METRICS_SERVICE_HOST):$({{ $.Release.Name | replace "-" "_" | upper }}_KUBE_STATE_METRICS_SERVICE_PORT_HTTP)"
+ - name: NODE_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.nodeName
+ ## make output.elasticsearch parms visible
+ {{- range $path, $config := $.Values.metricbeatConfig}}
+ {{- if eq $path "metricbeat.yml" -}}
+ {{- range $key, $value := $config}}
+ {{- $configname := $key | upper | replace "." "_" }}
+ {{- if eq $configname "OUTPUT_ELASTICSEARCH" -}}
+ {{- range $key2, $value2 := $value}}
+ - name: "{{ $configname }}_{{ $key2 | upper }}"
+ value: {{ $value2 | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ ## make system name and index parms visible
+ {{- if $.Values.systemNameForIndex}}
+ {{ $systemNameNoSpecial := regexReplaceAll "[^A-Za-z0-9-]+" $.Values.systemNameForIndex "" }}
+ {{ $systemNameFormatted := $systemNameNoSpecial | lower | trunc 200 }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: {{ printf "-%s" $systemNameFormatted | quote }}
+ - name: INDEX_PATTERN
+ value: "{{ $.Values.indexNamePrefix }}-{{$systemNameFormatted}}-*"
+ - name: INDEX_NAME
+ value: "{{ $.Values.indexNamePrefix }}-{{$systemNameFormatted}}"
+ {{- else }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: "unset"
+ - name: INDEX_PATTERN
+ value: "{{ $.Values.indexNamePrefix }}-*"
+ - name: INDEX_NAME
+ value: "{{ $.Values.indexNamePrefix }}"
+ {{- end }}
+{{- if $.Values.extraEnvs }}
+{{ toYaml $.Values.extraEnvs | indent 10 }}
+{{- end }}
+{{- end }}
{{- end }}
containers:
- name: "metricbeat"
@@ -87,6 +143,42 @@ spec:
fieldPath: metadata.namespace
- name: KUBE_STATE_METRICS_HOSTS
value: "$({{ .Release.Name | replace "-" "_" | upper }}_KUBE_STATE_METRICS_SERVICE_HOST):$({{ .Release.Name | replace "-" "_" | upper }}_KUBE_STATE_METRICS_SERVICE_PORT_HTTP)"
+ - name: NODE_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.nodeName
+ ## make output.elasticsearch parms visible
+ {{- range $path, $config := .Values.metricbeatConfig}}
+ {{- if eq $path "metricbeat.yml" -}}
+ {{- range $key, $value := $config}}
+ {{- $configname := $key | upper | replace "." "_" }}
+ {{- if eq $configname "OUTPUT_ELASTICSEARCH" -}}
+ {{- range $key2, $value2 := $value}}
+ - name: "{{ $configname }}_{{ $key2 | upper }}"
+ value: {{ $value2 | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ ## make system name and index parms visible
+ {{- if .Values.systemNameForIndex}}
+ {{ $systemNameNoSpecial := regexReplaceAll "[^A-Za-z0-9-]+" .Values.systemNameForIndex "" }}
+ {{ $systemNameFormatted := $systemNameNoSpecial | lower | trunc 200 }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: {{ printf "-%s" $systemNameFormatted | quote }}
+ - name: INDEX_PATTERN
+ value: "{{ .Values.indexNamePrefix }}-{{$systemNameFormatted}}-*"
+ - name: INDEX_NAME
+ value: "{{ .Values.indexNamePrefix }}-{{$systemNameFormatted}}"
+ {{- else }}
+ - name: SYSTEM_NAME_FOR_INDEX
+ value: "unset"
+ - name: INDEX_PATTERN
+ value: "{{ .Values.indexNamePrefix }}-*"
+ - name: INDEX_NAME
+ value: "{{ .Values.indexNamePrefix }}"
+ {{- end }}
{{- if .Values.extraEnvs }}
{{ toYaml .Values.extraEnvs | indent 8 }}
{{- end }}
diff --git a/metricbeat/templates/serviceaccount.yaml b/metricbeat/templates/serviceaccount.yaml
index 2330646..49d6782 100644
--- a/metricbeat/templates/serviceaccount.yaml
+++ b/metricbeat/templates/serviceaccount.yaml
@@ -8,4 +8,6 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
+imagePullSecrets:
+ - name: default-registry-key
{{- end -}}
diff --git a/metricbeat/values.yaml b/metricbeat/values.yaml
index 3ea4af3..78ad798 100755
--- a/metricbeat/values.yaml
+++ b/metricbeat/values.yaml
@@ -2,7 +2,7 @@
# Allows you to add any config files in /usr/share/metricbeat
# such as metricbeat.yml
metricbeatConfig:
- metricbeat.yml: |
+ metricbeat.yml:
metricbeat.modules:
- module: kubernetes
metricsets:
@@ -45,7 +45,7 @@ metricbeatConfig:
output.elasticsearch:
hosts: '${ELASTICSEARCH_HOSTS:elasticsearch-master:9200}'
- kube-state-metrics-metricbeat.yml: |
+ kube-state-metrics-metricbeat.yml:
metricbeat.modules:
- module: kubernetes
enabled: true
@@ -64,15 +64,23 @@ metricbeatConfig:
replicas: 1
+# Will be used in index name
+systemNameForIndex: ""
+indexNamePrefix: metricbeat-%{[agent.version]}
+
extraContainers: ""
# - name: dummy-init
# image: busybox
# command: ['echo', 'hey']
-extraInitContainers: ""
-# - name: dummy-init
-# image: busybox
-# command: ['echo', 'hey']
+extraInitContainers: []
+ # "dummy-init":
+ # image:
+ # repository: busybox
+ # tag: latest
+ # pullPolicy: IfNotPresent
+ # container:
+ # command: ['echo', 'hey']
# Extra environment variables to append to the DaemonSet pod spec.
# This will be appended to the current 'env:' key. You can use any of the kubernetes env
--
2.20.1

View File

@ -0,0 +1,91 @@
From 36ea0e2a2fd6cf6ac8cb19411c14c5ef4d0618f9 Mon Sep 17 00:00:00 2001
From: Kevin Smith <kevin.smith@windriver.com>
Date: Mon, 23 Mar 2020 10:43:07 -0400
Subject: [PATCH 1/1] readiness probe enhancements
---
elasticsearch/templates/statefulset.yaml | 46 +++++++++++++++++++++++++++-----
elasticsearch/values.yaml | 2 ++
2 files changed, 41 insertions(+), 7 deletions(-)
diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml
index e17d39e..483e1f4 100644
--- a/elasticsearch/templates/statefulset.yaml
+++ b/elasticsearch/templates/statefulset.yaml
@@ -202,7 +202,7 @@ spec:
# If the node is starting up wait for the cluster to be ready (request params: '{{ .Values.clusterHealthCheckParams }}' )
# Once it has started only check that the node itself is responding
START_FILE=/tmp/.es_start_file
-
+
http () {
local path="${1}"
if [ -n "${ELASTIC_USERNAME}" ] && [ -n "${ELASTIC_PASSWORD}" ]; then
@@ -217,13 +217,45 @@ spec:
echo 'Elasticsearch is already running, lets check the node is healthy and there are master nodes available'
http "/_cluster/health?timeout=0s"
else
- echo 'Waiting for elasticsearch cluster to become ready (request params: "{{ .Values.clusterHealthCheckParams }}" )'
- if http "/_cluster/health?{{ .Values.clusterHealthCheckParams }}" ; then
- touch ${START_FILE}
- exit 0
+ DATA_NODE=$(printenv node.data)
+ if [[ "$DATA_NODE" == true ]]; then
+ # This is a data node, check for health depending on whether we can
+ # reach the master node and how many data nodes there are.
+ DATA_NODE_COUNT=$(http "/_cat/nodes?master_timeout=1s" | grep -c data)
+ echo "data node count = $DATA_NODE_COUNT"
+ if [[ $DATA_NODE_COUNT -gt 1 ]]; then
+ # We connected to master and there is more than one data node.
+ echo 'Waiting for elasticsearch cluster to become ready (request params: "{{ .Values.clusterHealthCheckParams }}" )'
+ if http "/_cluster/health?{{ .Values.clusterHealthCheckParams }}" ; then
+ touch ${START_FILE}
+ exit 0
+ else
+ echo 'Cluster is not yet ready (request params: "{{ .Values.clusterHealthCheckParams }}" )'
+ exit 1
+ fi
+ else
+ # Cannot connect to the master or we are the only data node
+ # found. Could be DOR, AIO-SX, other host is locked and we
+ # experienced a pod restart or other similar scenario.
+ echo "Cannot connect to master or less than 2 data nodes"
+ echo 'Waiting for elasticsearch cluster to become ready (request params: "{{ .Values.clusterHealthCheckParamsBasic }}" )'
+ if http "/_cluster/health?{{ .Values.clusterHealthCheckParamsBasic }}" ; then
+ touch ${START_FILE}
+ exit 0
+ else
+ echo 'Cluster is not yet ready (request params: "{{ .Values.clusterHealthCheckParamsBasic }}" )'
+ exit 1
+ fi
+ fi
else
- echo 'Cluster is not yet ready (request params: "{{ .Values.clusterHealthCheckParams }}" )'
- exit 1
+ echo 'Waiting for elasticsearch cluster to become ready (request params: "{{ .Values.clusterHealthCheckParams }}" )'
+ if http "/_cluster/health?{{ .Values.clusterHealthCheckParams }}" ; then
+ touch ${START_FILE}
+ exit 0
+ else
+ echo 'Cluster is not yet ready (request params: "{{ .Values.clusterHealthCheckParams }}" )'
+ exit 1
+ fi
fi
fi
ports:
diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml
index 0d983eb..ebbae6c 100755
--- a/elasticsearch/values.yaml
+++ b/elasticsearch/values.yaml
@@ -204,6 +204,8 @@ readinessProbe:
# https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html#request-params wait_for_status
clusterHealthCheckParams: "wait_for_status=green&timeout=1s"
+# Used for readiness probe when on a data node and only a basic health check is needed.
+clusterHealthCheckParamsBasic: "local=true"
## Use an alternate scheduler.
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
--
1.8.3.1

View File

@ -0,0 +1,72 @@
From 1d9150bc2dc050a6331db56f1b92a189032e549e Mon Sep 17 00:00:00 2001
From: Simon Cousineau <Simon.Cousineau@windriver.com>
Date: Wed, 8 Apr 2020 12:06:14 -0400
Subject: [PATCH 1/1] Metricbeat nodeSelector and tolerations config
Support different nodeSelector and tolerations configs for metricbeat
daemonset and deployment.
---
metricbeat/templates/daemonset.yaml | 4 ++--
metricbeat/templates/deployment.yaml | 8 +++++---
metricbeat/values.yaml | 8 ++++++--
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/metricbeat/templates/daemonset.yaml b/metricbeat/templates/daemonset.yaml
index db02a29..0fa38c3 100644
--- a/metricbeat/templates/daemonset.yaml
+++ b/metricbeat/templates/daemonset.yaml
@@ -38,10 +38,10 @@ spec:
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
- {{- with .Values.tolerations }}
+ {{- with .Values.tolerations.daemonset }}
tolerations: {{ toYaml . | nindent 6 }}
{{- end }}
- {{- with .Values.nodeSelector }}
+ {{- with .Values.nodeSelector.daemonset }}
nodeSelector: {{ toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
diff --git a/metricbeat/templates/deployment.yaml b/metricbeat/templates/deployment.yaml
index 2585651..392b3cd 100644
--- a/metricbeat/templates/deployment.yaml
+++ b/metricbeat/templates/deployment.yaml
@@ -32,9 +32,11 @@ spec:
heritage: '{{ .Release.Service }}'
release: '{{ .Release.Name }}'
spec:
- {{- with .Values.tolerations }}
- tolerations:
-{{ toYaml . | indent 6 }}
+ {{- with .Values.tolerations.deployment }}
+ tolerations: {{ toYaml . | nindent 6 }}
+ {{- end }}
+ {{- with .Values.nodeSelector.deployment }}
+ nodeSelector: {{ toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
diff --git a/metricbeat/values.yaml b/metricbeat/values.yaml
index 78ad798..6d53f3e 100755
--- a/metricbeat/values.yaml
+++ b/metricbeat/values.yaml
@@ -192,9 +192,13 @@ secretMounts: []
# How long to wait for metricbeat pods to stop gracefully
terminationGracePeriod: 30
-tolerations: []
+tolerations:
+ daemonset: []
+ deployment: []
-nodeSelector: {}
+nodeSelector:
+ daemonset: {}
+ deployment: {}
affinity: {}
--
2.20.1

View File

@ -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

View File

@ -0,0 +1,69 @@
From f65eaa1fb2dcfb913d22c152e84771507f99d6bd Mon Sep 17 00:00:00 2001
From: Simon Cousineau <Simon.Cousineau@windriver.com>
Date: Tue, 14 Apr 2020 11:05:18 -0400
Subject: [PATCH 1/1] Add updateStrategy parameter to beats config
---
filebeat/templates/daemonset.yaml | 2 +-
filebeat/values.yaml | 3 ++-
metricbeat/templates/daemonset.yaml | 2 +-
metricbeat/values.yaml | 3 ++-
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/filebeat/templates/daemonset.yaml b/filebeat/templates/daemonset.yaml
index 6e8be91..9ab5255 100644
--- a/filebeat/templates/daemonset.yaml
+++ b/filebeat/templates/daemonset.yaml
@@ -17,7 +17,7 @@ spec:
app: "{{ template "filebeat.fullname" . }}"
release: {{ .Release.Name | quote }}
updateStrategy:
- type: {{ .Values.updateStrategy }}
+{{ toYaml .Values.updateStrategy | indent 4 }}
template:
metadata:
annotations:
diff --git a/filebeat/values.yaml b/filebeat/values.yaml
index f83a19f..21d4682 100755
--- a/filebeat/values.yaml
+++ b/filebeat/values.yaml
@@ -130,7 +130,8 @@ affinity: {}
# https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass
priorityClassName: ""
-updateStrategy: RollingUpdate
+updateStrategy:
+ type: RollingUpdate
# Override various naming aspects of this chart
# Only edit these if you know what you're doing
diff --git a/metricbeat/templates/daemonset.yaml b/metricbeat/templates/daemonset.yaml
index 0fa38c3..f193ba0 100644
--- a/metricbeat/templates/daemonset.yaml
+++ b/metricbeat/templates/daemonset.yaml
@@ -17,7 +17,7 @@ spec:
app: "{{ template "metricbeat.fullname" . }}"
release: {{ .Release.Name | quote }}
updateStrategy:
- type: {{ .Values.updateStrategy }}
+{{ toYaml .Values.updateStrategy | indent 4 }}
template:
metadata:
annotations:
diff --git a/metricbeat/values.yaml b/metricbeat/values.yaml
index 6d53f3e..39e2811 100755
--- a/metricbeat/values.yaml
+++ b/metricbeat/values.yaml
@@ -206,7 +206,8 @@ affinity: {}
# https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass
priorityClassName: ""
-updateStrategy: RollingUpdate
+updateStrategy:
+ type: RollingUpdate
# Override various naming aspects of this chart
# Only edit these if you know what you're doing
--
2.20.1

View File

@ -0,0 +1,25 @@
From 9d463c65aa5c5f7c6c6d75ba57da5e7b5c20fd3a Mon Sep 17 00:00:00 2001
From: Simon Cousineau <Simon.Cousineau@windriver.com>
Date: Thu, 16 Apr 2020 13:03:46 -0400
Subject: [PATCH 1/1] Fix esConfig checksum annotation
---
elasticsearch/templates/statefulset.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml
index 16f9204..b4f6a98 100644
--- a/elasticsearch/templates/statefulset.yaml
+++ b/elasticsearch/templates/statefulset.yaml
@@ -50,7 +50,7 @@ spec:
{{- end }}
{{/* This forces a restart if the configmap has changed */}}
{{- if .Values.esConfig }}
- configchecksum: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }}
+ configchecksum: {{ toYaml .Values.esConfig | sha256sum | trunc 63 }}
{{- end }}
spec:
{{- if .Values.schedulerName }}
--
2.20.1

View File

@ -0,0 +1,27 @@
From 3b384c47dc7f106587d074fa539095f9b7179c17 Mon Sep 17 00:00:00 2001
From: Simon Cousineau <Simon.Cousineau@windriver.com>
Date: Mon, 20 Apr 2020 16:28:46 -0400
Subject: [PATCH 1/1] Fix Elasticsearch readiness probe http endpoint
---
elasticsearch/templates/statefulset.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml
index b4f6a98..daad8b1 100644
--- a/elasticsearch/templates/statefulset.yaml
+++ b/elasticsearch/templates/statefulset.yaml
@@ -214,8 +214,8 @@ spec:
}
if [ -f "${START_FILE}" ]; then
- echo 'Elasticsearch is already running, lets check the node is healthy and there are master nodes available'
- http "/_cluster/health?timeout=0s"
+ echo 'Elasticsearch is already running, lets check the node is healthy'
+ http "/_cluster/health?{{ .Values.clusterHealthCheckParamsBasic }}"
else
DATA_NODE=$(printenv node.data)
if [[ "$DATA_NODE" == true ]]; then
--
2.20.1

View File

@ -0,0 +1,104 @@
From cfec1478af37aead4743d31d0f9b8840e98dd53a Mon Sep 17 00:00:00 2001
From: Matt Peters <matt.peters@windriver.com>
Date: Sun, 26 Apr 2020 07:30:47 -0500
Subject: [PATCH] Add logstash ingress
---
logstash/README.md | 1 +
logstash/templates/_helpers.tpl | 11 +++++++++++
logstash/templates/ingress.yaml | 22 ++++++++++++++++++++++
logstash/values.yaml | 18 ++++++++++++++++++
4 files changed, 52 insertions(+)
create mode 100644 logstash/templates/ingress.yaml
diff --git a/logstash/README.md b/logstash/README.md
index 3b2a069..c1e834e 100644
--- a/logstash/README.md
+++ b/logstash/README.md
@@ -101,6 +101,7 @@ helm install --name logstash elastic/logstash --set imageTag=7.6.0
| `volumeClaimTemplate` | Configuration for the [volumeClaimTemplate for statefulsets](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage). You will want to adjust the storage (default `30Gi`) and the `storageClassName` if you are using a different storage class | `accessModes: [ "ReadWriteOnce" ]`<br>`resources.requests.storage: 1Gi` |
| `rbac` | Configuration for creating a role, role binding and service account as part of this helm chart with `create: true`. Also can be used to reference an external service account with `serviceAccountName: "externalServiceAccountName"`. | `create: false`<br>`serviceAccountName: ""` |
| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to "`.Release.Name`-`.Values.nameOverride or .Chart.Name`" | `""` |
+| `ingress` | Configurable [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) to expose the Kibana service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/master/kibana/values.yaml) for an example | `enabled: false` |
## Try it out
diff --git a/logstash/templates/_helpers.tpl b/logstash/templates/_helpers.tpl
index a0a0321..3a5bb03 100755
--- a/logstash/templates/_helpers.tpl
+++ b/logstash/templates/_helpers.tpl
@@ -34,3 +34,14 @@ Return the appropriate apiVersion for statefulset.
{{- 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 -}}
diff --git a/logstash/templates/ingress.yaml b/logstash/templates/ingress.yaml
new file mode 100644
index 0000000..c4015da
--- /dev/null
+++ b/logstash/templates/ingress.yaml
@@ -0,0 +1,22 @@
+{{- if .Values.ingress.enabled -}}
+{{- $fullName := include "logstash.fullname" . -}}
+apiVersion: {{ template "logstash.ingress.apiVersion" . }}
+kind: Ingress
+metadata:
+ name: {{ $fullName }}
+ labels:
+ app: {{ .Chart.Name }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+{{- with .Values.ingress.annotations }}
+ annotations:
+{{ toYaml . | indent 4 }}
+{{- end }}
+spec:
+{{- if .Values.ingress.tls }}
+ tls:
+{{ toYaml .Values.ingress.tls | indent 4 }}
+{{- end }}
+ rules:
+{{ toYaml .Values.ingress.rules | indent 4 }}
+{{- end }}
diff --git a/logstash/values.yaml b/logstash/values.yaml
index 9fedf40..23fe503 100755
--- a/logstash/values.yaml
+++ b/logstash/values.yaml
@@ -207,6 +207,24 @@ service: {}
# protocol: TCP
# targetPort: 8080
+ingress:
+ enabled: false
+ annotations: {}
+ # kubernetes.io/ingress.class: nginx
+ # kubernetes.io/tls-acme: "true"
+ tls: []
+ # - secretName: chart-example-tls
+ # hosts:
+ # - chart-example.local
+ rules: []
+ # - host: chart-example.local
+ # http:
+ # paths:
+ # - path: /http
+ # backend:
+ # serviceName: logstash
+ # servicePort: 8080
+
# pass custom command. This is equivalent of Entrypoint in docker
command: []
--
2.24.0

View File

@ -0,0 +1,11 @@
0001-add-makefile.patch
0002-use-oss-image.patch
0003-set-initial-masters-to-master-0.patch
0004-Update-Elastic-Apps-to-7.6.0-Releases.patch
0005-readiness-probe-enhancements.patch
0006-Metricbeat-nodeSelector-and-tolerations-config.patch
0007-Add-command-and-args-parameters-to-beats-and-logstash.patch
0008-Add-updateStrategy-parameter-to-beats-config.patch
0010-Fix-esConfig-checksum-annotation.patch
0011-Fix-Elasticsearch-readiness-probe-http-endpoint.patch
0012-Add-logstash-ingress.patch

View File

@ -8,20 +8,6 @@ export HELM_FOLDER = $(ROOT)/usr/lib/helm
dh $@
override_dh_auto_build:
# Move the source files from the extracted root directory to build root.
mv helm-charts-elastic/* .
# Apply the openstack-helm patches.
patch --no-backup-if-mismatch --prefix=/tmp/junk -p1 < 0001-add-makefile.patch
patch --no-backup-if-mismatch --prefix=/tmp/junk -p1 < 0002-use-oss-image.patch
patch --no-backup-if-mismatch --prefix=/tmp/junk -p1 < 0003-set-initial-masters-to-master-0.patch
patch --no-backup-if-mismatch --prefix=/tmp/junk -p1 < 0004-Update-Elastic-Apps-to-7.6.0-Releases.patch
patch --no-backup-if-mismatch --prefix=/tmp/junk -p1 < 0005-readiness-probe-enhancements.patch
patch --no-backup-if-mismatch --prefix=/tmp/junk -p1 < 0006-Metricbeat-nodeSelector-and-tolerations-config.patch
patch --no-backup-if-mismatch --prefix=/tmp/junk -p1 < 0007-Add-command-and-args-parameters-to-beats-and-logstash.patch
patch --no-backup-if-mismatch --prefix=/tmp/junk -p1 < 0008-Add-updateStrategy-parameter-to-beats-config.patch
patch --no-backup-if-mismatch --prefix=/tmp/junk -p1 < 0010-Fix-esConfig-checksum-annotation.patch
patch --no-backup-if-mismatch --prefix=/tmp/junk -p1 < 0011-Fix-Elasticsearch-readiness-probe-http-endpoint.patch
patch --no-backup-if-mismatch --prefix=/tmp/junk -p1 < 0012-Add-logstash-ingress.patch
# Host a server for the helm charts.
chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." &
sleep 2

View File

@ -1,25 +0,0 @@
#!/bin/bash
set -x
PKG_BUILD_NAME=$1
PKG_BUILD_ROOT=$(realpath `pwd`/${PKG_BUILD_NAME})
PKG_DIR="monitor-helm-elastic"
STX_BASE=$(realpath ${MY_REPO}/stx)
SRC=$(realpath ${STX_BASE}/monitor-armada-app/${PKG_DIR})
mkdir -p ${PKG_BUILD_ROOT}
pushd ${PKG_BUILD_ROOT}
# Local mirror workaround until CGCS_BASE mirror is supported.
STX_MIRROR=$(realpath "/import/mirrors/starlingx")
# Download monitor helm elastic chart source package.
ELASTIC_PKG="helm-charts-elastic-945017287598479ba8653d9baf3ff26f7fe31e50.tar.gz"
ELASTIC_SRC_PATH=$(realpath ${STX_MIRROR}/downloads/${ELASTIC_PKG})
cp ${ELASTIC_SRC_PATH} ${PKG_BUILD_ROOT}
# Extract the monitor helm elastic chart tar file.
tar xfzvv ${ELASTIC_PKG}
# Copy source files to the build directory.
cp -pr ${SRC}/files/* ${PKG_BUILD_ROOT}

View File

@ -1,7 +1,13 @@
---
debname: monitor-helm-elastic
debver: 1.0-1
dl_hook: dl_hook
dl_path:
name: helm-charts-elastic-945017287598479ba8653d9baf3ff26f7fe31e50.tar.gz
url: https://github.com/elastic/helm-charts/archive/945017287598479ba8653d9baf3ff26f7fe31e50.tar.gz
md5sum: 2b0231eececb1b8bae904d68c4088828
src_files:
- files/index.yaml
- files/repositories.yaml
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true