Use helm template for updating istio configmap in policy enablement (#3715)

This commit is contained in:
Douglas Reid 2019-03-15 20:37:55 -07:00 committed by Martin Taillefer
parent ce8d331401
commit 9ae7c675e7
1 changed files with 3 additions and 8 deletions

View File

@ -28,18 +28,13 @@ which enables policy checks by default.
1. Edit the `istio` configmap to enable policy checks.
Execute the following command from the root Istio directory:
{{< text bash >}}
$ kubectl -n istio-system get cm istio -o jsonpath="{@.data.mesh}" | sed -e "s/disablePolicyChecks: true/disablePolicyChecks: false/" > /tmp/mesh.yaml
$ kubectl -n istio-system create cm istio -o yaml --dry-run --from-file=mesh=/tmp/mesh.yaml | kubectl replace -f -
$ helm template install/kubernetes/helm/istio --namespace=istio-system -x templates/configmap.yaml --set global.disablePolicyChecks=false | kubectl -n istio-system replace -f -
configmap "istio" replaced
{{< /text >}}
1. Delete the temporary file created to patch the `istio` configmap.
{{< text bash >}}
$ rm /tmp/mesh.yaml
{{< /text >}}
1. Validate that policy enforcement is now enabled.
{{< text bash >}}