cluster/kube: generate namespaces in NamespaceAdmins

Change-Id: I37981a4d8d7cf9b85b9b9ab8cfdfc6c66eaa4453
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1760
Reviewed-by: radex <radex@hackerspace.pl>
master
q3k 2023-10-31 10:48:24 +00:00 committed by q3k
parent a6592b845c
commit ab2e470bd3
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,10 @@ local kube = import "../../../kube/kube.libsonnet";
NamespaceAdmins: {
namespaces:: error "namespaces not set",
local namespaces = self.namespaces,
nsObjects: [
kube.Namespace(namespace)
for namespace in std.objectFields(namespaces)
],
roleBindings: [
createNamespaceRoleBinding(namespace, namespaces[namespace])
for namespace in std.objectFields(namespaces)