do you have an example of how to add an audit bloc...
# help
m
do you have an example of how to add an audit block to the conf yaml file only if the env is dev?
c
Are you using Helm to deploy Cerbos?
m
I am not
what is Helm, lol
we have a jenkins pipeline building our docker image and deploying it
c
Helm is a popular way to deploy to Kubernetes. It allows you to customize the deployment for each environment. But, since you're not using that, I can suggest two options. Option 1: Use an environment variable to flip
audit.enabled
config field. So you would have your config file looking something like the following and launch your container with
-e AUDIT_ENABLED=true
in dev.
Copy code
audit:
  enabled: ${AUDIT_ENABLED}
Option 2: Add
--set=audit.enabled=true
as an argument to the docker
ARGS
field or your container launch script
m
ok awesome, and otherwise will I be fine to keep the backend and file attributes even when audit.enabled = false?:
Copy code
audit:
  enabled: ${AUDIT_ENABLED}
  decisionLogsEnabled: ${DECISION_LOGS_ENABLED}
  backend: file
  file:
      path: stdout
c
Yes, absolutely. They're only used if
enabled
is true.
m
cool, i'll let you know how it goes!
Working great @Charith (Cerbos)!