Skip to content

Commit

Permalink
Merge pull request #3962 from johngmyers/remove-testing
Browse files Browse the repository at this point in the history
Remove the --run-aws-provider-as-webhook flag
  • Loading branch information
k8s-ci-robot committed Oct 9, 2023
2 parents a429215 + 627f9b1 commit 0725104
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
22 changes: 1 addition & 21 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func main() {
zoneTagFilter := provider.NewZoneTagFilter(cfg.AWSZoneTagFilter)

var awsSession *session.Session
if cfg.Provider == "aws" || cfg.Provider == "aws-sd" || cfg.Registry == "dynamodb" || cfg.RunAWSProviderAsWebhook {
if cfg.Provider == "aws" || cfg.Provider == "aws-sd" || cfg.Registry == "dynamodb" {
awsSession, err = aws.NewSession(
aws.AWSSessionConfig{
AssumeRole: cfg.AWSAssumeRole,
Expand Down Expand Up @@ -404,26 +404,6 @@ func main() {
case "tencentcloud":
p, err = tencentcloud.NewTencentCloudProvider(domainFilter, zoneIDFilter, cfg.TencentCloudConfigFile, cfg.TencentCloudZoneType, cfg.DryRun)
case "webhook":
startedChan := make(chan struct{})
if cfg.RunAWSProviderAsWebhook {
awsProvider, awsErr := aws.NewAWSProvider(aws.AWSConfig{
DomainFilter: domainFilter,
ZoneIDFilter: zoneIDFilter,
ZoneTypeFilter: zoneTypeFilter,
ZoneTagFilter: zoneTagFilter,
BatchChangeSize: cfg.AWSBatchChangeSize,
BatchChangeInterval: cfg.AWSBatchChangeInterval,
EvaluateTargetHealth: cfg.AWSEvaluateTargetHealth,
PreferCNAME: cfg.AWSPreferCNAME,
DryRun: cfg.DryRun,
ZoneCacheDuration: cfg.AWSZoneCacheDuration,
}, route53.New(awsSession))
if awsErr != nil {
log.Fatal(awsErr)
}
go webhook.StartHTTPApi(awsProvider, startedChan, cfg.WebhookProviderReadTimeout, cfg.WebhookProviderWriteTimeout, "127.0.0.1:8888")
<-startedChan
}
p, err = webhook.NewWebhookProvider(cfg.WebhookProviderURL)
default:
log.Fatalf("unknown dns provider: %s", cfg.Provider)
Expand Down
2 changes: 0 additions & 2 deletions pkg/apis/externaldns/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ type Config struct {
PluralCluster string
PluralProvider string
WebhookProviderURL string
RunAWSProviderAsWebhook bool
WebhookProviderReadTimeout time.Duration
WebhookProviderWriteTimeout time.Duration
WebhookServer bool
Expand Down Expand Up @@ -613,7 +612,6 @@ func (cfg *Config) ParseFlags(args []string) error {

// Webhook provider
app.Flag("webhook-provider-url", "[EXPERIMENTAL] The URL of the remote endpoint to call for the webhook provider (default: http://localhost:8888)").Default(defaultConfig.WebhookProviderURL).StringVar(&cfg.WebhookProviderURL)
app.Flag("run-aws-provider-as-webhook", "[EXPERIMENTAL] When enabled, the AWS provider will be run as a webhook (default: false). To be used together with 'webhook' as provider.").BoolVar(&cfg.RunAWSProviderAsWebhook)
app.Flag("webhook-provider-read-timeout", "[EXPERIMENTAL] The read timeout for the webhook provider in duration format (default: 5s)").Default(defaultConfig.WebhookProviderReadTimeout.String()).DurationVar(&cfg.WebhookProviderReadTimeout)
app.Flag("webhook-provider-write-timeout", "[EXPERIMENTAL] The write timeout for the webhook provider in duration format (default: 10s)").Default(defaultConfig.WebhookProviderWriteTimeout.String()).DurationVar(&cfg.WebhookProviderWriteTimeout)

Expand Down

0 comments on commit 0725104

Please sign in to comment.