Fluentd: Add Configurable Readiness and Liveness Probes

This change updates the fluentd chart to use HTK probe templates
to allow configuration by value overrides

Change-Id: I97a3cc0832554a31146cd2b6d86deb77fd73db41
This commit is contained in:
Steven Fitzpatrick 2020-11-24 22:13:10 +00:00
parent ed229cf605
commit 29489acf39
3 changed files with 22 additions and 13 deletions

View File

@ -12,10 +12,10 @@
---
apiVersion: v1
appVersion: v1.0.0
appVersion: v1.10.1
description: OpenStack-Helm Fluentd
name: fluentd
version: 0.1.1
version: 0.1.2
home: https://www.fluentd.org/
sources:
- https://github.com/fluent/fluentd

View File

@ -12,6 +12,11 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- define "probeTemplate" }}
tcpSocket:
port: {{ tuple "fluentd" "internal" "service" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- end }}
{{- if .Values.manifests.daemonset }}
{{- $envAll := . }}
@ -118,16 +123,8 @@ spec:
containerPort: {{ tuple "fluentd" "internal" "service" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
- name: metrics
containerPort: {{ tuple "fluentd" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe:
tcpSocket:
port: {{ tuple "fluentd" "internal" "service" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 20
periodSeconds: 10
livenessProbe:
tcpSocket:
port: {{ tuple "fluentd" "internal" "service" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 60
timeoutSeconds: 10
{{ dict "envAll" . "component" "fluentd" "container" "fluentd" "type" "readiness" "probeTemplate" (include "probeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
{{ dict "envAll" . "component" "fluentd" "container" "fluentd" "type" "liveness" "probeTemplate" (include "probeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
env:
- name: NODE_NAME
valueFrom:

View File

@ -230,7 +230,19 @@ pod:
mounts:
fluentd:
fluentd:
probes:
fluentd:
fluentd:
readiness:
enabled: true
params:
initialDelaySeconds: 90
timeoutSeconds: 30
liveness:
enabled: true
params:
initialDelaySeconds: 180
timeoutSeconds: 30
manifests:
configmap_bin: true
configmap_etc: true