style(host-sensor): move kube-host-sensor manifest to indipendent yaml file

This commit is contained in:
alegrey91
2022-01-10 18:39:06 +01:00
parent 2bb612ca3f
commit 392625b774
2 changed files with 8 additions and 4 deletions
@@ -1,6 +1,4 @@
package hostsensorutils
const hostSensorYAML = `apiVersion: v1
apiVersion: v1
kind: Namespace
metadata:
labels:
@@ -62,4 +60,4 @@ spec:
name: host-filesystem
hostNetwork: true
hostPID: true
hostIPC: true`
hostIPC: true
+6
View File
@@ -1,6 +1,7 @@
package hostsensorutils
import (
_ "embed"
"fmt"
"io"
"strings"
@@ -18,6 +19,11 @@ import (
coreapplyv1 "k8s.io/client-go/applyconfigurations/core/v1"
)
var (
//go:embed hostsensor.yaml
hostSensorYAML string
)
type HostSensorHandler struct {
HostSensorPort int32
HostSensorPodNames map[string]string //map from pod names to node names