stx-monitor logstash template change
Default to using the same image as the main container in logstash extra init containers so that the same docker registry as the main container image can be used. Closes-Bug: 1869256 Change-Id: I0555c31208f25146ba74b1a7b2f926abaf31e060 Signed-off-by: Kevin Smith <kevin.smith@windriver.com>
This commit is contained in:
parent
bdfd8a2abd
commit
4e1bf7971e
@ -33,6 +33,7 @@ Patch12: 0012-Add-imagePullSecrets.patch
|
||||
Patch13: 0013-removed-unused-images.patch
|
||||
Patch14: 0014-Add-rbac-replicasets-to-apps-apigroup-commit-1717e2d.patch
|
||||
Patch15: 0015-script-flexibility.patch
|
||||
Patch16: 0016-use-main-container-image-for-initcontainer.patch
|
||||
|
||||
BuildRequires: helm
|
||||
|
||||
@ -56,6 +57,7 @@ Monitor Helm charts
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
|
||||
%build
|
||||
# initialize helm and build the toolkit
|
||||
|
@ -0,0 +1,44 @@
|
||||
From 1e1ee29b195958f0c3313af86b6dae8f04720277 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Smith <kevin.smith@windriver.com>
|
||||
Date: Thu, 26 Mar 2020 15:01:07 -0400
|
||||
Subject: [PATCH 1/1] use main container image for initcontainer
|
||||
|
||||
---
|
||||
stable/logstash/templates/statefulset.yaml | 4 ++++
|
||||
stable/logstash/values.yaml | 5 +++++
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
diff --git a/stable/logstash/templates/statefulset.yaml b/stable/logstash/templates/statefulset.yaml
|
||||
index d34dcec..66f6313 100644
|
||||
--- a/stable/logstash/templates/statefulset.yaml
|
||||
+++ b/stable/logstash/templates/statefulset.yaml
|
||||
@@ -48,6 +48,10 @@ spec:
|
||||
initContainers:
|
||||
{{- if .Values.extraInitContainers }}
|
||||
{{ toYaml .Values.extraInitContainers | indent 8 }}
|
||||
+{{- if .Values.useMainImageForInitContainers }}
|
||||
+ image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
+{{- end }}
|
||||
env:
|
||||
## Elasticsearch output
|
||||
- name: ELASTICSEARCH_HOST
|
||||
diff --git a/stable/logstash/values.yaml b/stable/logstash/values.yaml
|
||||
index 2fdebde..2167601 100644
|
||||
--- a/stable/logstash/values.yaml
|
||||
+++ b/stable/logstash/values.yaml
|
||||
@@ -169,6 +169,11 @@ volumes: []
|
||||
|
||||
extraEnv: []
|
||||
|
||||
+# Init container will use the same image as the main
|
||||
+# container if this is true. If true, do not specify
|
||||
+# the image in the extraInitContainers block. If false,
|
||||
+# will need to specify the image.
|
||||
+useMainImageForInitContainers: true
|
||||
extraInitContainers: []
|
||||
# - name: echo
|
||||
# image: busybox
|
||||
--
|
||||
1.8.3.1
|
||||
|
Loading…
Reference in New Issue
Block a user