From daeceef36968f5f9397269b40d3fc4fee41c4bcf Mon Sep 17 00:00:00 2001 From: Eric Van Norman Date: Wed, 14 Oct 2020 08:23:01 -0500 Subject: [PATCH] Update istio/istio test reference (#8290) * Update istio/istio test reference * Update istioctl analyzer test as namespace message is now Info. * Review comment --- .../docs/ops/diagnostic-tools/istioctl-analyze/index.md | 8 +++----- .../docs/ops/diagnostic-tools/istioctl-analyze/snips.sh | 6 ++---- .../en/docs/ops/diagnostic-tools/istioctl-analyze/test.sh | 2 +- go.mod | 2 +- go.sum | 8 ++++---- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/content/en/docs/ops/diagnostic-tools/istioctl-analyze/index.md b/content/en/docs/ops/diagnostic-tools/istioctl-analyze/index.md index d04aaf8f17..cfde7fb885 100644 --- a/content/en/docs/ops/diagnostic-tools/istioctl-analyze/index.md +++ b/content/en/docs/ops/diagnostic-tools/istioctl-analyze/index.md @@ -22,10 +22,10 @@ $ istioctl analyze --all-namespaces And that’s it! It’ll give you any recommendations that apply. -For example, if you forgot to enable Istio injection (a very common issue), you would get the following warning: +For example, if you forgot to enable Istio injection (a very common issue), you would get the following 'Info' message: {{< text syntax=plain snip_id=analyze_all_namespace_sample_response >}} -Warning [IST0102] (Namespace default) The namespace is not enabled for Istio injection. Run 'kubectl label namespace default istio-injection=enabled' to enable it, or 'kubectl label namespace default istio-injection=disabled' to explicitly mark it as not needing injection +Info [IST0102] (Namespace default) The namespace is not enabled for Istio injection. Run 'kubectl label namespace default istio-injection=enabled' to enable it, or 'kubectl label namespace default istio-injection=disabled' to explicitly mark it as not needing injection. {{< /text >}} Fix the issue: @@ -123,9 +123,7 @@ Sometimes you might find it useful to hide or ignore analyzer messages in certai {{< text syntax=bash snip_id=analyze_k_frod >}} $ istioctl analyze -k --namespace frod -Warning [IST0102] (Namespace frod) The namespace is not enabled for Istio injection. Run 'kubectl label namespace frod istio-injection=enabled' to enable it, or 'kubectl label namespace frod istio-injection=disabled' to explicitly mark it as not needing injection -Error: Analyzers found issues when analyzing namespace: frod. -See https://istio.io/v1.8/docs/reference/config/analysis for more information about causes and resolutions. +Info [IST0102] (Namespace frod) The namespace is not enabled for Istio injection. Run 'kubectl label namespace frod istio-injection=enabled' to enable it, or 'kubectl label namespace frod istio-injection=disabled' to explicitly mark it as not needing injection. {{< /text >}} Because you don't have permissions to update the namespace, you cannot resolve the message by annotating the namespace. Instead, you can direct `istioctl analyze` to suppress the above message on the resource: diff --git a/content/en/docs/ops/diagnostic-tools/istioctl-analyze/snips.sh b/content/en/docs/ops/diagnostic-tools/istioctl-analyze/snips.sh index ecb6fedfea..f1e8384408 100644 --- a/content/en/docs/ops/diagnostic-tools/istioctl-analyze/snips.sh +++ b/content/en/docs/ops/diagnostic-tools/istioctl-analyze/snips.sh @@ -25,7 +25,7 @@ istioctl analyze --all-namespaces } ! read -r -d '' snip_analyze_all_namespace_sample_response <<\ENDSNIP -Warning [IST0102] (Namespace default) The namespace is not enabled for Istio injection. Run 'kubectl label namespace default istio-injection=enabled' to enable it, or 'kubectl label namespace default istio-injection=disabled' to explicitly mark it as not needing injection +Info [IST0102] (Namespace default) The namespace is not enabled for Istio injection. Run 'kubectl label namespace default istio-injection=enabled' to enable it, or 'kubectl label namespace default istio-injection=disabled' to explicitly mark it as not needing injection. ENDSNIP snip_fix_default_namespace() { @@ -89,9 +89,7 @@ istioctl analyze -k --namespace frod } ! read -r -d '' snip_analyze_k_frod_out <<\ENDSNIP -Warning [IST0102] (Namespace frod) The namespace is not enabled for Istio injection. Run 'kubectl label namespace frod istio-injection=enabled' to enable it, or 'kubectl label namespace frod istio-injection=disabled' to explicitly mark it as not needing injection -Error: Analyzers found issues when analyzing namespace: frod. -See https://istio.io/v1.8/docs/reference/config/analysis for more information about causes and resolutions. +Info [IST0102] (Namespace frod) The namespace is not enabled for Istio injection. Run 'kubectl label namespace frod istio-injection=enabled' to enable it, or 'kubectl label namespace frod istio-injection=disabled' to explicitly mark it as not needing injection. ENDSNIP snip_analyze_suppress0102() { diff --git a/content/en/docs/ops/diagnostic-tools/istioctl-analyze/test.sh b/content/en/docs/ops/diagnostic-tools/istioctl-analyze/test.sh index 9c407d8aa1..e581dd433c 100755 --- a/content/en/docs/ops/diagnostic-tools/istioctl-analyze/test.sh +++ b/content/en/docs/ops/diagnostic-tools/istioctl-analyze/test.sh @@ -88,7 +88,7 @@ echo '*** istioctl-analyze step 12 ***' _verify_contains snip_analyze_suppress0102 "$snip_analyze_suppress0102_out" echo '*** istioctl-analyze step 13 ***' -_verify_lines snip_analyze_suppress_frod_0107_baz "- Warn [IST0102] (Namespace frod) The namespace is not enabled for Istio injection. Run 'kubectl label namespace frod istio-injection=enabled' to enable it, or 'kubectl label namespace frod istio-injection=disabled' to explicitly mark it as not needing injection" +_verify_lines snip_analyze_suppress_frod_0107_baz "- Info [IST0102] (Namespace frod) The namespace is not enabled for Istio injection. Run 'kubectl label namespace frod istio-injection=enabled' to enable it, or 'kubectl label namespace frod istio-injection=disabled' to explicitly mark it as not needing injection." echo '*** istioctl-analyze step 14 ***' kubectl create deployment my-deployment --image=docker.io/kennethreitz/httpbin diff --git a/go.mod b/go.mod index cf5131efa9..cc83640dea 100644 --- a/go.mod +++ b/go.mod @@ -27,6 +27,6 @@ replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.5 replace github.com/evanphx/json-patch => github.com/evanphx/json-patch v0.0.0-20190815234213-e83c0a1c26c8 require ( - istio.io/istio v0.0.0-20201002175829-cb446b90f9d8 + istio.io/istio v0.0.0-20201012154533-734140f47c4d istio.io/pkg v0.0.0-20200922180714-670b76a68558 ) diff --git a/go.sum b/go.sum index 637438bd29..5f387dcdd8 100644 --- a/go.sum +++ b/go.sum @@ -1233,15 +1233,15 @@ honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= istio.io/api v0.0.0-20190515205759-982e5c3888c6/go.mod h1:hhLFQmpHia8zgaM37vb2ml9iS5NfNfqZGRt1pS9aVEo= istio.io/api v0.0.0-20200812202721-24be265d41c3/go.mod h1:88HN3o1fSD1jo+Z1WTLlJfMm9biopur6Ct9BFKjiB64= -istio.io/api v0.0.0-20201001200453-44a8342c376c h1:yOayaF0d6u563LoNAcFTkuqrBGlFUxYdDHshapCQVGU= -istio.io/api v0.0.0-20201001200453-44a8342c376c/go.mod h1:88HN3o1fSD1jo+Z1WTLlJfMm9biopur6Ct9BFKjiB64= +istio.io/api v0.0.0-20201007205536-38d3c76a5557 h1:EDgHyV3kq988v2vb4p4j/D0saXf1JGh43uWhEkD4x+M= +istio.io/api v0.0.0-20201007205536-38d3c76a5557/go.mod h1:88HN3o1fSD1jo+Z1WTLlJfMm9biopur6Ct9BFKjiB64= istio.io/client-go v0.0.0-20200908160912-f99162621a1a h1:clPn0fz+rXq5Ytj6Ppb1ygUKeU0RImT4ZbT1oMd1G04= istio.io/client-go v0.0.0-20200908160912-f99162621a1a/go.mod h1:SO65MWt7I45dvUwuDowoiB0SVcGpfWZfUTlopvYpbZc= istio.io/gogo-genproto v0.0.0-20190930162913-45029607206a/go.mod h1:OzpAts7jljZceG4Vqi5/zXy/pOg1b209T3jb7Nv5wIs= istio.io/gogo-genproto v0.0.0-20200908160912-66171252e3db h1:btPv5pCusFxbWrmiLNLEThH8IzWunUeZ1r5M1O22vBc= istio.io/gogo-genproto v0.0.0-20200908160912-66171252e3db/go.mod h1:OzpAts7jljZceG4Vqi5/zXy/pOg1b209T3jb7Nv5wIs= -istio.io/istio v0.0.0-20201002175829-cb446b90f9d8 h1:45wVlvgEycNkIVAWnN2FTdBaPj/g5GJjz880uBRK4H0= -istio.io/istio v0.0.0-20201002175829-cb446b90f9d8/go.mod h1:GPVQG9Uq/ul1kkHVWeToiDP05HqO+Gw275gSYH4EJUM= +istio.io/istio v0.0.0-20201012154533-734140f47c4d h1:NW/YEQjV0OP5kcvPI0fDBspcBRpPLs7/lT6bpKbCen0= +istio.io/istio v0.0.0-20201012154533-734140f47c4d/go.mod h1:n59p7xMgvBvXo3SB//vRIn4bWWGI5FVx6DtKmgV2KfE= istio.io/pkg v0.0.0-20200922180714-670b76a68558 h1:ATDshla3gX4b0X8oMs0rrFry9qJshrzTnFkBV42CcFk= istio.io/pkg v0.0.0-20200922180714-670b76a68558/go.mod h1:p6wktGBjkjL3spRSsyfOh0XkuKb8IuBX61rERHfmSbU= k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8=