Skip to content

Commit

Permalink
feat: add role bindings for witherr in other namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-ni committed Oct 6, 2024
1 parent cec12d4 commit 6208dfe
Showing 1 changed file with 20 additions and 25 deletions.
45 changes: 20 additions & 25 deletions kubernetes/users/witherr.nix
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
{ ... }:

let
adminRoleBinding = {
subjects = [{
kind = "ServiceAccount";
name = "witherr";
namespace = "poketwo";
}];
roleRef = {
kind = "ClusterRole";
name = "admin";
apiGroup = "rbac.authorization.k8s.io";
};
};
in
{
namespaces.poketwo.resources = {
v1.ServiceAccount.witherr = { };

"rbac.authorization.k8s.io/v1".RoleBinding.witherr = {
subjects = [{
kind = "ServiceAccount";
name = "witherr";
}];
roleRef = {
kind = "ClusterRole";
name = "admin";
apiGroup = "rbac.authorization.k8s.io";
};
};

"rbac.authorization.k8s.io/v1".ClusterRoleBinding.witherr = {
subjects = [{
kind = "ServiceAccount";
name = "witherr";
namespace = "poketwo";
}];
roleRef = {
kind = "ClusterRole";
name = "view";
apiGroup = "rbac.authorization.k8s.io";
};
};
"rbac.authorization.k8s.io/v1".RoleBinding.witherr = adminRoleBinding;
"rbac.authorization.k8s.io/v1".ClusterRoleBinding.witherr = adminRoleBinding;
};

namespaces.guiduck.resources."rbac.authorization.k8s.io/v1".RoleBinding.witherr = adminRoleBinding;
namespaces.poketwo-staging.resources."rbac.authorization.k8s.io/v1".RoleBinding.witherr = adminRoleBinding;
namespaces.poketwo-staging-private.resources."rbac.authorization.k8s.io/v1".RoleBinding.witherr = adminRoleBinding;
}

0 comments on commit 6208dfe

Please sign in to comment.