Skip to content

Commit e5b7627

Browse files
committed
fix mode
1 parent 43a46c2 commit e5b7627

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

internal/manager/run.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ func Run(ctx context.Context, logger logr.Logger) error {
153153
SyncTimeout: config.ControllerConfig.ExecADCTimeout.Duration,
154154
SyncPeriod: config.ControllerConfig.ProviderConfig.SyncPeriod.Duration,
155155
InitSyncDelay: config.ControllerConfig.ProviderConfig.InitSyncDelay.Duration,
156+
BackendMode: string(config.ControllerConfig.ProviderConfig.Type),
156157
})
157158
if err != nil {
158159
setupLog.Error(err, "unable to create provider")

internal/provider/adc/executor.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ import (
2222
"sync"
2323
"time"
2424

25-
adctypes "github.com/apache/apisix-ingress-controller/api/adc"
2625
"github.com/api7/gopkg/pkg/log"
2726
"go.uber.org/zap"
27+
28+
adctypes "github.com/apache/apisix-ingress-controller/api/adc"
2829
)
2930

3031
type ADCExecutor interface {
@@ -56,7 +57,7 @@ func (e *DefaultADCExecutor) unlockExecute(ctx context.Context, mode string, con
5657
adcEnv := []string{
5758
"ADC_EXPERIMENTAL_FEATURE_FLAGS=remote-state-file,parallel-backend-request",
5859
"ADC_RUNNING_MODE=ingress",
59-
"ADC_BACKEND=" + string(mode),
60+
"ADC_BACKEND=" + mode,
6061
"ADC_SERVER=" + serverAddr,
6162
"ADC_TOKEN=" + token,
6263
}

internal/provider/adc/status.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ package adc
1515
import (
1616
"fmt"
1717

18-
v1alpha1 "github.com/apache/apisix-ingress-controller/api/v1alpha1"
19-
"github.com/apache/apisix-ingress-controller/internal/controller/status"
20-
types "github.com/apache/apisix-ingress-controller/internal/types"
2118
networkingv1 "k8s.io/api/networking/v1"
2219
k8stypes "k8s.io/apimachinery/pkg/types"
2320
"sigs.k8s.io/controller-runtime/pkg/client"
2421
gatewayv1 "sigs.k8s.io/gateway-api/apis/v1"
22+
23+
v1alpha1 "github.com/apache/apisix-ingress-controller/api/v1alpha1"
24+
"github.com/apache/apisix-ingress-controller/internal/controller/status"
25+
types "github.com/apache/apisix-ingress-controller/internal/types"
2526
)
2627

2728
type Statuses struct {

0 commit comments

Comments
 (0)