mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-19 02:40:33 +00:00
⚡ Fix the issues in worker DaemonSet
This commit is contained in:
parent
f19db77228
commit
39d1b77045
@ -87,8 +87,8 @@ func runManifests() {
|
||||
frontService := kubernetesProvider.BuildFrontService(config.Config.Tap.SelfNamespace)
|
||||
|
||||
workerDaemonSet, err := kubernetesProvider.BuildWorkerDaemonSet(
|
||||
docker.GetWorkerImage(),
|
||||
kubernetes.WorkerDaemonSetName,
|
||||
kubernetes.WorkerPodName,
|
||||
kubernetes.ServiceAccountName,
|
||||
config.Config.Tap.Resources.Worker,
|
||||
config.Config.ImagePullPolicy(),
|
||||
|
@ -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{
|
||||
|
@ -9,9 +9,14 @@ import (
|
||||
applyconfmeta "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
type DaemonSetPod struct {
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
Spec core.PodSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||
}
|
||||
|
||||
type DaemonSetSpec struct {
|
||||
Selector metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
|
||||
Template core.Pod `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"`
|
||||
Template DaemonSetPod `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"`
|
||||
}
|
||||
|
||||
type DaemonSet struct {
|
||||
|
@ -2,21 +2,26 @@ apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
app: kubeshark-worker-daemon-set
|
||||
kubeshark-created-by: kubeshark
|
||||
kubeshark-managed-by: kubeshark
|
||||
name: kubeshark-worker-daemon-set
|
||||
namespace: kubeshark
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: kubeshark-worker
|
||||
app: kubeshark-worker-daemon-set
|
||||
kubeshark-created-by: kubeshark
|
||||
kubeshark-managed-by: kubeshark
|
||||
template:
|
||||
kind: Pod
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
app: kubeshark-worker
|
||||
app: kubeshark-worker-daemon-set
|
||||
kubeshark-created-by: kubeshark
|
||||
kubeshark-managed-by: kubeshark
|
||||
name: kubeshark-worker
|
||||
name: kubeshark-worker-daemon-set
|
||||
namespace: kubeshark
|
||||
spec:
|
||||
containers:
|
||||
@ -30,9 +35,9 @@ spec:
|
||||
- -tls
|
||||
- -procfs
|
||||
- /hostproc
|
||||
image: kubeshark-worker-daemon-set
|
||||
image: docker.io/kubeshark/worker:latest
|
||||
imagePullPolicy: Always
|
||||
name: kubeshark-worker
|
||||
name: kubeshark-worker-daemon-set
|
||||
resources:
|
||||
limits:
|
||||
cpu: 750m
|
||||
@ -74,4 +79,3 @@ spec:
|
||||
- hostPath:
|
||||
path: /sys
|
||||
name: sys
|
||||
status: {}
|
||||
|
Loading…
Reference in New Issue
Block a user