Commit 38d1c2a
committed
Give the AKS Kubernetes resources a real dependency on the namespace
The cluster role binding, ECR pull secret, DaemonSet and load-generator Job all
named the namespace with the local string, which gives terraform no dependency
edge. All four were therefore launched in the same parallel batch as
kubernetes_namespace.cwagent instead of after it, and whichever lost the race
against the namespace create failed with "namespaces not found".
Run 30580467483 lost it on the secret: the namespace took 437ms to create while
the secret started 3ms behind it. The preceding run took 150ms for the same call
and the secret landed just after the namespace existed, which is why this had
passed until now. The service account was already immune because it referenced
the namespace resource rather than the string.
All four now reference kubernetes_namespace.cwagent.metadata[0].name, matching
the service account, so terraform orders them after the namespace.1 parent 0ad57db commit 38d1c2a
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| |||
0 commit comments