🔥 Remove --hub-ws-address flag and max-live-streams option

This commit is contained in:
M. Mert Yildiran
2022-12-11 11:52:33 +03:00
parent 48e5c2f9c2
commit 5973a77cf8
5 changed files with 2 additions and 13 deletions

View File

@@ -48,7 +48,6 @@ type WorkerSyncerConfig struct {
KubesharkServiceAccountExists bool
ServiceMesh bool
Tls bool
MaxLiveStreams int
}
func CreateAndStartWorkerSyncer(ctx context.Context, kubernetesProvider *Provider, config WorkerSyncerConfig, startTime time.Time) (*WorkerSyncer, error) {
@@ -371,7 +370,6 @@ func (workerSyncer *WorkerSyncer) updateWorkers() error {
WorkerDaemonSetName,
image,
WorkerPodName,
fmt.Sprintf("%s.%s.svc", HubPodName, workerSyncer.config.KubesharkResourcesNamespace),
nodeNames,
serviceAccountName,
workerSyncer.config.WorkerResources,
@@ -379,8 +377,7 @@ func (workerSyncer *WorkerSyncer) updateWorkers() error {
workerSyncer.config.KubesharkApiFilteringOptions,
workerSyncer.config.LogLevel,
workerSyncer.config.ServiceMesh,
workerSyncer.config.Tls,
workerSyncer.config.MaxLiveStreams); err != nil {
workerSyncer.config.Tls); err != nil {
return err
}

View File

@@ -10,7 +10,6 @@ import (
"net/url"
"path/filepath"
"regexp"
"strconv"
"github.com/kubeshark/base/pkg/api"
"github.com/kubeshark/base/pkg/models"
@@ -781,7 +780,7 @@ func (provider *Provider) CreateConfigMap(ctx context.Context, namespace string,
return nil
}
func (provider *Provider) ApplyWorkerDaemonSet(ctx context.Context, namespace string, daemonSetName string, podImage string, workerPodName string, hubPodIp string, nodeNames []string, serviceAccountName string, resources models.Resources, imagePullPolicy core.PullPolicy, kubesharkApiFilteringOptions api.TrafficFilteringOptions, logLevel zerolog.Level, serviceMesh bool, tls bool, maxLiveStreams int) error {
func (provider *Provider) ApplyWorkerDaemonSet(ctx context.Context, namespace string, daemonSetName string, podImage string, workerPodName string, nodeNames []string, serviceAccountName string, resources models.Resources, imagePullPolicy core.PullPolicy, kubesharkApiFilteringOptions api.TrafficFilteringOptions, logLevel zerolog.Level, serviceMesh bool, tls bool) error {
log.Debug().
Int("node-count", len(nodeNames)).
Str("namespace", namespace).
@@ -802,9 +801,6 @@ func (provider *Provider) ApplyWorkerDaemonSet(ctx context.Context, namespace st
kubesharkCmd := []string{
"./worker",
"-i", "any",
"--hub-ws-address", fmt.Sprintf("ws://%s/wsWorker", hubPodIp),
"--nodefrag",
"--max-live-streams", strconv.Itoa(maxLiveStreams),
}
if serviceMesh {