Commit 2b99a7f
authored
Update Istio configuration to use CNI node agents instead of
# Summary
We are using `Istio` as a service mesh provider for our Multi Cluster
tests. The way it works by default is `Istio` adds privileged
`init-istio` container to every Pod that configures network accordingly.
>By default Istio injects an init container, istio-init, in pods
deployed in the mesh. The istio-init container sets up the pod network
traffic redirection to/from the Istio sidecar proxy. This requires the
user or service-account deploying pods to the mesh to have sufficient
Kubernetes RBAC permissions to deploy [containers with the NET_ADMIN and
NET_RAW
capabilities](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-capabilities-for-a-container).
While this works fine it is not meeting the
[PSS](https://v1-32.docs.kubernetes.io/docs/concepts/security/pod-security-standards/)
restricted level, thus making it less secure. Related
[HELP-81729](https://jira.mongodb.org/browse/HELP-81729) and
#473 that enables
`restricted` level in `warn` mode. Additionally we provide Istio sidecar
configuration as an example in our code snippets thus not following the
best practice.
There is another way to configure Istio mesh that does not require
`istio-init` init-container - using [Istio CNI node
agent](https://istio.io/latest/docs/setup/additional-setup/cni/#using-the-istio-cni-node-agent).
This PR configures our e2e tests and code snippets that way. Great blog
entry about difference between `istio-init` and Istio CNI node agent
architecture ->
https://www.solo.io/blog/traffic-ambient-mesh-istio-cni-node-configuration.
With `istio-init`:
<img width="810" height="820" alt="image"
src="https://github.com/user-attachments/assets/026350af-3b51-4fe9-9cb8-c8911e661eca"
/>
With `Istio CNI node agent`:
<img width="942" height="1084" alt="image"
src="https://github.com/user-attachments/assets/37733169-7737-4063-90a0-de3d116402a9"
/>
istio-init containers (#474)1 parent fd4450b commit 2b99a7f
File tree
9 files changed
+81
-199
lines changed- docker/mongodb-kubernetes-tests/tests/opsmanager
- fixtures
- remote_fixtures
- multi_cluster/tools
- public
- architectures/setup-multi-cluster/ra-03-setup-istio
- samples/ops-manager
- scripts/release/kubectl-mongodb
9 files changed
+81
-199
lines changedLines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| |||
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| 66 | + | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
| |||
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
| 79 | + | |
| 80 | + | |
73 | 81 | | |
74 | 82 | | |
75 | 83 | | |
| |||
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
| 92 | + | |
| 93 | + | |
84 | 94 | | |
85 | 95 | | |
86 | 96 | | |
| |||
92 | 102 | | |
93 | 103 | | |
94 | 104 | | |
| 105 | + | |
| 106 | + | |
95 | 107 | | |
96 | 108 | | |
97 | 109 | | |
| |||
103 | 115 | | |
104 | 116 | | |
105 | 117 | | |
| 118 | + | |
| 119 | + | |
106 | 120 | | |
107 | 121 | | |
108 | 122 | | |
| |||
112 | 126 | | |
113 | 127 | | |
114 | 128 | | |
115 | | - | |
116 | 129 | | |
117 | 130 | | |
| 131 | + | |
| 132 | + | |
118 | 133 | | |
119 | 134 | | |
120 | 135 | | |
| |||
126 | 141 | | |
127 | 142 | | |
128 | 143 | | |
| 144 | + | |
| 145 | + | |
129 | 146 | | |
130 | 147 | | |
131 | 148 | | |
| |||
137 | 154 | | |
138 | 155 | | |
139 | 156 | | |
| 157 | + | |
| 158 | + | |
140 | 159 | | |
141 | 160 | | |
142 | 161 | | |
| |||
148 | 167 | | |
149 | 168 | | |
150 | 169 | | |
| 170 | + | |
| 171 | + | |
151 | 172 | | |
152 | 173 | | |
153 | 174 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| 64 | + | |
| 65 | + | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
| |||
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
| 77 | + | |
| 78 | + | |
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
| |||
Lines changed: 25 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| 54 | + | |
| 55 | + | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
| |||
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
| 65 | + | |
| 66 | + | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
| |||
65 | 73 | | |
66 | 74 | | |
67 | 75 | | |
| 76 | + | |
| 77 | + | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
| |||
74 | 84 | | |
75 | 85 | | |
76 | 86 | | |
| 87 | + | |
| 88 | + | |
77 | 89 | | |
78 | 90 | | |
79 | 91 | | |
| |||
83 | 95 | | |
84 | 96 | | |
85 | 97 | | |
| 98 | + | |
| 99 | + | |
86 | 100 | | |
87 | 101 | | |
88 | 102 | | |
| |||
92 | 106 | | |
93 | 107 | | |
94 | 108 | | |
| 109 | + | |
| 110 | + | |
95 | 111 | | |
96 | 112 | | |
97 | 113 | | |
| |||
101 | 117 | | |
102 | 118 | | |
103 | 119 | | |
| 120 | + | |
| 121 | + | |
104 | 122 | | |
105 | 123 | | |
106 | 124 | | |
| |||
110 | 128 | | |
111 | 129 | | |
112 | 130 | | |
| 131 | + | |
| 132 | + | |
113 | 133 | | |
114 | 134 | | |
115 | 135 | | |
| |||
119 | 139 | | |
120 | 140 | | |
121 | 141 | | |
| 142 | + | |
| 143 | + | |
122 | 144 | | |
123 | 145 | | |
124 | 146 | | |
125 | 147 | | |
126 | 148 | | |
127 | 149 | | |
128 | 150 | | |
129 | | - | |
130 | 151 | | |
131 | | - | |
| 152 | + | |
132 | 153 | | |
133 | 154 | | |
134 | 155 | | |
135 | | - | |
| 156 | + | |
136 | 157 | | |
137 | | - | |
| 158 | + | |
138 | 159 | | |
139 | 160 | | |
140 | 161 | | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| |||
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
70 | 77 | | |
71 | 78 | | |
72 | 79 | | |
| |||
81 | 88 | | |
82 | 89 | | |
83 | 90 | | |
84 | | - | |
| 91 | + | |
85 | 92 | | |
86 | 93 | | |
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
90 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
91 | 102 | | |
92 | 103 | | |
93 | 104 | | |
| |||
102 | 113 | | |
103 | 114 | | |
104 | 115 | | |
105 | | - | |
| 116 | + | |
106 | 117 | | |
107 | 118 | | |
108 | 119 | | |
109 | 120 | | |
110 | 121 | | |
111 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
112 | 127 | | |
113 | 128 | | |
114 | 129 | | |
| |||
123 | 138 | | |
124 | 139 | | |
125 | 140 | | |
126 | | - | |
| 141 | + | |
127 | 142 | | |
128 | 143 | | |
129 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
| |||
0 commit comments