Skip to content

Commit

Permalink
k8s: fix NAME_REGEX for ClusterRole[Binding]s
Browse files Browse the repository at this point in the history
  • Loading branch information
trehn committed Apr 19, 2018
1 parent aaa95ac commit 736cc3a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bundlewrap/items/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ class KubernetesClusterRole(KubernetesItem):
KIND = "ClusterRole"
KUBERNETES_APIVERSION = "rbac.authorization.k8s.io/v1"
ITEM_TYPE_NAME = "k8s_clusterrole"
NAME_REGEX = r"^[a-z0-9-\.]{1,253}$"
NAME_REGEX_COMPILED = re.compile(NAME_REGEX)

@property
def namespace(self):
Expand All @@ -286,6 +288,8 @@ class KubernetesClusterRoleBinding(KubernetesItem):
KIND = "ClusterRoleBinding"
KUBERNETES_APIVERSION = "rbac.authorization.k8s.io/v1"
ITEM_TYPE_NAME = "k8s_clusterrolebinding"
NAME_REGEX = r"^[a-z0-9-\.]{1,253}$"
NAME_REGEX_COMPILED = re.compile(NAME_REGEX)

def get_auto_deps(self, items):
deps = super(KubernetesStatefulSet, self).get_auto_deps(items)
Expand Down

0 comments on commit 736cc3a

Please sign in to comment.