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

Reconciler will detect and block on kubernetes resource collisions #35

Merged
merged 10 commits into from
Feb 18, 2025

Conversation

addyess
Copy link
Member

@addyess addyess commented Feb 5, 2025

Overview

  • if N>1 ceph-csi charms are installed as different applications names on the same k8s cluster, the kubernetes resources it manages will clash with the others.
  • The first charm to put the resources down "owns" the resource. Any resource with a label juju.io/application=<name-of-app> is considered the object's owner
  • the newer charms should block if the kubnernetes cluster has any resource it wishes to install and the juju.io/application is different from its own

Details

config-missing: |-
  ConfigMap/ceph-2/ceph-config
  ConfigMap/ceph-2/ceph-csi-config
  ConfigMap/ceph-2/ceph-csi-encryption-kms-config
rbd-conflicting: |-
  ClusterRole/rbd-csi-nodeplugin
  ClusterRole/rbd-external-provisioner-runner
  ClusterRoleBinding/rbd-csi-nodeplugin
  ClusterRoleBinding/rbd-csi-provisioner-role
  StorageClass/ceph-ext4
  StorageClass/ceph-xfs
rbd-correct: CSIDriver/rbd.csi.ceph.com
rbd-missing: |-
  ClusterRole/rbd-csi-nodeplugin
  ClusterRole/rbd-external-provisioner-runner
  ClusterRoleBinding/rbd-csi-nodeplugin
  ClusterRoleBinding/rbd-csi-provisioner-role
  DaemonSet/ceph-2/csi-rbdplugin
  Deployment/ceph-2/csi-rbdplugin-provisioner
  Role/ceph-2/rbd-external-provisioner-cfg
  RoleBinding/ceph-2/rbd-csi-provisioner-role-cfg
  Secret/ceph-2/csi-rbd-secret
  Service/ceph-2/csi-metrics-rbdplugin
  Service/ceph-2/csi-rbdplugin-provisioner
  ServiceAccount/ceph-2/rbd-csi-nodeplugin
  ServiceAccount/ceph-2/rbd-csi-provisioner
  StorageClass/ceph-ext4
  StorageClass/ceph-xfs
  • Each charm (not just the leader) can check for these conflicts and report to the user in juju status

@addyess addyess force-pushed the KU-2644/block-duplicates-from-alternate-app branch from 4a89deb to fb9751f Compare February 5, 2025 20:41
@addyess addyess marked this pull request as draft February 5, 2025 20:44
@addyess addyess marked this pull request as ready for review February 6, 2025 19:37
@addyess addyess force-pushed the KU-2644/block-duplicates-from-alternate-app branch from 00485a3 to c3e05ba Compare February 6, 2025 20:33
Copy link
Contributor

@bschimke95 bschimke95 left a comment

Choose a reason for hiding this comment

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

LGTM

@bschimke95 bschimke95 merged commit b2370d4 into main Feb 18, 2025
7 checks passed
@bschimke95 bschimke95 deleted the KU-2644/block-duplicates-from-alternate-app branch February 18, 2025 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants