open-policy-agent/kube-mgmt sits at 261 stars on GitHub, written primarily in Go. Sidecar for managing OPA instances in Kubernetes.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
kube-mgmt manages policies / data of Open Policy Agent
instances in Kubernetes.
Use kube-mgmt to:
Load policies and/or static data into OPA instance from ConfigMap.
Replicate Kubernetes resources
including CustomResourceDefinitions (CRDs) into OPA instance.
Deployment Guide
Both OPA and kube-mgmt can be installed using opa-kube-mgmt Helm chart.
Follow README to install it into K8s cluster.
Policies and data loading
kube-mgmt automatically discovers policies and JSON data
stored in ConfigMaps in Kubernetes and loads them into OPA.
kube-mgmt assumes a ConfigMap contains policy or JSON data if the ConfigMap is:
Created in a namespace listed in the --namespaces option.
If you specify --namespaces=* then kube-mgmt will look for policies in ALL namespaces.
Labelled with openpolicyagent.org/policy=rego for policies
Labelled with openpolicyagent.org/data=opa for JSON data
Policies or data discovery and loading can be disabled using --enable-policy=false or --enable-data=false flags respectively.
Label names and their values can be configured using --policy-label, --policy-value, --data-label, --data-value CLI options.
When a ConfigMap has been successfully loaded into OPA,
the openpolicyagent.org/kube-mgmt-status annotation is set to {"status": "ok"}.
If loading fails for some reason (e.g., because of a parse error), the
openpolicyagent.org/kube-mgmt-status annotation is set to {"status": "error", "error": ...}
where the error field contains details about the failure.
Data loaded out of ConfigMaps is laid out as follows:
<namespace>/<name>/<key>
For example, if the following ConfigMap was created:
You could refer to the data inside your policies as follows:
data.opa["hello-data"]["x.json"].a[0] # evaluates to 1
K8s resource replication
[!WARNING]
K8s resource replication requires global cluster permission with ClusterRole and ClusterRoleBinding.
kube-mgmt can be configured to replicate Kubernetes resources into OPA so that
you can express policies over an eventually consistent cache of Kubernetes
state.
Replication is enabled with the following options:
# Replicate namespace-level resources. May be specified multiple times.
--replicate=<[group/]version/resource>
# Replicate cluster-level resources. May be specified multiple times.
--replicate-cluster=<[group/]version/resource>
By default resources are replicated from all namespaces.
Use --replicate-ignore-namespaces option to exclude particular namespaces from replication.
Kubernetes resources replicated into OPA are laid out as follows:
Custom Resource Definitions can also be replicated using the same --replicate and --replicate-cluster options.
Admission Control
To get started with admission control policy enforcement in Kubernetes 1.9 or later see the Kubernetes Admission Control tutorial. For older versions of Kubernetes, see Admission Control (1.7).
In the Kubernetes Admission Control tutorial, OPA is NOT running with an authorization policy configured and hence clients can read and write policies in OPA. When deploying OPA in an insecure environment, it is recommended to configure authentication and authorization on the OPA daemon. For an example of how OPA can be securely deployed as an admission controller see Admission Control Secure.
OPA API Endpoints and Least-privilege Configuration
kube-mgmt is a privileged component that can load policy and data into OPA.
Other clients connecting to the OPA API only need to query for policy decisions.
To load policy and data into OPA, kube-mgmt uses the following OPA API
endpoints:
PUT v1/policy/<path> - upserting policies
DELETE v1/policy/<path> - deleting policies
PUT v1/data/<path> - upserting data
PATCH v1/data/<path> - updating and removing data
Many users configure OPA with a simple API authorization policy that restricts
access to the OPA APIs:
package system.authz
# Deny access by default.
default allow = false
# Allow anonymous access to decision `data.example.response`
#
# NOTE: the specific decision differs depending on your policies.
# NOTE: depending on how callers are configured, they may only require this or the default decision below.
allow {
input.path == ["v0", "data", "example", "response"]
input.method == "POST"
}
# Allow anonymous access to default decision.
allow {
input.path == [""]
input.method == "POST"
}
# This is only used for health check in liveness and readiness probe
allow {
input.path == ["health"]
input.method == "GET"
}
# This is only used for prometheus metrics
allow {
input.path == ["metrics"]
input.method == "GET"
}
# This is used by kube-mgmt to PUT/PATCH against /v1/data and PUT/DELETE against /v1/policies.
#
# NOTE: The $TOKEN value is replaced at deploy-time with the actual value that kube-mgmt will use. This is typically done by an initContainer.
allow {
input.identity == "$TOKEN"
}
Development
Environment setup
This project uses devbox to provide a fully isolated,
reproducible development environment. All required tools (Go, just, OPA CLI, staticcheck, and others)
are managed by devbox at pinned versions — no manual installation needed.
To enter the development shell:
devbox shell
This project uses just as a command runner, configured in justfile.
Run just without arguments to list all available recipes.
Running the application locally
kube-mgmt runs in a local k3d Kubernetes cluster. Create the cluster once before first use:
just all
Start and stop kube-mgmt application with:
just up
just down
Delete local k8s cluster
just 3d-down
Tests
The project has three categories of tests.
Go unit tests
Standard Go tests using the testing package:
just test-go
Helm chart unit tests
Chart rendering tests implemented with the helm-unittest plugin:
just test-helm
End-to-end tests
E2E tests deploy kube-mgmt to the local k3d cluster via devspace and validate behavior using
chainsaw (Kubernetes-native test framework) and hurl
(HTTP assertions). Each scenario is a directory under test/e2e/.
Run a single scenario (shows an interactive picker when no argument is given):
just test-e2e [test/e2e/<scenario>]
Run all scenarios sequentially:
just test-e2e-all
Linting
just lint
Runs go vet and staticcheck for Go code, and helm-unittest lint rules for the Helm chart.
Run all checks
just test
Runs lint, Go unit tests, and Helm chart unit tests.
Release
To release a new version, create a GitHub release
with a tag that follows the semantic versioning convention.
Once the tag is pushed, the CI pipeline automatically builds and publishes all release artifacts:
Docker images for all supported architectures and the Helm chart.
Does open-policy-agent/kube-mgmt have a project website?
No homepage URL was recorded for open-policy-agent/kube-mgmt in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How active is development on open-policy-agent/kube-mgmt?
The most recent commit recorded on open-policy-agent/kube-mgmt was 9 days ago, based on the GitHub push timestamp. The repository has 109 forks — one of the better signals of community interest.
How many stars does open-policy-agent/kube-mgmt have?
open-policy-agent/kube-mgmt has 261 GitHub stars — refresh the page for the live number, or check github.com/open-policy-agent/kube-mgmt. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is open-policy-agent/kube-mgmt written in?
open-policy-agent/kube-mgmt is written primarily in Go. GitHub's language field is based on the largest share of bytes in the default branch.
What license does open-policy-agent/kube-mgmt use?
open-policy-agent/kube-mgmt is released under the Apache-2.0 license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
What topics is open-policy-agent/kube-mgmt associated with?
GitHub's repository topics for open-policy-agent/kube-mgmt: "devops", "k8s", "kubernetes", "opa", "policy". TopGit's editorial category is Developer Tools.
Where do I read more about open-policy-agent/kube-mgmt?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/open-policy-agent/kube-mgmt is the definitive source.
Read full README in the tab above.
Want a second opinion on kube-mgmt?
Ask an AI that can read this page — one click and you get its take on kube-mgmt.