Skip to content
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

Implement Driver API reconciliation #24

Merged
merged 14 commits into from
Jul 26, 2024
Merged

Conversation

nb-ohad
Copy link
Collaborator

@nb-ohad nb-ohad commented Jun 26, 2024

Describe what this PR does

The PR implements driver API reconciliation.

  • Read and validate the desired state specified by a driver CR
  • Merges desired state with defaults specified in an optional Operator Config CR and with local hardcoded values
  • Loads a custom image set or defaults to upstream CSI images
  • Concurrently Create or update the following resources (per driver)
    • Ceph CSI Plugin Deamon Set (and sidecars)
    • Ceph CSI Provisioner deployment (and sidecars)
    • CSI Driver definition
    • Optional Livness k8s Service

Is there anything that requires special attention

This PR does not include tests that cover the above changes.
A second PR for test implementation will come later

Future concerns

List items that are not part of the PR and do not impact it's
functionality, but are work items that can be taken up subsequently.

@nb-ohad nb-ohad force-pushed the driver-reconcile branch from aa1fe45 to d935b17 Compare June 27, 2024 07:30
@nb-ohad nb-ohad force-pushed the driver-reconcile branch 3 times, most recently from beda133 to 1edde70 Compare June 27, 2024 11:29
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
go.mod Show resolved Hide resolved
@nb-ohad nb-ohad force-pushed the driver-reconcile branch 6 times, most recently from dd95cb8 to 2832a7e Compare July 11, 2024 11:17
Copy link
Contributor

@leelavg leelavg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed only a 3rd portion I guess, will do the rest in another round, pls excuse.

api/v1alpha1/driver_types.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Show resolved Hide resolved
internal/controller/defaults.go Show resolved Hide resolved
internal/controller/defaults.go Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Show resolved Hide resolved
internal/controller/driver_controller.go Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
@nb-ohad nb-ohad force-pushed the driver-reconcile branch 7 times, most recently from f5a0b45 to badc03f Compare July 15, 2024 19:22
Copy link
Contributor

@leelavg leelavg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed around 2/3 rd, will do the rest after the updates.

internal/controller/defaults.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/utils/core.go Outdated Show resolved Hide resolved
internal/utils/core.go Outdated Show resolved Hide resolved
internal/utils/core.go Show resolved Hide resolved
internal/controller/defaults.go Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
internal/controller/driver_controller.go Outdated Show resolved Hide resolved
@nb-ohad nb-ohad force-pushed the driver-reconcile branch from badc03f to 1357d08 Compare July 17, 2024 14:36
@nb-ohad nb-ohad marked this pull request as ready for review July 17, 2024 14:48
@nb-ohad nb-ohad force-pushed the driver-reconcile branch 3 times, most recently from cf2b0f6 to 07100fd Compare July 17, 2024 19:20
@nb-ohad nb-ohad force-pushed the driver-reconcile branch 2 times, most recently from b8523e8 to ec54f4d Compare July 21, 2024 22:39
nb-ohad added 14 commits July 22, 2024 10:59
- validate driver name structure
- parse and split driver name into short name and driver type
- load desired driver resource

Signed-off-by: nb-ohad <[email protected]>
@parth-gr
Copy link
Contributor

While installing node plugin pods I see

  Normal   Scheduled    65s               default-scheduler  Successfully assigned ceph-csi-operator-system/rook-ceph.rbd.csi.ceph.com-nodeplugin-jgbc2 to minikube
  Warning  FailedMount  1s (x8 over 65s)  kubelet            MountVolume.SetUp failed for volume "registration-dir" : hostPath type check failed: /plugins_registry is not a directory
  Warning  FailedMount  1s (x8 over 65s)  kubelet            MountVolume.SetUp failed for volume "pods-mount-dir" : hostPath type check failed: /pods is not a directory

@Madhu-1 Madhu-1 merged commit 788f7c2 into ceph:main Jul 26, 2024
7 checks passed
Madhu-1 pushed a commit to Madhu-1/ceph-csi-operator that referenced this pull request Sep 5, 2024
bundle: rename the prefix from ocscsi to ceph-csi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants