mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-01 18:47:39 +00:00
⚡ Move ResourceLabels
and NodeSelectorTerms
fields into TapConfig
This commit is contained in:
@@ -280,11 +280,11 @@ func (provider *Provider) BuildHubPod(opts *PodOptions) (*core.Pod, error) {
|
||||
},
|
||||
}
|
||||
|
||||
if len(config.Config.NodeSelectorTerms) > 0 {
|
||||
if len(config.Config.Tap.NodeSelectorTerms) > 0 {
|
||||
pod.Spec.Affinity = &core.Affinity{
|
||||
NodeAffinity: &core.NodeAffinity{
|
||||
RequiredDuringSchedulingIgnoredDuringExecution: &core.NodeSelector{
|
||||
NodeSelectorTerms: config.Config.NodeSelectorTerms,
|
||||
NodeSelectorTerms: config.Config.Tap.NodeSelectorTerms,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -390,11 +390,11 @@ func (provider *Provider) BuildFrontPod(opts *PodOptions, hubHost string, hubPor
|
||||
},
|
||||
}
|
||||
|
||||
if len(config.Config.NodeSelectorTerms) > 0 {
|
||||
if len(config.Config.Tap.NodeSelectorTerms) > 0 {
|
||||
pod.Spec.Affinity = &core.Affinity{
|
||||
NodeAffinity: &core.NodeAffinity{
|
||||
RequiredDuringSchedulingIgnoredDuringExecution: &core.NodeSelector{
|
||||
NodeSelectorTerms: config.Config.NodeSelectorTerms,
|
||||
NodeSelectorTerms: config.Config.Tap.NodeSelectorTerms,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -849,11 +849,11 @@ func (provider *Provider) BuildWorkerDaemonSet(
|
||||
},
|
||||
}
|
||||
|
||||
if len(config.Config.NodeSelectorTerms) > 0 {
|
||||
if len(config.Config.Tap.NodeSelectorTerms) > 0 {
|
||||
pod.Spec.Affinity = &core.Affinity{
|
||||
NodeAffinity: &core.NodeAffinity{
|
||||
RequiredDuringSchedulingIgnoredDuringExecution: &core.NodeSelector{
|
||||
NodeSelectorTerms: config.Config.NodeSelectorTerms,
|
||||
NodeSelectorTerms: config.Config.Tap.NodeSelectorTerms,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@ func buildWithDefaultLabels(labels map[string]string, provider *Provider) map[st
|
||||
labels[LabelManagedBy] = provider.managedBy
|
||||
labels[LabelCreatedBy] = provider.createdBy
|
||||
|
||||
for k, v := range config.Config.ResourceLabels {
|
||||
for k, v := range config.Config.Tap.ResourceLabels {
|
||||
labels[k] = v
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user