Commit a57cdf9
fix(crossplane): stop NATGateway late-initializing vpcId (zonal create failure) (#718)
* fix(crossplane): stop NATGateway late-initializing vpcId
The PlatformCluster Composition never sets spec.forProvider.vpcId on the
NATGateway, but the Upbound AWS EC2 provider late-initializes it from the
observed resource. availabilityMode defaults to "zonal", for which the EC2
API rejects VpcId on create:
MissingParameter: VpcId is not supported for a NAT gateway with
availability mode zonal
This stays dormant while the NAT exists (observe-only), but any (re)create
- e.g. after an out-of-band NAT deletion - fails, which breaks the private
subnet default route, blocks provider image pulls, and cascades into ArgoCD
cluster-cache sync errors.
Excluding LateInitialize from managementPolicies prevents the provider from
copying vpcId into the spec, so (re)create uses subnetId only and succeeds.
* fix(bootstrap): replace {{- if }} blocks with dig (directory-mode compatible) + open addon enablement via GitLab overlay
CRITICAL: the PR #628 cherry-pick added Go-template {{- if }} control
blocks to addons.yaml. gitops/bootstrap is applied in ArgoCD directory
mode (raw YAML), so {{- if }} broke YAML parsing — bootstrap app errored:
'Failed to unmarshal addons.yaml: line 28 could not find expected':''.
Fix: use sprig 'dig' (missingkey-safe) for optional overlay_repo_* annotations
instead of {{- if }} structural control flow. Overlay source is now always
present, defaulting to the addons/fleet repo when overlay_repo_url is absent
(idempotent no-op). Valid YAML, backward-compatible, missingkey-safe.
Also opens addon enablement to tenants: fleet-secret appsets (hub + spokes)
now merge $overlay enabled-addons.yaml/addon-overrides.yaml from GitLab
fleet-config on top of the GitHub defaults.
---------
Co-authored-by: Workshop User <workshopuser@example.com>1 parent 7903dc2 commit a57cdf9
4 files changed
Lines changed: 27 additions & 11 deletions
File tree
- gitops
- abstractions/crossplane/platform-cluster/templates
- bootstrap
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
277 | 287 | | |
278 | 288 | | |
279 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
30 | 29 | | |
31 | | - | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
| |||
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 47 | + | |
| 48 | + | |
53 | 49 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| 65 | + | |
| 66 | + | |
62 | 67 | | |
63 | 68 | | |
64 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
0 commit comments