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

Syncing latest changes from upstream main for ramen #368

Merged
merged 11 commits into from
Oct 7, 2024
Merged

Commits on Oct 1, 2024

  1. Refactor: Extract resource watching logic from drpc controller into d…

    …rpc watcher
    
    - Moved all resource-watching related functions from drplacementcontrol_controller.go
    to a new file drplacementcontrol_watcher.go.
    - No functional changes introduced, purely a structural refactor.
    
    Signed-off-by: Benamar Mekhissi <[email protected]>
    Benamar Mekhissi authored and ShyamsundarR committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    2d4b061 View commit details
    Browse the repository at this point in the history
  2. Watch for DRPolicy resource changes

    - Added functionality to watch for changes in DRPolicy resources to trigger DRPC
    reconciliation when necessary.
    
    Signed-off-by: Benamar Mekhissi <[email protected]>
    Benamar Mekhissi authored and ShyamsundarR committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    ada7056 View commit details
    Browse the repository at this point in the history
  3. Add external-snapshotter addon to kubevirt envs

    Was forgetten when we replaced minikube volumesnapshot addons.
    
    Signed-off-by: Nir Soffer <[email protected]>
    nirs authored and ShyamsundarR committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    75aa24b View commit details
    Browse the repository at this point in the history
  4. Reformat reconcileMissingVR comment for readability

    The comment is still unclear, but at least easier to read.
    
    Signed-off-by: Nir Soffer <[email protected]>
    nirs authored and ShyamsundarR committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    c8b3512 View commit details
    Browse the repository at this point in the history
  5. Fix logs in reconcileMissingVR

    - Replace "VR under deletion" with "deleted VR", matching the
      terminology used in the code.
    - Replace "detected as missing or deleted" with "is missing" when we
      know the VR does not exist.
    
    Signed-off-by: Nir Soffer <[email protected]>
    nirs authored and ShyamsundarR committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    b9552c3 View commit details
    Browse the repository at this point in the history
  6. Extract VRGInstance.validateVRCompletedStatus()

    Moved from validateVRStatus() to make room from checking VR VAlidated
    status. This also make the function easier to understand, keeping the
    same level of abstraction and getting rid of the uninteresting details.
    
    Signed-off-by: Nir Soffer <[email protected]>
    nirs authored and ShyamsundarR committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    bd41cab View commit details
    Browse the repository at this point in the history
  7. Clarify isVRConditionMet

    Rename msg to errorMsg and document that this is an error message,
    if the we could not get the condition value, because it is missing,
    stale, or unknown.
    
    Signed-off-by: Nir Soffer <[email protected]>
    nirs authored and ShyamsundarR committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    830f770 View commit details
    Browse the repository at this point in the history
  8. Improve logging in delete VR flow

    Log after important changes to the system in delete VR flow to make it
    easier to understand what the system is doing, and how ramen changed the
    system.
    
    New logs:
    - delete the VR resource
    - remove annotations from PV
    
    Improve logs:
    - remove annotations, labels, and finalizers from PVC
    
    Signed-off-by: Nir Soffer <[email protected]>
    nirs authored and ShyamsundarR committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    7d170b5 View commit details
    Browse the repository at this point in the history
  9. Fix disable dr if VR failed validation

    When deleting a primary VRG, we wait until the VR Completed condition is
    met. However if a VR precondition failed, for example using a drpolicy
    without flattening enabled when the PVC needs flattening, the VR will
    never complete and the vrg and drpc deletion will never complete.
    
    Since csi-addons 0.10.0 we have a new Validated VR condition, set to
    true if pre conditions are met, and false if not. VR is can be deleted
    safely in this state, since mirroring was not enabled.
    
    This changes modifies deleted VRG processing to check the new VR
    Validated status. If the condition exist and the condition status is
    false, validateVRStatus() return true, signaling that the VR is in the
    desired state, and ramen completes the delete flow.
    
    If the VR does not report the Validated condition (e.g. old csi-addon
    version) or the condition status is true (mirroring in progress), we
    continue in the normal flow. The VR will be deleted only when the
    Completed condition status is true.
    
    Tested with discovered deployment and vm using a pvc created from a
    volume snapshot.
    
    Signed-off-by: Nir Soffer <[email protected]>
    nirs authored and ShyamsundarR committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    5dfc74a View commit details
    Browse the repository at this point in the history
  10. Updating broken clusteradm link in the doc

    Signed-off-by: Abhijeet Shakya <[email protected]>
    abhijeet219 authored and nirs committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    25061a9 View commit details
    Browse the repository at this point in the history
  11. Add daily e2e job for refreshing the cache

    To refresh the cache we need to checkout ramen source and run drenv
    cache with the environment files. Using a workflow for this make this
    job easy to implement and manage without accessing the runner directly.
    
    The job can also run manually from github UI. This is likely to work for
    people with write access.
    
    Signed-off-by: Nir Soffer <[email protected]>
    nirs authored and raghavendra-talur committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    29d6f22 View commit details
    Browse the repository at this point in the history