From f62d61bee7d3d2a018242aaed9a3a0ddcfdee9f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20S=C3=BC=C3=9F?= Date: Mon, 7 Oct 2024 15:50:56 +0200 Subject: [PATCH] docs: add docs on how to change the log encoder using kustomize Co-authored-by: Igor Beliakov <46579601+weisdd@users.noreply.github.com> --- docs/docs/installation/kustomize.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/docs/installation/kustomize.md b/docs/docs/installation/kustomize.md index 5578c2a28..066eb762f 100644 --- a/docs/docs/installation/kustomize.md +++ b/docs/docs/installation/kustomize.md @@ -81,7 +81,33 @@ resources: ``` -#### ArgoCD +## Configuration + +Kustomize allows for customization through overlays. For example: if you want to +change log format to JSON, you can apply an override to the container and provide the +required arguments: + +```yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - https://github.com/grafana/grafana-operator/releases/download/{{}}/kustomize-cluster_scoped.yaml + +patches: + - target: + group: apps + version: v1 + kind: Deployment + name: grafana-operator-controller-manager + patch: |- + - op: add + path: /spec/template/spec/containers/0/args/- + value: --zap-encoder=json +``` + +## Common Issues +### ArgoCD If you are using ArgoCD you need to add this patch to fix the errors during apply of the CRD. @@ -108,3 +134,4 @@ patches: argocd.argoproj.io/sync-options: ServerSideApply=true name: grafanas.grafana.integreatly.org ``` +