Skip to content

Commit

Permalink
typed SWIFTV2Mode
Browse files Browse the repository at this point in the history
  • Loading branch information
nddq committed Jan 18, 2024
1 parent 595d006 commit 28434b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cns/configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type CNSConfig struct {
EnablePprof bool
EnableSubnetScarcity bool
EnableSwiftV2 bool
SWIFTV2Mode string
SWIFTV2Mode SWIFTV2Mode
InitializeFromCNI bool
ManagedSettings ManagedSettings
MetricsBindAddress string
Expand Down
2 changes: 1 addition & 1 deletion cns/service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,7 @@ func InitializeCRDState(ctx context.Context, httpRestService cns.HTTPService, cn
// if SWIFT v2 is enabled on CNS, attach multitenant middleware to rest service
// switch here for different type of swift v2 middleware (k8s or SF)
var swiftV2Middleware cns.IPConfigsHandlerMiddleware
switch configuration.SWIFTV2Mode(cnsconfig.SWIFTV2Mode) {
switch cnsconfig.SWIFTV2Mode {
case configuration.K8sSWIFTV2:
swiftV2Middleware = &middlewares.K8sSWIFTv2Middleware{Cli: manager.GetClient()}
case configuration.SFSWIFTV2:
Expand Down

0 comments on commit 28434b4

Please sign in to comment.