mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-12 05:43:34 +00:00
⚡ Add a default NodeSelectorTerm
that's matching Linux OS
This commit is contained in:
parent
a5efb6b625
commit
54c5da2fcb
@ -14,7 +14,21 @@ const (
|
||||
)
|
||||
|
||||
func CreateDefaultConfig() ConfigStruct {
|
||||
return ConfigStruct{}
|
||||
return ConfigStruct{
|
||||
Tap: configStructs.TapConfig{
|
||||
NodeSelectorTerms: []v1.NodeSelectorTerm{
|
||||
{
|
||||
MatchExpressions: []v1.NodeSelectorRequirement{
|
||||
{
|
||||
Key: "kubernetes.io/os",
|
||||
Operator: v1.NodeSelectorOpIn,
|
||||
Values: []string{"linux"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type KubeConfig struct {
|
||||
|
@ -1,38 +1,76 @@
|
||||
config: {}
|
||||
dumplogs: false
|
||||
headless: false
|
||||
kube:
|
||||
configpath: ""
|
||||
context: ""
|
||||
license: ""
|
||||
logs:
|
||||
file: ""
|
||||
manifests:
|
||||
dump: false
|
||||
scripting:
|
||||
env: null
|
||||
source: ""
|
||||
watchscripts: true
|
||||
tap:
|
||||
annotations: {}
|
||||
auth:
|
||||
approveddomains: []
|
||||
approvedemails: []
|
||||
enabled: false
|
||||
debug: false
|
||||
docker:
|
||||
imagepullpolicy: Always
|
||||
imagepullsecrets: null
|
||||
registry: docker.io/kubeshark
|
||||
tag: latest
|
||||
imagepullpolicy: Always
|
||||
imagepullsecrets: []
|
||||
dryrun: false
|
||||
ignoretainted: false
|
||||
ingress:
|
||||
certmanager: letsencrypt-prod
|
||||
classname: kubeshark-ingress-class
|
||||
controller: k8s.io/ingress-nginx
|
||||
enabled: false
|
||||
host: ks.svc.cluster.local
|
||||
tls: null
|
||||
ipv6: true
|
||||
kmm:
|
||||
enabled: true
|
||||
labels: {}
|
||||
namespaces: []
|
||||
nodeselectorterms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/os
|
||||
operator: In
|
||||
values:
|
||||
- linux
|
||||
packetcapture: libpcap
|
||||
pcap: ""
|
||||
persistentstorage: false
|
||||
proxy:
|
||||
worker:
|
||||
srvport: 8897
|
||||
hub:
|
||||
port: 8898
|
||||
srvport: 8898
|
||||
front:
|
||||
port: 8899
|
||||
host: 127.0.0.1
|
||||
hub:
|
||||
port: 8898
|
||||
srvport: 8898
|
||||
worker:
|
||||
srvport: 8897
|
||||
regex: .*
|
||||
namespaces: []
|
||||
release:
|
||||
repo: https://helm.kubeshark.co
|
||||
name: kubeshark
|
||||
namespace: default
|
||||
persistentstorage: false
|
||||
storagelimit: 200Mi
|
||||
storageclass: standard
|
||||
dryrun: false
|
||||
pcap: ""
|
||||
repo: https://helm.kubeshark.co
|
||||
resources:
|
||||
worker:
|
||||
hub:
|
||||
limits:
|
||||
cpu: 750m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 50Mi
|
||||
hub:
|
||||
worker:
|
||||
limits:
|
||||
cpu: 750m
|
||||
memory: 1Gi
|
||||
@ -40,36 +78,6 @@ tap:
|
||||
cpu: 50m
|
||||
memory: 50Mi
|
||||
servicemesh: true
|
||||
storageclass: standard
|
||||
storagelimit: 200Mi
|
||||
tls: true
|
||||
packetcapture: libpcap
|
||||
ignoretainted: false
|
||||
labels: {}
|
||||
annotations: {}
|
||||
nodeselectorterms: []
|
||||
auth:
|
||||
enabled: false
|
||||
approvedemails: []
|
||||
approveddomains: []
|
||||
ingress:
|
||||
enabled: false
|
||||
classname: kubeshark-ingress-class
|
||||
controller: k8s.io/ingress-nginx
|
||||
host: ks.svc.cluster.local
|
||||
tls: []
|
||||
certmanager: letsencrypt-prod
|
||||
kmm:
|
||||
enabled: true
|
||||
ipv6: true
|
||||
debug: false
|
||||
logs:
|
||||
file: ""
|
||||
kube:
|
||||
configpath: ""
|
||||
context: ""
|
||||
dumplogs: false
|
||||
headless: false
|
||||
license: ""
|
||||
scripting:
|
||||
env: {}
|
||||
source: ""
|
||||
watchscripts: true
|
||||
|
@ -2,6 +2,7 @@ package utils
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
@ -11,14 +12,27 @@ const (
|
||||
tab = "\t"
|
||||
)
|
||||
|
||||
func PrettyYaml(data interface{}) (string, error) {
|
||||
func PrettyYaml(data interface{}) (result string, err error) {
|
||||
var marshalled []byte
|
||||
marshalled, err = json.Marshal(data)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
var unmarshalled interface{}
|
||||
err = json.Unmarshal(marshalled, &unmarshalled)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
buffer := new(bytes.Buffer)
|
||||
encoder := yaml.NewEncoder(buffer)
|
||||
encoder.SetIndent(2)
|
||||
|
||||
err := encoder.Encode(data)
|
||||
err = encoder.Encode(unmarshalled)
|
||||
if err != nil {
|
||||
return empty, err
|
||||
return
|
||||
}
|
||||
return buffer.String(), nil
|
||||
result = buffer.String()
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user