feat(clusters): add GCP static egress configuration for NAT gateway#2690
feat(clusters): add GCP static egress configuration for NAT gateway#2690pggb25 wants to merge 4 commits into
Conversation
df5e32c to
9639164
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## staging #2690 +/- ##
===========================================
- Coverage 46.19% 45.59% -0.60%
===========================================
Files 1150 1155 +5
Lines 23966 24261 +295
Branches 6976 7092 +116
===========================================
- Hits 11070 11061 -9
- Misses 10952 11263 +311
+ Partials 1944 1937 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
79bdad7 to
a381118
Compare
There was a problem hiding this comment.
Pull request overview
Adds support in the Console cluster UX to configure GCP NAT Gateway static egress IPs (enable/disable + count), wiring the settings through both cluster creation flow and existing cluster network settings, alongside updated API client types.
Changes:
- Introduces GCP NAT gateway “static egress IPs” settings UI and serialization to
nat_gateway_typepayload format. - Updates cluster network settings to read/write GCP/Scaleway NAT gateway feature shapes (including legacy Scaleway shapes) and handle missing GCP
NAT_GATEWAYfeature on older clusters. - Bumps
qovery-typescript-axios(andaxios) to pick up the new NAT gateway types.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updates lockfile for axios + qovery API client bump. |
| package.json | Bumps axios and qovery-typescript-axios versions. |
| libs/shared/interfaces/src/lib/domain/cluster-creation-flow.interface.ts | Extends extendedValue typing to support object settings (GCP NAT static egress config). |
| libs/domains/clusters/feature/src/lib/utils/has-gpu-instance.ts | Minor refactor for readability when reading Karpenter feature value. |
| libs/domains/clusters/feature/src/lib/utils/get-gcp-nat-gateway-settings.ts | Adds helper to extract GCP NAT settings from feature response. |
| libs/domains/clusters/feature/src/lib/utils/get-gcp-nat-gateway-settings.spec.ts | Unit tests for the new GCP NAT settings extractor. |
| libs/domains/clusters/feature/src/lib/scaleway-static-ip/scaleway-static-ip.tsx | Layout tweak + makes NAT gateway select resilient to extendedValue no longer being string-only. |
| libs/domains/clusters/feature/src/lib/gcp-static-ip/gcp-static-ip.tsx | New GCP UI block to configure static egress IPs + count, writing to NAT_GATEWAY extendedValue. |
| libs/domains/clusters/feature/src/lib/gcp-static-ip/gcp-static-ip.spec.tsx | Component tests for GCP static egress UI behavior. |
| libs/domains/clusters/feature/src/lib/cluster-network-settings/cluster-network-settings.tsx | Adds GCP support to network settings page: parsing, fallback NAT feature, payload building, save CTA rules. |
| libs/domains/clusters/feature/src/lib/cluster-network-settings/cluster-network-settings.spec.tsx | Tests for SCW legacy shapes + GCP missing NAT feature handling and submit payload behavior. |
| libs/domains/clusters/feature/src/lib/cluster-creation-flow/step-summary/step-summary.tsx | Serializes GCP NAT_GATEWAY using nat_gateway_type format; aligns SCW NAT serialization typing. |
| libs/domains/clusters/feature/src/lib/cluster-creation-flow/step-summary/step-summary.spec.tsx | Adds tests for GCP NAT payload formatting and SCW NAT formatting. |
| libs/domains/clusters/feature/src/lib/cluster-creation-flow/step-summary/step-summary-presentation.tsx | Improves summary display formatting for object extendedValue (GCP settings). |
| libs/domains/clusters/feature/src/lib/cluster-creation-flow/step-features/step-features.tsx | Merges STATIC_IP + NAT_GATEWAY display into a single GCP block during creation. |
| libs/domains/clusters/feature/src/lib/cluster-creation-flow/step-features/step-features.spec.tsx | Updates creation-flow test to reflect merged GCP static IP/NAT UI. |
| libs/domains/clusters/feature/src/lib/cluster-card-feature/cluster-card-feature.tsx | Adjusts read-only toggle display for GCP NAT_GATEWAY using parsed settings. |
| libs/domains/clusters/feature/src/lib/cluster-card-feature/cluster-card-feature.spec.tsx | Adds tests for the updated GCP NAT_GATEWAY toggle display logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (feature.id === 'NAT_GATEWAY' && cloudProvider === 'GCP') { | ||
| const gcpNatGatewaySettings = getGcpNatGatewaySettings(feature) | ||
| if (gcpNatGatewaySettings) { | ||
| return gcpNatGatewaySettings.static_ips_enabled |
There was a problem hiding this comment.
this case is legacy-only (NAT_GATEWAY without STATIC_IP). In the normal flow we merge both into GcpStaticIp, where static_ips_enabled is already represented by the sub-toggle, so changing this fallback toggle to always true would be misleading.
| NAT_GATEWAY: { | ||
| id: 'NAT_GATEWAY', | ||
| title: 'NAT Gateway', | ||
| value: true, | ||
| extendedValue: 'sbn', | ||
| }, |
Summary
https://qovery.atlassian.net/browse/QOV-1901
for GCP add new option to configure nat gateway
https://p80-z1d5ada7b-zbfc30c89-gtw.zc531a994.rustrocks.cloud/organization/21bd04fb-7b93-45c5-9957-4325d833a05a/cluster/47e795a1-ffc9-4db3-929c-70d8fabe12fa/settings/network
Screenshots / Recordings
Testing
yarn testoryarn test -u(if you need to regenerate snapshots)yarn formatyarn lintPR Checklist
.cursor/rules)feat(service): add new Terraform service) - required for semantic-release