feat: implement run and run:detached

This utilizes a Kubernetes Job to start a pod in order to take advantage of completed Job cleanup in Kubernetes. It also properly handles interactivity by ensuring the container has a TTY.

Note that there is currently no provision for parsing docker arguments and translating them into their Kubernetes equivalents.
This commit is contained in:
Jose Diaz-Gonzalez committed 2024-01-23 03:00:27 -05:00
1 parent 6b85374857
commit 8b8444fb1f
10 files changed
+833 -115

No files matched your search

+2
View File
@@ -5,6 +5,7 @@ import (
traefikv1alpha1 "github.com/traefik/traefik/v2/pkg/provider/kubernetes/crd/traefikio/v1alpha1"
appsv1 "k8s.io/api/apps/v1"
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/serializer"
@@ -43,6 +44,7 @@ var k8sNativeSchemeOnce sync.Once
func init() {
k8sNativeSchemeOnce.Do(func() {
_ = appsv1.AddToScheme(runtimeScheme)
_ = batchv1.AddToScheme(runtimeScheme)
_ = corev1.AddToScheme(runtimeScheme)
_ = traefikv1alpha1.AddToScheme(runtimeScheme)
})