Fix the issues in worker DaemonSet

This commit is contained in:
M. Mert Yildiran
2023-04-11 02:33:17 +03:00
parent f19db77228
commit 39d1b77045
4 changed files with 26 additions and 13 deletions

View File

@@ -809,10 +809,7 @@ func (provider *Provider) BuildWorkerDaemonSet(
}
// Pod
pod := core.Pod{
TypeMeta: metav1.TypeMeta{
Kind: "Pod",
},
pod := DaemonSetPod{
ObjectMeta: metav1.ObjectMeta{
Name: podName,
Namespace: config.Config.Tap.SelfNamespace,
@@ -847,6 +844,13 @@ func (provider *Provider) BuildWorkerDaemonSet(
Kind: "DaemonSet",
APIVersion: "apps/v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: podName,
Namespace: config.Config.Tap.SelfNamespace,
Labels: buildWithDefaultLabels(map[string]string{
"app": podName,
}, provider),
},
Spec: DaemonSetSpec{
Selector: metav1.LabelSelector{
MatchLabels: buildWithDefaultLabels(map[string]string{