Back to Charts

⚠️ Repo Archive Notice

stable/opa/README.md

latest5.9 KB
Original Source

⚠️ Repo Archive Notice

As of Nov 13, 2020, charts in this repo will no longer be updated. For more information, see the Helm Charts Deprecation and Archive Notice, and Update.

OPA

OPA is an open source general-purpose policy engine designed for cloud-native environments.

DEPRECATION NOTICE

This chart is deprecated and no longer supported.

Prerequisites

Overview

This helm chart installs OPA as a Kubernetes admission controller. Using OPA, you can enforce fine-grained invariants over arbitrary resources in your Kubernetes cluster.

Kick the tires

If you just want to see something run, install the chart without any configuration.

bash
helm install stable/opa

Once installed, the OPA will download a sample bundle from https://www.openpolicyagent.org. The sample bundle contains a simple policy that restricts the hostnames that can be specified on Ingress objects created in the opa-example namespace. You can download the bundle and inspect it yourself:

bash
mkdir example && cd example
curl -s -L https://www.openpolicyagent.org/bundles/kubernetes/admission | tar xzv

See the NOTES.txt file for examples of how to exercise the admission controller.

Configuration

All configuration settings are contained and described in values.yaml.

You should set the URL and credentials for the OPA to use to download policies. The URL should identify an HTTP endpoint that implements the OPA Bundle API.

  • opa.services.controller.url specifies the base URL of the OPA control plane.

  • opa.services.controller.credentials.bearer.token specifies a bearer token for the OPA to use to authenticate with the control plane.

For more information on OPA-specific configuration see the OPA Configuration Reference.

ParameterDescriptionDefault
certManager.enabledSetup the Webhook using cert-managerfalse
admissionControllerKindType of admission controller to install.ValidatingWebhookConfiguration
admissionControllerFailurePolicyFail-open (Ignore) or fail-closed (Fail)?Ignore
admissionControllerRulesTypes of operations resources to check.*
admissionControllerNamespaceSelectorNamespace selector for the admission controllerSee values.yaml
generateAdmissionControllerCertsAuto-generate TLS certificates for admission controller.true
admissionControllerCAManually set admission controller certificate CA.Unset
admissionControllerCertManually set admission controller certificate.Unset
admissionControllerKeyManually set admission controller key.Unset
podDisruptionBudget.enabledEnables creation of a PodDisruptionBudget for OPA.false
podDisruptionBudget.minAvailableSets the minimum number of pods to be available. Cannot be set at the same time as maxUnavailable.1
podDisruptionBudget.maxUnavailableSets the maximum number of pods to be unavailable. Cannot be set at the same time as minAvailable.Unset
hostNetwork.enabledUse hostNetwork setting on OPA podfalse
imageOPA image to deploy.openpolicyagent/opa
imageTagOPA image tag to deploy.See values.yaml
portPort in the pod to which OPA will bind itself.443
logLevelLog level that OPA outputs at, (debug, info or error)info
logFormatLog format that OPA produces (text or json)text
replicasNumber of admission controller replicas to deploy.1
affinityPod/Node affinity and anti-affinity{}
tolerationsList of node taint tolerations.[]
nodeSelectorNode labels for pod assignment.{}
resourcesCPU and memory limits for OPA container.{}
readinessProbeHTTP readiness probe for OPA container.See values.yaml
livenessProbeHTTP liveness probe for OPA container.See values.yaml
opaOPA configuration.See values.yaml
mgmtkube-mgmt configuration.See values.yaml
mgmt.portkube-mgmt/prometheus port used to communicate with opa.See values.yaml
sar.resourcesCPU and memory limits for the sar container.{}
priorityClassNameThe name of the priorityClass for the pods.Unset
prometheus.enabledFlag to expose the /metrics endpoint to be scraped.false
serviceMonitor.enabledif true, creates a Prometheus Operator ServiceMonitorfalse
serviceMonitor.intervalInterval that Prometheus scrapes Envoy metrics15s
serviceMonitor.namespaceNamespace which the operated Prometheus is running in``
annotationsAnnotations to be added to the deployment template.{}
bootstrapPoliciesBootstrap policies to be loaded during OPA startup.{}
timeoutSecondsTimeout for a webhook call in seconds.``
securityContextSecurity context for the containers{enabled: false, runAsNonRoot: true, runAsUser: 1}
deploymentStrategySpecify deployment spec rollout strategy{}
extraArgsAdditional arguments to be added to the opa container[]
extraContainersAdditional containers to be added to the deployment[]
extraVolumesAdditional volumes to be added to the deployment[]
extraPortsAdditional ports to OPA service. Useful to expose extraContainer ports.[]