Skip to content

Commit

Permalink
operator: bind provider-specific flags
Browse files Browse the repository at this point in the history
Provider specific options passed as command line flags are currently
ignore because the flags are not bound. Add the missing viper.BindPFlags
to fix this.

Fixes: #12870
Fixes: 053fc86 ("operator: Build 3 new slimmer binaries")
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  • Loading branch information
tklauser authored and aanm committed Aug 14, 2020
1 parent dfdeb69 commit ca2aece
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions operator/provider_aws_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package main

import (
operatorOption "github.com/cilium/cilium/operator/option"
"github.com/spf13/viper"

"github.com/cilium/cilium/pkg/option"
)
Expand All @@ -44,4 +45,6 @@ func init() {

flags.Bool(operatorOption.UpdateEC2AdapterLimitViaAPI, false, "Use the EC2 API to update the instance type to adapter limits")
option.BindEnv(operatorOption.UpdateEC2AdapterLimitViaAPI)

viper.BindPFlags(flags)
}
3 changes: 3 additions & 0 deletions operator/provider_azure_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package main

import (
operatorOption "github.com/cilium/cilium/operator/option"
"github.com/spf13/viper"

"github.com/cilium/cilium/pkg/option"
)
Expand All @@ -30,4 +31,6 @@ func init() {

flags.String(operatorOption.AzureResourceGroup, "", "Resource group to use for Azure IPAM")
option.BindEnvWithLegacyEnvFallback(operatorOption.AzureResourceGroup, "AZURE_RESOURCE_GROUP")

viper.BindPFlags(flags)
}

0 comments on commit ca2aece

Please sign in to comment.