Reputation: 61
I am using an ci/cd application called concourse which got recently, integrated to OPA . Our concourse setup is running in k8s. I am trying to run the opa as a sidecar it recommended with below configuration./
sidecar configuration : https://github.com/concourse/concourse-chart/blob/master/values.yaml#L1530
sidecarContainers:
- name: opa
image: openpolicyagent/opa:0.21.0
args:
- "run"
- "--server"
I want to apply some policies as well. my policy file is concourse_policy.rego
package concourse
default allow = true
allow = false {
input.action == "UseImage"
input.data.privileged == true
I am not sure, how to make this policy applied bydefault to my opa, when sidecar is running. How can do it. ?
Upvotes: 0
Views: 189
Reputation: 2315
You'll need to either mount a volume containing your policies into the container and start OPA pointing to those, or you could use OPA's bundle API to retrieve the policies from a remote endpoint.
Upvotes: 1