Skip to content

Instantly share code, notes, and snippets.

@pivotaljohn
Last active April 30, 2021 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pivotaljohn/2425698c574f3f0c2844532a933ecccd to your computer and use it in GitHub Desktop.
Save pivotaljohn/2425698c574f3f0c2844532a933ecccd to your computer and use it in GitHub Desktop.
Text Templating (focusing on multi-line output)
#@ load("@ytt:data", "data")
#@yaml/text-templated-strings
---
apiVersion: v1
data:
filter-grep.conf: |
# https://docs.fluentbit.io/manual/pipeline/filters/grep
# Cette commande filtre les logs qui contienent NomTraitement
# Ce filtre est le premier a passer et il est fait sur les donnees brutes
[FILTER]
name grep
match (@= data.values.match @)
exclude log NomTraitement
filter-kubernetes.conf: |
[FILTER]
Name kubernetes
Match (@= data.values.kubematch @)
kind: ConfigMap
metadata:
name: config
namespace: #@ data.values.nomprojet
#@data/values
---
nomprojet: test
match: grep.*
kubematch: "kube.* "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment