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
MGMT-17080: enable infrastructure operator #6037
MGMT-17080: enable infrastructure operator #6037
Conversation
@rccrdpccl: This pull request references MGMT-17080 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
/hold |
Skipping CI for Draft Pull Request. |
23a1313
to
72ef83a
Compare
internal/operators/mce/manifest.go
Outdated
if err != nil { | ||
return []byte{}, err | ||
} | ||
agentServiceConfig := &aiv1beta1.AgentServiceConfig{ |
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.
Will add more default values here
72ef83a
to
3b9adf5
Compare
3b9adf5
to
126badd
Compare
/test edge-subsystem-aws |
126badd
to
e400b25
Compare
9f84d85
to
290e4f1
Compare
/retest |
290e4f1
to
06fc7f8
Compare
/unhold |
/retest |
@@ -0,0 +1,32 @@ | |||
package common |
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.
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.
I don't think it's a technical problem, but it's generally good to avoid packages like "common" and "util" as they tend to get stuffed with unrelated things that defeat the purpose of packages.
So if it can be avoided then we should, but sometimes it's a necessary evil.
An alternative is for this to stay in the operators
package in a util.go
or something, but that's not much better than this for the same reasons I mentioned about util
packages.
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.
I totally agree that common is a crappy name, I've maintained it for consistency as it is used throughout the code.
Adding this to operators
package would've caused circular dependency as operators
package is requiring operators/odf
and operators/odf
would require this function(s).
As I discussed in another comment, I think the best approach to this would be using <package>utils
pattern (see for example std lib ioutils
). This way we can segregate in a package all related utilities and minimize circular dependency issues.
For example, all functions (not methods) related cluster object could go in internal/clusterutils
. This would reduce dependencies to a minimum and can be used from the whole codebase without any issue.
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.
Looking good, mostly minor comments
@@ -0,0 +1,32 @@ | |||
package common |
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.
I don't think it's a technical problem, but it's generally good to avoid packages like "common" and "util" as they tend to get stuffed with unrelated things that defeat the purpose of packages.
So if it can be avoided then we should, but sometimes it's a necessary evil.
An alternative is for this to stay in the operators
package in a util.go
or something, but that's not much better than this for the same reasons I mentioned about util
packages.
internal/operators/common/common.go
Outdated
) | ||
|
||
// Return eligible disks count (disks that are both available and fulfill minSize requirements) and available disks (disks that are available but do not fulfill the size requirement) | ||
func GetValidDiskCount(disks []*models.Disk, installationDiskID string, minSize int64) (int64, int64) { |
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.
Valid for what? I can see the function is ensuring that it's not the install disk, it's of a particular type and atleast the passed size, but what does that make the disk valid for?
Based on the PR I'd assume it's use for a storage operator, but the function could use a better name/comment.
@@ -21,6 +22,8 @@ type operator struct { | |||
extracter oc.Extracter | |||
} | |||
|
|||
const defaultStorageClassName = "lvms-vg1" |
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 this not something we can set when deploying the operators?
I don't know much about them but it seems like that should be a feature 🤷
06fc7f8
to
127cc9c
Compare
/retest |
1 similar comment
/retest |
…tors are selected Signed-off-by: Riccardo Piccoli <rpiccoli@redhat.com>
127cc9c
to
6f638f8
Compare
/retest |
1 similar comment
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: carbonin, rccrdpccl 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 |
@rccrdpccl: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
[ART PR BUILD NOTIFIER] This PR has been included in build ose-agent-installer-api-server-container-v4.16.0-202403211443.p0.g41ad865.assembly.stream.el8 for distgit ose-agent-installer-api-server. |
When MCE and a storage operator (LVM or ODF) are selected, generate manifest for
AgentServiceConfig
List all the issues related to this PR
What environments does this code impact?
How was this code tested?
Checklist
docs
, README, etc)Reviewers Checklist