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: re-implement status update flags #1514

Merged
merged 3 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
- The historical `--stderrthreshold` flag is now deprecated: it no longer has
any effect when used and will be removed in a later release.
[#1297](https://github.com/Kong/kubernetes-ingress-controller/issues/1297)
- The `--update-status-on-shutdown` flag which supplements the `--update-status`
flag has been deprecated and will no longer have any effect, it will be removed
in a later release.
[#1304](https://github.com/Kong/kubernetes-ingress-controller/issues/1304)

## [2.0.0-alpha.2] - 2021/07/07

Expand Down
7 changes: 6 additions & 1 deletion railgun/manager/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,12 @@ func Run(ctx context.Context, c *config.Config) error {
return err
}

go ctrlutils.PullConfigUpdate(ctx, kongConfig, logger, kubeconfig, c.PublishService, c.PublishStatusAddress)
if c.UpdateStatus {
setupLog.Info("status updates enabled, status update routine is being started in the background.")
go ctrlutils.PullConfigUpdate(ctx, kongConfig, logger, kubeconfig, c.PublishService, c.PublishStatusAddress)
} else {
setupLog.Info("WARNING: status updates were disabled, resources like Ingress objects will not receive updates to their statuses.")
}

alwaysEnabled := util.EnablementStatusEnabled
controllers := []ControllerDef{
Expand Down
4 changes: 4 additions & 0 deletions railgun/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ type Config struct {
// Ingress status
PublishService string
PublishStatusAddress []string
UpdateStatus bool

// Kubernetes API toggling
IngressExtV1beta1Enabled util.EnablementStatus
Expand Down Expand Up @@ -150,6 +151,8 @@ func (c *Config) FlagSet() *pflag.FlagSet {
flagSet.StringSliceVar(&c.PublishStatusAddress, "publish-status-address", []string{}, `User-provided addresses in
comma-separated string format, for use in lieu of "publish-service" when that Service lacks useful address
information (for example, in bare-metal environments).`)
flagSet.BoolVar(&c.UpdateStatus, "update-status", true,
`Indicates if the ingress controller should update the status of resources (e.g. IP/Hostname for v1.Ingress, e.t.c.)`)

// Kubernetes API toggling
flagSet.enablementStatusVar(&c.IngressNetV1Enabled, "controller-ingress-networkingv1", util.EnablementStatusEnabled, "Enable or disable the Ingress controller (using API version networking.k8s.io/v1)."+onOffUsage)
Expand Down Expand Up @@ -189,6 +192,7 @@ func (c *Config) FlagSet() *pflag.FlagSet {
proxy.DefaultSyncSeconds,
))
flagSet.Int("stderrthreshold", 0, "DEPRECATED: has no effect and will be removed in future releases (see github issue #1297)")
flagSet.Bool("update-status-on-shutdown", false, `DEPRECATED: no longer has any effect and will be removed in a later release (see github issue #1304)`)

return &flagSet.FlagSet
}
Expand Down