Skip to content

Commit

Permalink
k8s: add deps from RoleBindings to Roles
Browse files Browse the repository at this point in the history
  • Loading branch information
trehn committed Apr 19, 2018
1 parent 48a151c commit aaa95ac
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bundlewrap/items/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,11 @@ class KubernetesClusterRoleBinding(KubernetesItem):
KUBERNETES_APIVERSION = "rbac.authorization.k8s.io/v1"
ITEM_TYPE_NAME = "k8s_clusterrolebinding"

def get_auto_deps(self, items):
deps = super(KubernetesStatefulSet, self).get_auto_deps(items)
deps.append("k8s_clusterrole:")
return deps

@property
def namespace(self):
return None
Expand Down Expand Up @@ -322,7 +327,6 @@ def namespace(self):
return None



class KubernetesDaemonSet(KubernetesItem):
BUNDLE_ATTRIBUTE_NAME = "k8s_daemonsets"
KIND = "DaemonSet"
Expand Down Expand Up @@ -406,6 +410,11 @@ class KubernetesRoleBinding(KubernetesItem):
KUBERNETES_APIVERSION = "rbac.authorization.k8s.io/v1"
ITEM_TYPE_NAME = "k8s_rolebinding"

def get_auto_deps(self, items):
deps = super(KubernetesStatefulSet, self).get_auto_deps(items)
deps.append("k8s_role:")
return deps


class KubernetesSecret(KubernetesItem):
BUNDLE_ATTRIBUTE_NAME = "k8s_secrets"
Expand Down

0 comments on commit aaa95ac

Please sign in to comment.