From dfa7d0f78c78d0a14ffd167909670b78cec3e4fc Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 18 Jan 2024 00:24:50 -0500 Subject: [PATCH] feat: mark created namespaces as managed by dokku --- plugins/scheduler-k3s/functions.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/scheduler-k3s/functions.go b/plugins/scheduler-k3s/functions.go index c8ec555e4..314a6d6d2 100644 --- a/plugins/scheduler-k3s/functions.go +++ b/plugins/scheduler-k3s/functions.go @@ -101,6 +101,12 @@ func createKubernetesNamespace(ctx context.Context, namespaceName string) error namespace := &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Name: namespaceName, + Annotations: map[string]string{ + "dokku.com/managed": "true", + }, + Labels: map[string]string{ + "dokku.com/managed": "true", + }, }, } _, err = clientset.Client.CoreV1().Namespaces().Create(ctx, namespace, metav1.CreateOptions{})