Open ghostsquad opened 3 years ago
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
Role
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.
apiVersion
I have an overlay library that sets defaults and adds various parameters to the base functions in this library such as:
I found I need to wholesale replace
ClusterRole
otherwise it referencesRole
which is in my overlay now a namespaced object.The only deduplication that is gained by inheriting from Role is the
apiVersion
. I think it would be beneficial here to decoupleRole
fromClusterRole
.