# Defining policies

> Define OPA policies using Rego in ConfigMaps. Mark them with a bundle label and include Rego rules to deploy and manage your policies effectively.

You can define policies by using Rego, OPAs [policy language](https://www.openpolicyagent.org/docs/latest/policy-language/).

Policy definitions are deployed as ConfigMap resources as described in [implementation notes](https://docs.stackable.tech/home/stable/opa/implementation-notes/index.md).

Here is an example:

```yaml
---
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.
