Skip to content

feat(clusters): add GCP static egress configuration for NAT gateway#2690

Merged
pggb25 merged 3 commits into
stagingfrom
feat/gcp-nat-gw
May 27, 2026
Merged

feat(clusters): add GCP static egress configuration for NAT gateway#2690
pggb25 merged 3 commits into
stagingfrom
feat/gcp-nat-gw

Conversation

@pggb25

@pggb25 pggb25 commented May 18, 2026

Copy link
Copy Markdown
Collaborator

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

Screenshot 2026-05-19 at 11 37 53

Screenshots / Recordings

Testing

  • Changes tested locally in the relevant Console's pages and Storybooks
  • yarn test or yarn test -u (if you need to regenerate snapshots)
  • yarn format
  • yarn lint

PR Checklist

  • I followed naming, styling, and TypeScript rules (see .cursor/rules)
  • I performed a self-review (diff inspected, dead code removed)
  • I titled the PR using Conventional Commits with a scope when possible (e.g. feat(service): add new Terraform service) - required for semantic-release
  • I only kept necessary comments, written in English (watch for useless AI comments)
  • I involved a designer to validate UI changes if I am not a designer
  • I covered new business logic with tests (unit)
  • I confirmed CI is green (Codecov red can be accepted)
  • I reviewed and executed locally any AI-assisted code

@pggb25 pggb25 force-pushed the feat/gcp-nat-gw branch 3 times, most recently from df5e32c to 9639164 Compare May 18, 2026 13:17
@codecov

codecov Bot commented May 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.85030% with 42 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.58%. Comparing base (cb74feb) to head (73d3312).

Files with missing lines Patch % Lines
...rs/feature/src/lib/gcp-static-ip/gcp-static-ip.tsx 70.96% 10 Missing and 8 partials ⚠️
...ster-network-settings/cluster-network-settings.tsx 77.35% 4 Missing and 8 partials ⚠️
...luster-creation-flow/step-summary/step-summary.tsx 53.84% 2 Missing and 4 partials ⚠️
...ster-creation-flow/step-features/step-features.tsx 70.00% 1 Missing and 2 partials ⚠️
.../src/lib/scaleway-static-ip/scaleway-static-ip.tsx 71.42% 0 Missing and 2 partials ⚠️
.../lib/cluster-card-feature/cluster-card-feature.tsx 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #2690      +/-   ##
===========================================
+ Coverage    45.49%   45.58%   +0.08%     
===========================================
  Files         1162     1141      -21     
  Lines        24356    24102     -254     
  Branches      7130     7116      -14     
===========================================
- Hits         11081    10987      -94     
+ Misses       11347    11172     -175     
- Partials      1928     1943      +15     
Flag Coverage Δ
unittests 45.58% <74.85%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pggb25 pggb25 force-pushed the feat/gcp-nat-gw branch 11 times, most recently from a381118 to 2d42275 Compare May 19, 2026 07:58
@pggb25 pggb25 marked this pull request as ready for review May 19, 2026 09:39
@rmnbrd rmnbrd requested review from Copilot and rmnbrd May 20, 2026 05:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_type payload format.
  • Updates cluster network settings to read/write GCP/Scaleway NAT gateway feature shapes (including legacy Scaleway shapes) and handle missing GCP NAT_GATEWAY feature on older clusters.
  • Bumps qovery-typescript-axios (and axios) 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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +267 to +272
NAT_GATEWAY: {
id: 'NAT_GATEWAY',
title: 'NAT Gateway',
value: true,
extendedValue: 'sbn',
},

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@pggb25 pggb25 force-pushed the feat/gcp-nat-gw branch from bbf0e9b to 73d3312 Compare May 27, 2026 11:33
@pggb25 pggb25 force-pushed the feat/gcp-nat-gw branch from 73d3312 to 32ad58f Compare May 27, 2026 12:02
@pggb25 pggb25 merged commit e40f257 into staging May 27, 2026
11 checks passed
@pggb25 pggb25 deleted the feat/gcp-nat-gw branch May 27, 2026 12:13
@RemiBonnet

Copy link
Copy Markdown
Member

🎉 This PR is included in version 1.309.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants