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

csi: only create CSI config configmap in CSI reconciler #14089

Merged
merged 2 commits into from
Apr 18, 2024

Commits on Apr 18, 2024

  1. csi: only create CSI config configmap in CSI reconciler

    There have been some issues with non-CSI Rook controllers that are
    creating the CSI config configmap (`rook-ceph-csi-config`). This causes
    problems with the K8s OwnerReference. The primary CSI reconciler
    (controller) creates the configmap with the correct owner reference,
    which is supposed to be the operator deployment.
    
    Other instances were creating the configmap with owner references set to
    the CephCluster. This is a minor bug, but it can result in this
    configmap being deleted along with the first CephCluster that initially
    created it.
    
    To fix this issue, remove all instances of `CreateCsiConfigMap()` except
    the single usage which the CSI reconcile uses to initially create the
    configmap. Other controllers that might have attempted to create this
    configmap previously will return an error indicating that it is waiting
    for the configmap to be created.
    
    Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
    BlaineEXE committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    eb3278d View commit details
    Browse the repository at this point in the history
  2. csi: ensure correct csi config map owner during creation

    In the primary CSI reconcile, ensure the CSI config map
    (`rook-ceph-csi-config`) has the correct owner info.
    
    This corrects any pre-existing config maps that might have incorrect
    owner info, which has observed to include references to CephClusters.
    The config map should only have a single reference, and it should refer
    to the operator deployment.
    
    If any existing Rook clusters have a CSI config map which has a
    CephCluster as an owner, this change will ensure that the config map is
    not deleted when the CephCluster is deleted. This is especially
    important for any environments with multiple CephClusters installed.
    
    Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
    BlaineEXE committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    605b963 View commit details
    Browse the repository at this point in the history