OPA Rego is ridiculously confusing - best way to learn it?

This page summarizes the projects mentioned and recommended in the original post on /r/kubernetes

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Kubewarden

    Kubewarden is a policy engine for Kubernetes. It helps with keeping your Kubernetes clusters secure and compliant. Kubewarden policies can be written using regular programming languages or Domain Specific Languages (DSL) sugh as Rego. Policies are compiled into WebAssembly modules that are then distributed using traditional container registries.

  • An alternative to OPA (and Rego) is Kubewarden (kubewarden.io), which can actually run Rego policies, but really allows policy writing in any language that compiles to wasm. This opens up your options a lot.

  • gatekeeper-library

    📚 The OPA Gatekeeper policy library

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • konstraint

    A policy management tool for interacting with Gatekeeper

  • admission-webhook-datree

    Datree offers cluster integration that allows you to validate your resources against your configured policy upon pushing them into a cluster, by using an admission webhook.

  • Hey, Itamar from Datree here! Just wanted to point out that now Datree is not just a CLI but also offers an admission webhook: https://github.com/datreeio/admission-webhook-datree

  • cloudformation-guard

    Guard offers a policy-as-code domain-specific language (DSL) to write rules and validate JSON- and YAML-formatted data such as CloudFormation Templates, K8s configurations, and Terraform JSON plans/configurations against those rules. Take this survey to provide feedback about cfn-guard: https://amazonmr.au1.qualtrics.com/jfe/form/SV_bpyzpfoYGGuuUl0

  • See https://github.com/aws-cloudformation/cloudformation-guard

  • jspolicy

    jsPolicy - Easier & Faster Kubernetes Policies using JavaScript or TypeScript

  • I struggled with understanding OPA too! I have not seen this mentioned, but one straightforward alternative is JSPolicy (https://www.jspolicy.com/), which allows you to write policies in Javascript or Typescript. It is really easy to understand and get started.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts