Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

ClusterRole[Binding] should not inherit from Role[Binding] #56

Open
ghostsquad opened this issue Jan 20, 2021 · 0 comments
Open

ClusterRole[Binding] should not inherit from Role[Binding] #56

ghostsquad opened this issue Jan 20, 2021 · 0 comments

Comments

@ghostsquad
Copy link

I have an overlay library that sets defaults and adds various parameters to the base functions in this library such as:

local k = (import 'github.com/bitnami-labs/kube-libsonnet/kube.libsonnet');

k {
  Role(name, namespace):: super.Role(name) {
    metadata+: {
      namespace: namespace,
    },
  },
}

I found I need to wholesale replace ClusterRole otherwise it references Role which is in my overlay now a namespaced object.

ClusterRole(name): $._Object("rbac.authorization.k8s.io/v1", "ClusterRole", name),

The only deduplication that is gained by inheriting from Role is the apiVersion. I think it would be beneficial here to decouple Role from ClusterRole.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant