-
Notifications
You must be signed in to change notification settings - Fork 217
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
Osc operator #6990
base: master
Are you sure you want to change the base?
Osc operator #6990
Conversation
internal/operators/osc/manifest.go
Outdated
sourceNamespace: openshift-marketplace | ||
name: {{.OPERATOR_SOURCE_NAME}} | ||
installPlanApproval: Automatic | ||
startingCSV: startingCSV: sandboxed-containers-operator.v1.7.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.
there is a typo here - but I perfer if we don't have static versions - this can break it later releases
so we can remove the statingCSV
startingCSV: startingCSV: sandboxed-containers-operator.v1.7.0 | |
startingCSV: sandboxed-containers-operator.v1.7.0 |
internal/operators/osc/operator.go
Outdated
} | ||
|
||
func (o *operator) GetDependencies(cluster *common.Cluster) ([]string, error) { | ||
return []string{cnv.Operator.Name}, nil |
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.
this will enforce CNV installation when selecting osc
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6990 +/- ##
==========================================
+ Coverage 68.21% 68.24% +0.02%
==========================================
Files 273 275 +2
Lines 39079 39244 +165
==========================================
+ Hits 26659 26781 +122
- Misses 10008 10038 +30
- Partials 2412 2425 +13
|
13f4ae5
to
fb67951
Compare
5c98524
to
66bfe9c
Compare
internal/operators/osc/operator.go
Outdated
} | ||
|
||
func (o *operator) GetDependencies(cluster *common.Cluster) ([]string, error) { | ||
return []string{Operator.Name}, nil |
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.
Should be
return make([]string, 0), nil
return models.SupportLevelUnavailable | ||
} | ||
|
||
return models.SupportLevelSupported |
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.
should be tech preview
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.
Hello @eifrach , we plan to support OSC operator in this PR. The OSC operator has been GA from OCP4.10. So the "Supported" is expected here. Thanks.
func (feature *OSCFeature) getId() models.FeatureSupportLevelID { | ||
return models.FeatureSupportLevelIDOSC | ||
} |
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.
this function is not in interface
https://github.com/openshift/assisted-service/blob/master/internal/operators/api/api.go#L31
func (feature *OSCFeature) getId() models.FeatureSupportLevelID { | ||
return models.FeatureSupportLevelIDOSC | ||
} | ||
|
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'm missing two functions
func (o *operator) GetClusterValidationID() string
func (o *operator) GetHostValidationID() string
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'm missing more than just two
can you go over it and check that we have implement all the methods in the interface?
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.
Hello @eifrach , the interface type is SupportLevelFeature. Following https://github.com/openshift/assisted-service/blob/master/internal/featuresupport/support_level_feature.go, all the methods have been implemented here. Thanks.
internal/operators/osc/config.go
Outdated
MasterMemory int64 = 1 | ||
MasterCPU int64 = 1 | ||
// Memory value provided in GIB | ||
WorkerMemory int64 = 1 | ||
WorkerCPU int64 = 1 |
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.
those are not in use
return nil, err | ||
} | ||
|
||
return preflightRequirements.Requirements.Master.Quantitative, nil |
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 the requirement the same for Master and workers?
OSC workloads runs on all nodes?
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.
@eifrach The requirements should be different for master and worker nodes. The OSC workloads run on worker nodes. And when starting a OSC pod, the default VM size is: 2G memory and 1 CPU. I will discuss with Xiangchun to set a new value here. Thanks.
Expect(err).To(BeNil()) | ||
|
||
Expect(extractData(controllerData, "metadata.namespace")).To(Equal(Namespace)) | ||
}) |
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.
missing checkes for getLayeredImageDeployConfigMap
Expect(operator.GetName()).To(Equal(Name)) | ||
Expect(operator.GetFullName()).To(Equal(FullName)) |
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.
this can never fail
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.
Yes, I agree. We can remove this function. Thanks.
Expect(requirements).To(BeEquivalentTo(expectedRequirements)) | ||
|
||
}, | ||
Entry("min requirements", models.HostRoleMaster, newRequirements(minCpu, minRamMib)), |
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.
need more tests
role.master, not enough memory or CPU
It("should return the dependencies", func() { | ||
preflightRequirements, err := operator.GetPreflightRequirements(context.TODO(), &cluster) | ||
Expect(err).To(BeNil()) | ||
Expect(preflightRequirements.Dependencies).To(Equal([]string{cnv.Operator.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.
cnv?
}) | ||
|
||
It("host should be valid", func() { | ||
host := models.Host{Role: models.HostRoleMaster, Inventory: getInventory(int64(1024))} |
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.
testing only role master?
66bfe9c
to
089a5ae
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: xiangchunfu 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 |
Signed-off-by: xiangchun Fu <xfu@redhat.com>
Signed-off-by: xiangchun Fu <xfu@redhat.com>
089a5ae
to
ffa89b9
Compare
Signed-off-by: xiangchun Fu <xfu@redhat.com>
Signed-off-by: xiangchun Fu <xfu@redhat.com>
ffa89b9
to
fa68f19
Compare
@xiangchunfu: The following tests failed, say
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-sigs/prow repository. I understand the commands that are listed here. |
}, | ||
}, | ||
}, | ||
}, nil |
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.
@xiangchunfu Here we should consider the SNO scenario. Let's discuss offline about the details.
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