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

Create a formatter for cluster role and cluster role binding formatting #39

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

addyess
Copy link
Member

@addyess addyess commented Feb 15, 2025

Creates a formatter to prevent conflicts in names of non-namespaced objects in ClusterRole and ClusterRoleBindings

In order to deploy N ceph-csi charm applications into a model, we need to prepare the Kubernetes resources to have different names so they do not collide with one another. While the charm can detect collisions, it can't work around them.

This change allows some "non-namespaced" resources in the cluster to support a format-able name -- specifically the RBAC controls. I'd be willing to discuss a better name for the charm config.

the following may not be the clearest name:

ceph-rbac-name-formatter

There are really on a few Kubernetes resources that collide (because they aren't namespace scoped resources)

  • ClusterRole
  • ClusterRoleBinding
  • StorageClass

The storage-classes have been resolved with their own formatters, so all that remains is supporting a rename of ClusterRole and ClusterRoleBinding.

Copy link
Contributor

@HomayoonAlimohammadi HomayoonAlimohammadi left a comment

Choose a reason for hiding this comment

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

Great work, thanks a lot @addyess. LGTM overall, just a minor question.

src/manifests_base.py Show resolved Hide resolved
@addyess addyess force-pushed the KU-2645/add-resource-name-posfix branch from 765d267 to c245367 Compare February 18, 2025 14:25
@addyess addyess marked this pull request as draft February 18, 2025 22:55
@addyess
Copy link
Member Author

addyess commented Feb 18, 2025

Converting to draft to resolve conflicts in RBD and XFS storage class names

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