feat: mark created namespaces as managed by dokku

This commit is contained in:
Jose Diaz-Gonzalez
2024-01-18 00:24:50 -05:00
parent 46b6f446fd
commit dfa7d0f78c

View File

@@ -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{})