Skip to content

Conversation

@AlinsRan
Copy link
Contributor

@AlinsRan AlinsRan commented Nov 6, 2025

Type of change:

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches
  • Documentation
  • Refactor
  • Chore
  • CI/CD or Tests

What this PR does / why we need it:

By default, static configuration will prevail, and the deployment mode of the data plane can be dynamically specified.
mode: apisix or mode: apisix-standalone

apiVersion: apisix.apache.org/v1alpha1
kind: GatewayProxy
metadata:
  name: apisix-proxy-config
spec:
  provider:
    type: ControlPlane
    controlPlane:
      mode: apisix # apisix-standalone
      service:
        name: hello
        port: 9180
      auth:
        type: AdminKey
        adminKey:
          value: "%s"

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@AlinsRan AlinsRan marked this pull request as ready for review November 7, 2025 01:01
@AlinsRan AlinsRan requested review from bzp2010 and ronething November 7, 2025 09:15
api/adc/types.go Outdated
ServerAddrs []string
Token string
TlsVerify bool
BakcnedType string
Copy link
Contributor

Choose a reason for hiding this comment

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

typo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

@AlinsRan AlinsRan requested a review from Copilot November 10, 2025 00:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for multi-mode APISIX deployments by introducing a mode field to the GatewayProxy CRD. This allows individual gateway proxies to specify whether they use apisix (with etcd) or apisix-standalone (with yaml configuration) mode, independent of the global provider type setting.

Key changes:

  • Added mode field to ControlPlaneProvider in the GatewayProxy API and CRD
  • Refactored provider options to use "Default" prefix to distinguish between default and per-gateway settings
  • Added BakcnedType field to Config struct to carry mode information per gateway
  • Created test case for multi-mode deployment scenarios

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
api/v1alpha1/gatewayproxy_types.go Added Mode field to ControlPlaneProvider struct with immutability validation
api/adc/types.go Added BakcnedType field to Config struct to store backend mode
config/crd/bases/apisix.apache.org_gatewayproxies.yaml Updated CRD with mode field definition and immutability validation
internal/adc/translator/gatewayproxy.go Updated to populate BakcnedType from gateway proxy mode and resolve endpoints based on mode
internal/adc/client/executor.go Removed mode parameter from methods, now using config.BakcnedType
internal/adc/client/client.go Refactored to use per-config backend type with default fallback
internal/provider/options.go Renamed fields to use "Default" prefix (DefaultBackendMode, DefaultResolveEndpoints)
internal/provider/apisix/provider.go Updated to use renamed provider options fields
internal/provider/init/init.go Updated to use renamed provider option functions
internal/manager/run.go Removed BackendMode assignment from provider options initialization
test/e2e/scaffold/deployer.go Added CreateAdditionalGatewayWithOptions method with ProviderType option
test/e2e/scaffold/apisix_deployer.go Implemented CreateAdditionalGatewayWithOptions and updated config provider logic
test/e2e/framework/apisix_consts.go Added constants for config provider types (Yaml, Etcd)
test/e2e/apisix/mode.go New test file for multi-mode deployment scenarios
docs/en/latest/reference/api-reference.md Added documentation for the new mode field

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AlinsRan AlinsRan requested a review from Copilot November 10, 2025 00:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AlinsRan AlinsRan requested a review from Copilot November 10, 2025 00:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants