kubernetes + podchaperon

This commit is contained in:
mr
2026-03-23 16:20:20 +01:00
parent b76b22a8fb
commit 211339947c

View File

@@ -98,8 +98,8 @@ func (k *KubernetesService) CreateNamespace(ctx context.Context, ns string) erro
namespace := &v1.Namespace{
ObjectMeta: metav1.ObjectMeta{
Name: ns,
Labels: map[string]string{
"multicluster-scheduler": "enabled",
Annotations: map[string]string{
"multicluster.admiralty.io/elect": "",
},
},
}
@@ -200,9 +200,9 @@ func (k *KubernetesService) ProvisionExecutionNamespace(ctx context.Context, ns
}
role := "argo-role"
if err := k.CreateRole(ctx, ns, role,
[][]string{{"coordination.k8s.io"}, {""}, {""}},
[][]string{{"leases"}, {"secrets"}, {"pods"}},
[][]string{{"get", "create", "update"}, {"get"}, {"patch"}},
[][]string{{"coordination.k8s.io"}, {""}, {""}, {"multicluster.admiralty.io"}},
[][]string{{"leases"}, {"secrets"}, {"pods"}, {"podchaperons"}},
[][]string{{"get", "create", "update"}, {"get"}, {"patch"}, {"get", "list", "watch", "create", "update", "patch", "delete"}},
); err != nil {
return err
}