From 29489acf39a0d406a1ac0d1c78183917a508657e Mon Sep 17 00:00:00 2001 From: Steven Fitzpatrick Date: Tue, 24 Nov 2020 22:13:10 +0000 Subject: [PATCH] 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 --- fluentd/Chart.yaml | 4 ++-- fluentd/templates/daemonset.yaml | 17 +++++++---------- fluentd/values.yaml | 14 +++++++++++++- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/fluentd/Chart.yaml b/fluentd/Chart.yaml index 9c8a30be7..3f4fb7299 100644 --- a/fluentd/Chart.yaml +++ b/fluentd/Chart.yaml @@ -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 diff --git a/fluentd/templates/daemonset.yaml b/fluentd/templates/daemonset.yaml index eef101457..048982f57 100644 --- a/fluentd/templates/daemonset.yaml +++ b/fluentd/templates/daemonset.yaml @@ -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: diff --git a/fluentd/values.yaml b/fluentd/values.yaml index d8b8470a5..2c1be1fa4 100644 --- a/fluentd/values.yaml +++ b/fluentd/values.yaml @@ -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