Thanks to visit codestin.com
Credit goes to docs.stackable.tech

Defining policies

You can define policies by using Rego, OPAs policy language.

Policy definitions are deployed as ConfigMap resources as described in implementation notes.

Here is an example:

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: test
  labels:
    opa.stackable.tech/bundle: "true" (1)
data:
  test.rego: | (2)
    package test

    hello if {
      true
    }

    world if {
      false
    }
1 Mark this ConfigMap as a bundle source.
2 test.rego is the file name to use inside the bundle for these rules.