-
Notifications
You must be signed in to change notification settings - Fork 23
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
ocs-client-operator implementation #7
Conversation
dc3b646
to
f106db1
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.
Overall this is a great PR, thank you for accommodating my commit requests. 🙏 Apart from the more specific review comments, I have a couple of broad questions:
Regarding the StorageClient CRD:
- I remember at some point having a conversation (months ago) about naming this StorageClient vs OcsClient. The reasoning for the latter probably make more sense when it was
ocsclient.odf.openshift.io
, but I can seestorageclient.ocs.openshift.io
also making sense these days. Is this related to the referenced (though unexplained) conversation about the API group name? - Why are we limiting to one per namespace? I can imagine the argument being something about Secret/data isolation, but could I get a concrete example of where this would be an actual problem with the current design?
Regarding the StorageClassClaim implementation, this seems largely similar to the work I did in the previous PRs. If this is the case, could you add a Co-authored-by: [email protected]
line to the relevant commit messages? If you feel any of the other commits are significantly based on that same prior work, please do add the line there as well.
Beyond that:
- Your commits are signed using your personal gmail account. I would think you should be using your @redhat.com account, was this intentional?
- I like the implementation of the status-report job, but boy does it look weird to have a
main.go
underpkg
. Would it be possible to do as was done for the Provider and create aservice/status-reporter
directory for that job?
It was discussed in one of the meetings with @nb-ohad and @oritwas as it's more opt and as the name explains it's just a storageclient we decided on storage client name. it's not documented anywhere.
To keep it simple for now, we will go with one storageClient per namespace but in future/follow-up PR we will block creating multiple storageclient per provider and allow multiple storageclient connecting to different providers in the same namespace.
Sorry missed adding it. Done 👍
yes, it's intentional I use my Gmail id for all the projects I work with. Never used redhat.com till now.
Done 👍 |
329de9f
to
ee3a815
Compare
I haven't seen this before. Best I knew if you're doing work for redhat you should be signing it as such. But if that's what you've been doing and no one else has said anything about, I'm not gonna care. 😆 |
added cleanup component to the commitlint config file. The cleanup can be used when we are doing any code cleanup. Signed-off-by: Madhu Rajanna <[email protected]>
Replacing odf with ocs for below reason * The project is created to the ocs-client-operator * To keep the CRD group as similar to existing CRD * The name change is after discussion in a meeting Signed-off-by: Madhu Rajanna <[email protected]>
its expected to have a new line between the function comment on the linter comments. This is also auto suggested from golang linter tools. Signed-off-by: Madhu Rajanna <[email protected]>
update golang to 1.18 no need to support v1.17 as its old version and its not supported by vendor dependencies like kubernetes Signed-off-by: Madhu Rajanna <[email protected]>
includes the go.mod, go.sum and vendor changes for the csi driver. Signed-off-by: Madhu Rajanna <[email protected]>
added csi to commitlint config. If there are CSI changes csi component can be used when creating the git commit. Signed-off-by: Madhu Rajanna <[email protected]>
2ab538d
to
753d2dc
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.
Excellent work! Just one last typo to fix, I don't entirely want to hold up the entire PR for this, but if not now then who knows when. 😆 If you or someone else has permissions to hit the big green merge button once you update the PR I hereby consent to you doing so ASAP.
020a8e1
to
8effa23
Compare
@jarrpa Please take a look at it; below are the major changes after discussing with @nb-ohad
|
10bd891
to
61070e4
Compare
Test results from OCP cluster [🎩︎]mrajanna@fedora ocs-client-operator $]oc get po -nocs-client-ns
NAME READY STATUS RESTARTS AGE
csi-addons-controller-manager-7fc65dff49-7mpxs 2/2 Running 0 49m
csi-cephfsplugin-6wtgv 2/2 Running 0 2m39s
csi-cephfsplugin-bwn6g 2/2 Running 0 2m52s
csi-cephfsplugin-p9f97 2/2 Running 0 2m49s
csi-cephfsplugin-provisioner-7bbcd8d9bf-gqgj9 5/5 Running 0 23m
csi-cephfsplugin-provisioner-7bbcd8d9bf-gqrxx 5/5 Running 0 23m
csi-rbdplugin-5k5cp 3/3 Running 0 25m
csi-rbdplugin-6mv8w 3/3 Running 0 25m
csi-rbdplugin-7bzzl 3/3 Running 0 25m
csi-rbdplugin-provisioner-5f8fd786d-65rx5 5/5 Running 0 3m12s
csi-rbdplugin-provisioner-5f8fd786d-hppg9 5/5 Running 0 3m18s
ocs-client-operator-controller-manager-d8df78b86-ls2gs 2/2 Running 0 3m43s |
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.
Just a few small things left. Apart from the code questions, there's a commit description that should be amended:
csi: install ceph-csi driver
Install ceph-CSI driver based on the
kubernetes version where the ocs-client
operator is running.
This also includes clusterversion controller
which can trigger an upgrade of csi driver
if required when a OCP cluster is upgraded.
There is a if/else check in main.go which helps
to install/test csidriver changes by checking
this is a ocp cluster or kubernetes cluster.
The if/else mentioned has been removed.
// GetOperatorDeployment returns the operator deployment object | ||
func GetOperatorDeployment(ctx context.Context, c client.Client, namespace string) (*appsv1.Deployment, error) { | ||
deployment := &appsv1.Deployment{} | ||
err := c.Get(ctx, types.NamespacedName{Name: "ocs-client-operator-controller-manager", Namespace: namespace}, 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.
There's not a 100% guarantee that this will always be the name of the Deployment resource... we can probably leave this as-is for the sake of expediency, but I would like to see something that gets the Deployment based on the metadata of the Pod.
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 looks good to merge, please create an issue for this comment when you're back online.
e30a4f3
to
27a53cd
Compare
Install ceph-CSI driver based on the OCP version where the ocs-client operator is running. This also includes clusterversion controller which can trigger an installation of csi driver and also upgrade of csi the driver if required when a OCP cluster is upgraded. Co-authored-by: Jose A. Rivera <[email protected]> Signed-off-by: Madhu Rajanna <[email protected]>
dockerfile changes to copy sidecar.yaml to the operator image Signed-off-by: Madhu Rajanna <[email protected]>
RBAC changes required to manage the csidriver. Signed-off-by: Madhu Rajanna <[email protected]>
Use golang 1.18 and 1.19 in the CI environment. Signed-off-by: Madhu Rajanna <[email protected]>
Adding storageClient CR which supports anboarding and offboarding new storageclients to the provider cluster. A single storageclient can exists in a single namespace. If someone tries to create one more storageclient it will fail. Co-authored-by: Jose A. Rivera <[email protected]> Signed-off-by: Madhu Rajanna <[email protected]>
contains the go.mod and vendor changes required for storageclient Co-authored-by: Jose A. Rivera <[email protected]> Signed-off-by: Madhu Rajanna <[email protected]>
these changes are the manifest and bundle changes for the storageclient. Co-authored-by: Jose A. Rivera <[email protected]> Signed-off-by: Madhu Rajanna <[email protected]>
Adding storageClassclaim CR which supports requesting for cephfs and rbd storageclass Co-authored-by: Jose A. Rivera <[email protected]> Signed-off-by: Madhu Rajanna <[email protected]>
storageclient changes for the storageclassclaim controller * check no storageclassclaims exists before deleting the storageclient Co-authored-by: Jose A. Rivera <[email protected]> Signed-off-by: Madhu Rajanna <[email protected]>
changes includes the manifest and bundle for the storageclassclaim Co-authored-by: Jose A. Rivera <[email protected]> Signed-off-by: Madhu Rajanna <[email protected]>
Adding the status health of the storageclient to the provider cluster. Signed-off-by: Madhu Rajanna <[email protected]>
manifest changes for the status-reporter image Signed-off-by: Madhu Rajanna <[email protected]>
Deploymemnt is done using a dependencies.yaml file, to instruct OLM to bring and deploy csiaddons bundle as part of ocs-client-operator bundle installation The pakcage name and version is configurable when running the make bundle command. Signed-off-by: Madhu Rajanna <[email protected]>
increase the golangci-lint timeout to higher value. Signed-off-by: Madhu Rajanna <[email protected]>
setting OwnNamespace to true as the dependent csi-addons also required it to be true. Signed-off-by: Madhu Rajanna <[email protected]>
27a53cd
to
d0266d8
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.
LGTM!
This replaces #3, #4, #5, and #6, as this includes all the planned changes.