Skip to content

Commit

Permalink
Merge pull request #1706 from grafana/docs/kustomize-log-level
Browse files Browse the repository at this point in the history
docs: add docs on how to change the log encoder using kustomize
  • Loading branch information
theSuess authored Oct 11, 2024
2 parents 6f00da4 + f62d61b commit 5851fe4
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion docs/docs/installation/kustomize.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/{{<param version>}}/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.
Expand All @@ -108,3 +134,4 @@ patches:
argocd.argoproj.io/sync-options: ServerSideApply=true
name: grafanas.grafana.integreatly.org
```

0 comments on commit 5851fe4

Please sign in to comment.