istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/config/analysis/analyzers/testdata/injection-with-mismatched-sidecar.yaml (about) 1 # Namespace 'enabled-namespace' has istio injection enabled, so will be enforced. 2 apiVersion: v1 3 kind: Namespace 4 metadata: 5 labels: 6 istio-injection: enabled 7 name: enabled-namespace 8 --- 9 # Details-v1-pod-old is out of date and should get a warning. 10 apiVersion: v1 11 kind: Pod 12 metadata: 13 labels: 14 app: details 15 name: details-v1-pod-old 16 namespace: enabled-namespace 17 spec: 18 containers: 19 - image: docker.io/istio/examples-bookinfo-details-v1:1.15.0 20 name: details 21 - image: docker.io/istio/proxyv2:1.3.0 22 name: istio-proxy 23 --- 24 # Namespace 'enabled-namespace' has istio injection enabled, so will be enforced. 25 apiVersion: v1 26 kind: Namespace 27 metadata: 28 labels: 29 istio-injection: enabled 30 name: enabled-namespace-native 31 --- 32 # Details-v1-pod-old-native is out of date and should get a warning. 33 apiVersion: v1 34 kind: Pod 35 metadata: 36 labels: 37 app: details 38 name: details-v1-pod-old-native 39 namespace: enabled-namespace-native 40 spec: 41 containers: 42 - image: docker.io/istio/examples-bookinfo-details-v1:1.15.0 43 name: details 44 initContainers: 45 - image: docker.io/istio/proxyv2:1.3.0 46 name: istio-proxy 47 --- 48 # Details-v1-pod-new is up to date, and should be ignored. 49 apiVersion: v1 50 kind: Pod 51 metadata: 52 labels: 53 app: details 54 name: details-v1-pod-new 55 namespace: enabled-namespace 56 spec: 57 containers: 58 - image: docker.io/istio/examples-bookinfo-details-v1:1.15.0 59 name: details 60 - image: docker.io/istio/proxyv2:1.3.1 61 name: istio-proxy 62 --- 63 # Details-v1-pod-new-native is up to date, and should be ignored. 64 apiVersion: v1 65 kind: Pod 66 metadata: 67 labels: 68 app: details 69 name: details-v1-pod-new-native 70 namespace: enabled-namespace 71 spec: 72 containers: 73 - image: docker.io/istio/examples-bookinfo-details-v1:1.15.0 74 name: details 75 initContainers: 76 - image: docker.io/istio/proxyv2:1.3.1 77 name: istio-proxy 78 --- 79 # should not match the injector version. 80 apiVersion: v1 81 kind: Pod 82 metadata: 83 labels: 84 app: details 85 name: details-v1-pod-old-pre 86 namespace: enabled-namespace 87 spec: 88 containers: 89 - image: docker.io/istio/examples-bookinfo-details-v1:1.15.0 90 name: details 91 - image: docker.io/istio/proxyv2:1.3.0-prerelease 92 name: istio-proxy 93 --- 94 # should not match the injector version. 95 apiVersion: v1 96 kind: Pod 97 metadata: 98 labels: 99 app: details 100 name: details-v1-pod-old-pre-2 101 namespace: enabled-namespace 102 spec: 103 containers: 104 - image: docker.io/istio/examples-bookinfo-details-v1:1.15.0 105 name: details 106 - image: docker.io/istio/proxyv2:1.3.0-prerelease 107 name: istio-proxy 108 --- 109 # should not match the injector version. 110 apiVersion: v1 111 kind: Pod 112 metadata: 113 labels: 114 app: details 115 name: details-v1-pod-old-pre-3 116 namespace: enabled-namespace 117 spec: 118 containers: 119 - image: docker.io/istio/examples-bookinfo-details-v1:1.15.0 120 name: details 121 - image: docker.io/istio/proxyv2:1.3.0-prerelease 122 name: istio-proxy 123 --- 124 # details-v1-pod-overwritten-sidecar has a custom sidecar version injected and 125 # therefore should not match the injector version. 126 apiVersion: v1 127 kind: Pod 128 metadata: 129 labels: 130 app: details 131 annotations: 132 sidecar.istio.io/proxyImage: docker.io/istio/proxyv2:1.3.0-prerelease 133 name: details-v1-pod-overwritten-sidecar 134 namespace: enabled-namespace 135 spec: 136 containers: 137 - image: docker.io/istio/examples-bookinfo-details-v2:1.15.0 138 name: details 139 - image: docker.io/istio/proxyv2:1.3.0-prerelease 140 name: istio-proxy 141 --- 142 # Namespace 'default' does not have an explicit label, so no version checking should happen. 143 apiVersion: v1 144 kind: Namespace 145 metadata: 146 name: default 147 --- 148 # Details-v2-pod-old is out of date, but since istio-injection is not enabled on the namespace, 149 # no warning occurs. 150 apiVersion: v1 151 kind: Pod 152 metadata: 153 labels: 154 app: details 155 name: details-v2-pod-old 156 namespace: default 157 spec: 158 containers: 159 - image: docker.io/istio/examples-bookinfo-details-v2:1.15.0 160 name: details 161 - image: docker.io/istio/proxyv2:1.3.0 162 name: istio-proxy 163 --- 164 # Namespace 'revision-namespace' has istio injection enabled and label istio.io/rev=canary, so will be enforced. 165 apiVersion: v1 166 kind: Namespace 167 metadata: 168 labels: 169 istio.io/rev: canary 170 name: revision-namespace 171 --- 172 # Revision-details-v1-pod-old is out of date and should get a warning. 173 apiVersion: v1 174 kind: Pod 175 metadata: 176 labels: 177 app: details 178 name: revision-details-v1-pod-old 179 namespace: revision-namespace 180 spec: 181 containers: 182 - image: docker.io/istio/examples-bookinfo-details-v1:1.15.0 183 name: details 184 - image: docker.io/istio/proxyv2:1.3.0 185 name: istio-proxy 186 --- 187 # Revision-details-v1-pod-new is up to date, and should be ignored. 188 apiVersion: v1 189 kind: Pod 190 metadata: 191 labels: 192 app: details 193 name: revision-details-v1-pod-new 194 namespace: revision-namespace 195 spec: 196 containers: 197 - image: docker.io/istio/examples-bookinfo-details-v1:1.15.0 198 name: details 199 - image: docker.io/istio/proxyv2:1.3.1 200 name: istio-proxy 201 --- 202 # revision-details-v1-pod-overwritten-sidecar has a custom sidecar version injected and 203 # therefore should not match the injector version. 204 apiVersion: v1 205 kind: Pod 206 metadata: 207 labels: 208 app: details 209 annotations: 210 sidecar.istio.io/proxyImage: docker.io/istio/proxyv2:1.3.0-prerelease 211 name: revision-details-v1-pod-overwritten-sidecar 212 namespace: revision-namespace 213 spec: 214 containers: 215 - image: docker.io/istio/examples-bookinfo-details-v2:1.15.0 216 name: details 217 - image: docker.io/istio/proxyv2:1.3.0-prerelease 218 name: istio-proxy 219 ---