From b51616ae2bc7de3d24fd47c42c0e13022e483206 Mon Sep 17 00:00:00 2001 From: Scott Cabrinha Date: Mon, 3 Aug 2020 11:19:40 -0700 Subject: [PATCH] allow hostNetwork setting on OPA pod (#23430) Signed-off-by: Scott Cabrinha --- stable/opa/Chart.yaml | 2 +- stable/opa/README.md | 1 + stable/opa/templates/deployment.yaml | 4 +++- stable/opa/values.yaml | 4 ++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/stable/opa/Chart.yaml b/stable/opa/Chart.yaml index 592b9402f2..87a64d11b2 100644 --- a/stable/opa/Chart.yaml +++ b/stable/opa/Chart.yaml @@ -6,7 +6,7 @@ keywords: - opa - admission control - policy -version: 1.14.0 +version: 1.14.1 home: https://www.openpolicyagent.org icon: https://raw.githubusercontent.com/open-policy-agent/opa/master/logo/logo.png sources: diff --git a/stable/opa/README.md b/stable/opa/README.md index 4dde3f01b6..e2b66f1112 100644 --- a/stable/opa/README.md +++ b/stable/opa/README.md @@ -69,6 +69,7 @@ Reference](https://www.openpolicyagent.org/docs/configuration.html). | `podDisruptionBudget.enabled` | Enables creation of a PodDisruptionBudget for OPA. | `false` | | `podDisruptionBudget.minAvailable` | Sets the minimum number of pods to be available. Cannot be set at the same time as maxUnavailable. | `1` | | `podDisruptionBudget.maxUnavailable` | Sets the maximum number of pods to be unavailable. Cannot be set at the same time as minAvailable. | Unset | +| `hostNetwork.enabled` | Use hostNetwork setting on OPA pod | `false` | | `image` | OPA image to deploy. | `openpolicyagent/opa` | | `imageTag` | OPA image tag to deploy. | See [values.yaml](values.yaml) | | `port` | Port in the pod to which OPA will bind itself. | `443` | diff --git a/stable/opa/templates/deployment.yaml b/stable/opa/templates/deployment.yaml index e9e8f4010d..59509a5b4d 100644 --- a/stable/opa/templates/deployment.yaml +++ b/stable/opa/templates/deployment.yaml @@ -72,7 +72,9 @@ spec: - name: bootstrap mountPath: /bootstrap {{- end }} - +{{- if .Values.hostNetwork.enabled }} + hostNetwork: true +{{- end }} containers: - name: opa image: {{ .Values.image }}:{{ .Values.imageTag }} diff --git a/stable/opa/values.yaml b/stable/opa/values.yaml index 0690b98436..ac117b026c 100644 --- a/stable/opa/values.yaml +++ b/stable/opa/values.yaml @@ -100,6 +100,10 @@ authz: # Mostly useful for debugging. enabled: true +# Use hostNetwork setting on OPA pod +hostNetwork: + enabled: false + # Docker image and tag to deploy. image: openpolicyagent/opa imageTag: 0.15.1