Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(proxy) give manager leader control over start #2053

Merged
merged 6 commits into from
Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ the `configuration.konghq.com` API group.

#### Breaking changes

- The `--leader-elect` flag has been deprectated and will be removed in a
future release. Leader election is now enabled or disabled automatically
based on the database mode. The flag is no longer honored.
[#2053](https://github.com/Kong/kubernetes-ingress-controller/issues/2053)
- You must upgrade to 2.0.x before upgrading to 2.1.x to properly handle the
transition from apiextensions.k8s.io/v1beta1 CRDs to apiextensions.k8s.io/v1
CRDSs. CRDs are now generated from their underlying Go structures to avoid
Expand All @@ -77,6 +81,10 @@ the `configuration.konghq.com` API group.
[#1945](https://github.com/Kong/kubernetes-ingress-controller/issues/1945)
- Anonymous reports now use TLS instead of UDP.
[#2089](https://github.com/Kong/kubernetes-ingress-controller/pull/2089)
- The new `--election-namespace` flag sets the leader election namespace. This
is normally only used if a controller is running outside a Kubernetes
cluster.
[#2053](https://github.com/Kong/kubernetes-ingress-controller/issues/2053)

[k8s-fg]:https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
[kic-fg]:https://github.com/Kong/kubernetes-ingress-controller/blob/main/FEATURE_GATES.md
Expand All @@ -96,6 +104,10 @@ the `configuration.konghq.com` API group.
- Fixed a race condition where multiple actors may simultaneously attempt to
create the configured Enterprise workspaces.
[#2070](https://github.com/Kong/kubernetes-ingress-controller/pull/2070)
- Fixed incorrect leader election behavior. Previously, non-leader instances
would still attempt to update Kong configuration, but would not scan for
Kubernetes resources to translate into Kong configuration.
[#2053](https://github.com/Kong/kubernetes-ingress-controller/issues/2053)

## [2.0.6]

Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ require (
github.com/tidwall/gjson v1.12.1
google.golang.org/api v0.63.0
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa
k8s.io/api v0.22.4
k8s.io/api v0.23.0-alpha.1
k8s.io/apiextensions-apiserver v0.22.4
k8s.io/apimachinery v0.22.4
k8s.io/client-go v0.22.4
k8s.io/apimachinery v0.23.0-alpha.1
k8s.io/client-go v0.23.0-alpha.1
k8s.io/component-base v0.22.4
knative.dev/networking v0.0.0-20211209101835-8ef631418fc0
knative.dev/pkg v0.0.0-20211206113427-18589ac7627e
Expand Down Expand Up @@ -63,7 +63,7 @@ require (
github.com/docker/go-units v0.4.0 // indirect
github.com/envoyproxy/go-control-plane v0.10.1 // indirect
github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
Expand Down Expand Up @@ -129,7 +129,7 @@ require (
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20211210111614-af8b64212486 // indirect
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
Expand All @@ -141,6 +141,6 @@ require (
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/klog/v2 v2.10.0 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/utils v0.0.0-20210820185131-d34e5cb4466e // indirect
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
)
20 changes: 13 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,9 @@ github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMi
github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs=
github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84=
github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww=
github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4=
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4=
Expand Down Expand Up @@ -1709,8 +1710,9 @@ golang.org/x/sys v0.0.0-20211210111614-af8b64212486 h1:5hpz5aRr+W1erYCL5JRhSUBJR
golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE=
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down Expand Up @@ -2063,10 +2065,10 @@ k8s.io/api v0.21.4/go.mod h1:fTVGP+M4D8+00FN2cMnJqk/eb/GH53bvmNs2SVTmpFk=
k8s.io/api v0.22.0/go.mod h1:0AoXXqst47OI/L0oGKq9DG61dvGRPXs7X4/B7KyjBCU=
k8s.io/api v0.22.1/go.mod h1:bh13rkTp3F1XEaLGykbyRD2QaTTzPm0e/BMd8ptFONY=
k8s.io/api v0.22.2/go.mod h1:y3ydYpLJAaDI+BbSe2xmGcqxiWHmWjkEeIbiwHvnPR8=
k8s.io/api v0.22.4 h1:UvyHW0ezB2oIgHAxlYoo6UJQObYXU7awuNarwoHEOjw=
k8s.io/api v0.22.4 h1:UvyHW0ezB2oIgHAxlYoo6UJQObYXU7awuNarwoHEOjw=
k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk=
k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk=
k8s.io/api v0.23.0-alpha.1 h1:/KwUo3BFn9oiKrr9GwZrlWCuOeVrpgNkNru2TKf6ZD0=
k8s.io/api v0.23.0-alpha.1/go.mod h1:D2hhpXWO65HL+kPKXJaEC6CRCGRS6/0fwxH/FKWtSeo=
k8s.io/apiextensions-apiserver v0.18.0/go.mod h1:18Cwn1Xws4xnWQNC00FLq1E350b9lUF+aOdIWDOZxgo=
k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk=
k8s.io/apiextensions-apiserver v0.20.2/go.mod h1:F6TXp389Xntt+LUq3vw6HFOLttPa0V8821ogLGwb6Zs=
Expand All @@ -2090,8 +2092,9 @@ k8s.io/apimachinery v0.21.4/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCF
k8s.io/apimachinery v0.22.0/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0=
k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0=
k8s.io/apimachinery v0.22.2/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0=
k8s.io/apimachinery v0.22.4 h1:9uwcvPpukBw/Ri0EUmWz+49cnFtaoiyEhQTK+xOe7Ck=
k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0=
k8s.io/apimachinery v0.23.0-alpha.1 h1:kzpT2SYnZTXb8S6BN2g897cZvhvfOJND0PntcSYS6cs=
k8s.io/apimachinery v0.23.0-alpha.1/go.mod h1:rm7GDMZSKVlauLBWTPBAhG0qULDXZtGEoit5cRQd/+Y=
k8s.io/apiserver v0.18.0/go.mod h1:3S2O6FeBBd6XTo0njUrLxiqk8GNy6wWOftjhJcXYnjw=
k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU=
k8s.io/apiserver v0.20.2/go.mod h1:2nKd93WyMhZx4Hp3RfgH2K5PhwyTrprrkWYnI7id7jA=
Expand All @@ -2117,8 +2120,9 @@ k8s.io/client-go v0.21.4/go.mod h1:t0/eMKyUAq/DoQ7vW8NVVA00/nomlwC+eInsS8PxSew=
k8s.io/client-go v0.22.0/go.mod h1:GUjIuXR5PiEv/RVK5OODUsm6eZk7wtSWZSaSJbpFdGg=
k8s.io/client-go v0.22.1/go.mod h1:BquC5A4UOo4qVDUtoc04/+Nxp1MeHcVc1HJm1KmG8kk=
k8s.io/client-go v0.22.2/go.mod h1:sAlhrkVDf50ZHx6z4K0S40wISNTarf1r800F+RlCF6U=
k8s.io/client-go v0.22.4 h1:aAQ1Wk+I3bjCNk35YWUqbaueqrIonkfDPJSPDDe8Kfg=
k8s.io/client-go v0.22.4/go.mod h1:Yzw4e5e7h1LNHA4uqnMVrpEpUs1hJOiuBsJKIlRCHDA=
k8s.io/client-go v0.23.0-alpha.1 h1:lR1ya4Q4HayIsUZ73OJu8/Lx0694uDq5cgbIz5aw9xo=
k8s.io/client-go v0.23.0-alpha.1/go.mod h1:FO+Av6plqI2Q5pZsFhNjpywJ2Ukh84l9JHQFkDi1NAQ=
k8s.io/cloud-provider v0.21.0/go.mod h1:z17TQgu3JgUFjcgby8sj5X86YdVK5Pbt+jm/eYMZU9M=
k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc=
k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg=
Expand Down Expand Up @@ -2177,6 +2181,7 @@ k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAG
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE=
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
k8s.io/kube-openapi v0.0.0-20210527164424-3c818078ee3d/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
k8s.io/kube-openapi v0.0.0-20210817084001-7fbd8d59e5b8/go.mod h1:foAE7XkrXQ1Qo2eWsW/iWksptrVdbl6t+vscSdmmGjk=
k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4=
Expand All @@ -2193,8 +2198,9 @@ k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210820185131-d34e5cb4466e h1:ldQh+neBabomh7+89dTpiFAB8tGdfVmuIzAHbvtl+9I=
k8s.io/utils v0.0.0-20210820185131-d34e5cb4466e/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs=
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/caching v0.0.0-20211206133228-c29dc56d8f03/go.mod h1:xki+LBTL1riXSoU2dKznqUfgOlQ2eO/F1WF+GMXxH0k=
knative.dev/hack v0.0.0-20211122162614-813559cefdda/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20211203062838-e11ac125e707/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
Expand Down
64 changes: 46 additions & 18 deletions internal/ctrlutils/ingress-status.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,39 @@ type statusInfo struct {
hostname string
}

// StatusUpdater updates Kubernetes resources' status based on applied Kong configuration
type StatusUpdater struct {
kongConfig sendconfig.Kong
log logr.Logger
kubeConfig *rest.Config
publishService string
publishAddresses []string
}

// NeedLeaderElection indicates if the StatusUpdater must only be run by leader controllers
func (s *StatusUpdater) NeedLeaderElection() bool {
return true
}

// Start starts the status update loop
func (s *StatusUpdater) Start(ctx context.Context) error {
go s.PullConfigUpdate(ctx)
return nil
}

// NewStatusUpdater returns a StatusUpdater with the provided fields
func NewStatusUpdater(kongConfig sendconfig.Kong, log logr.Logger, kubeConfig *rest.Config,
publishService string, publishAddresses []string) *StatusUpdater {
updater := &StatusUpdater{
kongConfig: kongConfig,
log: log,
kubeConfig: kubeConfig,
publishService: publishService,
publishAddresses: publishAddresses,
}
return updater
}

func newStatusConfig(kubeConfig *rest.Config) (statusConfig, error) {
client, err := clientset.NewForConfig(kubeConfig)
if err != nil {
Expand Down Expand Up @@ -82,54 +115,49 @@ func newStatusConfig(kubeConfig *rest.Config) (statusConfig, error) {
}

// PullConfigUpdate is a dedicated function that process ingress/customer resource status update after configuration is updated within kong.
func PullConfigUpdate(
func (s *StatusUpdater) PullConfigUpdate(
ctx context.Context,
kongConfig sendconfig.Kong,
log logr.Logger,
kubeConfig *rest.Config,
publishService string,
publishAddresses []string,
) {
cfg := statusConfig{ready: false}
status := statusInfo{ready: false}
var wg sync.WaitGroup
var err error
for {
select {
case updateDone := <-kongConfig.ConfigDone:
case updateDone := <-s.kongConfig.ConfigDone:
if !cfg.ready {
cfg, err = newStatusConfig(kubeConfig)
cfg, err = newStatusConfig(s.kubeConfig)
if err != nil {
log.Error(err, "failed to initialize status updater")
s.log.Error(err, "failed to initialize status updater")
}
}
if !status.ready {
status, err = runningAddresses(ctx, kubeConfig, publishService, publishAddresses)
status, err = runningAddresses(ctx, s.kubeConfig, s.publishService, s.publishAddresses)
if err != nil {
if errors.Is(err, errLBNotReady) {
// Separate this into a debug log since it's expected in environments that cannot provision
// LoadBalancers (which we request by default), and will spam logs otherwise.
log.V(util.DebugLevel).Info("LoadBalancer type Service for the Kong proxy has no IPs", "service", publishService)
s.log.V(util.DebugLevel).Info("LoadBalancer type Service for the Kong proxy has no IPs", "service", s.publishService)
} else {
log.Error(err, "failed to look up status info for Kong proxy Service", "service", publishService)
s.log.Error(err, "failed to look up status info for Kong proxy Service", "service", s.publishService)
}
}
}

if cfg.ready && status.ready {
log.V(util.DebugLevel).Info("data-plane updates completed, updating resource statuses")
s.log.V(util.DebugLevel).Info("data-plane updates completed, updating resource statuses")
wg.Add(1)
go func() {
if err := UpdateStatuses(ctx, &updateDone, log, cfg.client, cfg.kicClient, &wg, status.ips,
status.hostname, kubeConfig, cfg.kubernetesVersion); err != nil {
log.Error(err, "failed to update resource statuses")
if err := UpdateStatuses(ctx, &updateDone, s.log, cfg.client, cfg.kicClient, &wg, status.ips,
status.hostname, s.kubeConfig, cfg.kubernetesVersion); err != nil {
s.log.Error(err, "failed to update resource statuses")
}
}()
} else {
log.V(util.DebugLevel).Info("config or publish service information unavailable, skipping status update")
s.log.V(util.DebugLevel).Info("config or publish service information unavailable, skipping status update")
}
case <-ctx.Done():
log.Info("stop status update channel.")
s.log.Info("stop status update channel.")
wg.Wait()
return
}
Expand Down
18 changes: 10 additions & 8 deletions internal/manager/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ type Config struct {
KongCustomEntitiesSecret string

// Kubernetes configurations
KubeconfigPath string
IngressClassName string
EnableLeaderElection bool
LeaderElectionID string
Concurrency int
FilterTags []string
WatchNamespaces []string
KubeconfigPath string
IngressClassName string
EnableLeaderElection bool
LeaderElectionNamespace string
LeaderElectionID string
Concurrency int
FilterTags []string
WatchNamespaces []string

// Ingress status
PublishService string
Expand Down Expand Up @@ -130,8 +131,9 @@ func (c *Config) FlagSet() *pflag.FlagSet {
// Kubernetes configurations
flagSet.StringVar(&c.KubeconfigPath, "kubeconfig", "", "Path to the kubeconfig file.")
flagSet.StringVar(&c.IngressClassName, "ingress-class", annotations.DefaultIngressClass, `Name of the ingress class to route through this controller.`)
flagSet.BoolVar(&c.EnableLeaderElection, "leader-elect", false, "Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.")
shaneutt marked this conversation as resolved.
Show resolved Hide resolved
flagSet.BoolVar(&c.EnableLeaderElection, "leader-elect", false, "DEPRECATED as of 2.1.0 leader election behavior is determined automatically and this flag has no effect")
flagSet.StringVar(&c.LeaderElectionID, "election-id", "5b374a9e.konghq.com", `Election id to use for status update.`)
flagSet.StringVar(&c.LeaderElectionNamespace, "election-namespace", "", `Leader election namespace to use when running outside a cluster`)
flagSet.StringSliceVar(&c.FilterTags, "kong-admin-filter-tag", []string{"managed-by-ingress-controller"}, "The tag used to manage and filter entities in Kong. This flag can be specified multiple times to specify multiple tags. This setting will be silently ignored if the Kong instance has no tags support.")
flagSet.IntVar(&c.Concurrency, "kong-admin-concurrency", 10, "Max number of concurrent requests sent to Kong's Admin API.")
flagSet.StringSliceVar(&c.WatchNamespaces, "watch-namespace", nil,
Expand Down
Loading