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
Add unsupported config override for reload interval #619
Add unsupported config override for reload interval #619
Conversation
@@ -421,6 +424,14 @@ func desiredRouterDeployment(ci *operatorv1.IngressController, ingressController | |||
Name: RouterLoadBalancingAlgorithmEnvName, | |||
Value: loadBalancingAlgorithm, | |||
}) | |||
reloadInterval := 5 | |||
if unsupportedConfigOverrides.ReloadInterval != 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if unsupportedConfigOverrides.ReloadInterval != 0 { | |
if unsupportedConfigOverrides.ReloadInterval > 0 { |
Might as well avoid negative numbers, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks!
Do we have a bug we can use for this fix (or should we open a new one)? |
070740c
to
1267b30
Compare
1267b30
to
4221ea7
Compare
The second to last push added an E2E test and changed the logic to ignore an unsupported config override with |
test/e2e/operator_test.go
Outdated
t.Fatalf("failed to update ingresscontroller: %v", err) | ||
} | ||
if err := waitForDeploymentEnvVar(t, kclient, deployment, 1*time.Minute, "RELOAD_INTERVAL", "60"); err != nil { | ||
t.Fatalf("expected initial deployment to set RELOAD_INTERVAL=60: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it the "initial" deployment or the now "updated" deployment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, it's "updated". Fixed. Thanks!
test/e2e/operator_test.go
Outdated
defer assertIngressControllerDeleted(t, kclient, ic) | ||
|
||
if err := waitForIngressControllerCondition(t, kclient, 5*time.Minute, icName, availableConditionsForPrivateIngressController...); err != nil { | ||
t.Errorf("failed to observe expected conditions: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be Fatal
? Can the test continue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to Fatalf
. Thanks!
4221ea7
to
5629091
Compare
Rebased to resolve a conflict in |
5629091
to
c0a7ca5
Compare
/lgtm |
/retest |
/lgtm |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
test/e2e/operator_test.go
Outdated
defer assertIngressControllerDeleted(t, kclient, ic) | ||
|
||
if err := waitForIngressControllerCondition(t, kclient, 5*time.Minute, icName, availableConditionsForPrivateIngressController...); err != nil { | ||
t.Fatalf("failed to observe expected conditions: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t.Fatalf("failed to observe expected conditions: %w", err) | |
t.Fatalf("failed to observe expected conditions: %v", err) |
Could this be whats causing the e2e-aws-operator job to keep failing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks!
This PR is perma-failing e2e-aws-operator due to a |
c0a7ca5
to
a95b8b1
Compare
/lgtm |
a95b8b1
to
7cc62d3
Compare
* pkg/operator/controller/ingress/deployment.go (RouterReloadIntervalEnvName): New const. (desiredRouterDeployment): Add unsupported config override for RELOAD_INTERVAL. * pkg/operator/controller/ingress/deployment_test.go (TestDesiredRouterDeployment): Verify that desiredRouterDeployment sets RELOAD_INTERVAL as expected. * test/e2e/operator_test.go (TestReloadIntervalUnsupportedConfigOverride): Verify that the operator sets RELOAD_INTERVAL to the value specified in the unsupported configuration override or to the default value of 5 if no override is specified.
7cc62d3
to
a849a88
Compare
Rebased to resolve conflicts from #628. |
/test e2e-upgrade |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: frobware, Miciah, sgreene570 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
pkg/operator/controller/ingress/deployment.go
(RouterReloadIntervalEnvName
): New const.(
desiredRouterDeployment
): Add unsupported config override forRELOAD_INTERVAL
.pkg/operator/controller/ingress/deployment_test.go
(TestDesiredRouterDeployment
): Verify thedesiredRouterDeployment
setsRELOAD_INTERVAL
as expected.