-
Notifications
You must be signed in to change notification settings - Fork 12
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
OPCT-332: introducing 'dedicated controller' to mutate pods failed to schedule #160
base: main
Are you sure you want to change the base?
OPCT-332: introducing 'dedicated controller' to mutate pods failed to schedule #160
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
e442ed7
to
d4ccfeb
Compare
d4ccfeb
to
c2aa784
Compare
1d6aa70
to
b78e7eb
Compare
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.
PR Overview
This PR introduces a dedicated e2e controller to mutate pods that fail to schedule due to dedicated node configuration, preventing false-positive test failures.
- Renames and refactors the node setup command to "taint-node" under the e2ed package.
- Adds a new deployment creation for the e2e-dedicated controller in the run package.
- Introduces the new controller command with informer logic to automatically update pods with the required toleration.
Reviewed Changes
File | Description |
---|---|
pkg/cmd/adm/e2ed/taintNode.go | Refactors the node setup command and updates help text. |
pkg/run/run.go | Adds deployment creation logic for the dedicated e2e controller. |
pkg/cmd/adm/e2ed/root.go | Registers the new e2e-dedicated commands. |
pkg/cmd/adm/e2ed/controller.go | Implements controller logic to watch and mutate unscheduled pods. |
pkg/types.go | Introduces constants for controller image and dedicated controller name. |
pkg/cmd/adm/root.go | Registers the new e2e-dedicated command in the admin command tree. |
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
pkg/cmd/adm/e2ed/taintNode.go
Outdated
|
||
You can automatically accept the selected node with the option --yes. | ||
|
||
Alternativaly you can set the custom node with the option --node <node-name>. |
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.
Consider correcting the typo 'Alternativaly' to 'Alternatively'.
Alternativaly you can set the custom node with the option --node <node-name>. | |
Alternatively you can set the custom node with the option --node <node-name>. |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
var podCounters map[string]*podMutateStatus | ||
|
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.
podCounters is accessed from multiple goroutines without synchronization, which may lead to race conditions. Consider using a mutex or a concurrent-safe map to protect its access.
var podCounters map[string]*podMutateStatus | |
var ( | |
podCounters = make(map[string]*podMutateStatus) | |
podCountersMutex sync.Mutex | |
) |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
d3cc001
to
4ce0190
Compare
What this PR does / why we need it:
This change is proposing a controller to watch the e2e pods failed to schedule, mutating those to apply the OPCT dedicated toleration, targeting to prevent false-positive failures in the conformance results due the dedicated node introduced as required by OPCT.
The controller is started by a command
adm e2e-dedicated controller
, distributed with the same image ofopct
. The deployment will be created inopct
namespace when the commandrun
is executed. The destroy flow will remove all resources inopct
namespace, not requiring a dedicated logic to remove the controller deployment.Additionally the command
adm setup-node
is being deprecated moved toadm e2e-dedicated taint-node
.Tests: openshift/release#62503
Done checklist:
*Epic OPCT-332
Which issue(s) this PR fixes (optional, use
fixes #<issue_number>(, fixes #<issue_number>, ...)
format, where issue_number might be a GitHub issue, or a Jira story:Fixes #
Checklist