Skip to content

Commit

Permalink
Merge pull request #481 from kubescape/multiply-node-agent
Browse files Browse the repository at this point in the history
Multiplying the node-agent for testing purposes
  • Loading branch information
slashben committed Aug 15, 2024
2 parents 469bb11 + 0a63d0a commit f6fe406
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
11 changes: 11 additions & 0 deletions charts/kubescape-operator/templates/node-agent/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
{{- if $components.nodeAgent.enabled }}
{{- $no_proxy_envar_list := (include "no_proxy_envar_list" .) -}}
apiVersion: apps/v1
{{- if .Values.capabilities.testing.nodeAgentMultiplication.enabled }}
kind: StatefulSet
{{- else }}
kind: DaemonSet
{{- end }}
metadata:
name: {{ .Values.nodeAgent.name }}
namespace: {{ .Values.ksNamespace }}
Expand All @@ -15,6 +19,9 @@ metadata:
kubescape.io/ignore: "true"
kubescape.io/tier: "core"
spec:
{{- if .Values.capabilities.testing.nodeAgentMultiplication.enabled }}
replicas: {{ .Values.capabilities.testing.nodeAgentMultiplication.replicas }}
{{- end }}
selector:
matchLabels:
app.kubernetes.io/name: {{ .Values.nodeAgent.name }}
Expand Down Expand Up @@ -175,6 +182,10 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if .Values.capabilities.testing.nodeAgentMultiplication.enabled }}
- name: MULTIPLY
value: "true"
{{- end }}
{{- range .Values.nodeAgent.env }}
- name: {{ .name }}
{{- if .value }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ all capabilities:
data:
capabilities: |
{
"capabilities":{"admissionController":"enable","autoUpgrading":"enable","configurationScan":"enable","continuousScan":"enable","malwareDetection":"enable","networkPolicyService":"enable","nodeProfileService":"enable","nodeScan":"enable","prometheusExporter":"enable","relevancy":"enable","runtimeDetection":"enable","runtimeObservability":"enable","seccompProfileService":"enable","vexGeneration":"enable","vulnerabilityScan":"enable"},
"capabilities":{"admissionController":"enable","autoUpgrading":"enable","configurationScan":"enable","continuousScan":"enable","malwareDetection":"enable","networkPolicyService":"enable","nodeProfileService":"enable","nodeScan":"enable","prometheusExporter":"enable","relevancy":"enable","runtimeDetection":"enable","runtimeObservability":"enable","seccompProfileService":"enable","testing":{"nodeAgentMultiplication":{"enabled":false,"replicas":5}},"vexGeneration":"enable","vulnerabilityScan":"enable"},
"components":{"autoUpdater":{"enabled":true},"clamAV":{"enabled":true},"cloudSecret":{"create":true,"name":"cloud-secret"},"customCaCertificates":{"name":"custom-ca-certificates"},"gateway":{"enabled":true},"hostScanner":{"enabled":true},"kollector":{"enabled":true},"kubescape":{"enabled":true},"kubescapeScheduler":{"enabled":true},"kubevuln":{"enabled":true},"kubevulnScheduler":{"enabled":true},"nodeAgent":{"enabled":true},"operator":{"enabled":true},"otelCollector":{"enabled":true},"prometheusExporter":{"enabled":true},"serviceDiscovery":{"enabled":true},"storage":{"enabled":true},"synchronizer":{"enabled":true}},
"configurations":{"otelUrl":"otelCollector:4317","persistence":"enable","priorityClass":{"daemonset":100000100,"enabled":true},"prometheusAnnotations":"disable"} ,
"serviceScanConfig" :{"enabled":false,"interval":"1h"}
Expand Down Expand Up @@ -2717,7 +2717,7 @@ all capabilities:
template:
metadata:
annotations:
checksum/capabilities-config: a342ca42e66215c86feca39a986f1586977085f0884e1bee1e5c0ab1bd4e63db
checksum/capabilities-config: 5903e6c17bebc098935b0e7256f8789daeb8d83901ed115ad86423fd128cbb1b
checksum/cloud-config: c4dc912bbe62b0d5fd4734206c3cae52f56d766cbc20024182a2bcef09c0ae8e
checksum/cloud-secret: 8665d3f0f7282091716b5fbf7356972eb83a5a9e86eb064218d24e9f66612b99
checksum/matching-rules-config: 9282b3916f506ac98eccbdfe686271420ff520374de611f7efce8235dcdf8809
Expand Down Expand Up @@ -4609,7 +4609,7 @@ default capabilities:
data:
capabilities: |
{
"capabilities":{"admissionController":"disable","autoUpgrading":"disable","configurationScan":"enable","continuousScan":"disable","malwareDetection":"disable","networkPolicyService":"enable","nodeProfileService":"disable","nodeScan":"enable","prometheusExporter":"disable","relevancy":"enable","runtimeDetection":"disable","runtimeObservability":"enable","seccompProfileService":"enable","vexGeneration":"disable","vulnerabilityScan":"enable"},
"capabilities":{"admissionController":"disable","autoUpgrading":"disable","configurationScan":"enable","continuousScan":"disable","malwareDetection":"disable","networkPolicyService":"enable","nodeProfileService":"disable","nodeScan":"enable","prometheusExporter":"disable","relevancy":"enable","runtimeDetection":"disable","runtimeObservability":"enable","seccompProfileService":"enable","testing":{"nodeAgentMultiplication":{"enabled":false,"replicas":5}},"vexGeneration":"disable","vulnerabilityScan":"enable"},
"components":{"autoUpdater":{"enabled":false},"clamAV":{"enabled":false},"cloudSecret":{"create":true,"name":"cloud-secret"},"customCaCertificates":{"name":"custom-ca-certificates"},"gateway":{"enabled":true},"hostScanner":{"enabled":true},"kollector":{"enabled":true},"kubescape":{"enabled":true},"kubescapeScheduler":{"enabled":true},"kubevuln":{"enabled":true},"kubevulnScheduler":{"enabled":true},"nodeAgent":{"enabled":true},"operator":{"enabled":true},"otelCollector":{"enabled":true},"prometheusExporter":{"enabled":false},"serviceDiscovery":{"enabled":true},"storage":{"enabled":true},"synchronizer":{"enabled":true}},
"configurations":{"otelUrl":"otelCollector:4317","persistence":"enable","priorityClass":{"daemonset":100000100,"enabled":true},"prometheusAnnotations":"disable"} ,
"serviceScanConfig" :{"enabled":false,"interval":"1h"}
Expand Down Expand Up @@ -6871,7 +6871,7 @@ default capabilities:
template:
metadata:
annotations:
checksum/capabilities-config: 8080550c1a912959e856495e8fb4526a4abb6feddf7c5ed8f5b8e8f2cefbe50b
checksum/capabilities-config: 44f2737319d0997fb7c5ea2a9c656c3bc60a9fa87966f654d592684655d7732e
checksum/cloud-config: 98e72a3a1a24264d2cdebc86b61829ee5b941fb590d6ca717ebaa880922046c6
checksum/cloud-secret: 8665d3f0f7282091716b5fbf7356972eb83a5a9e86eb064218d24e9f66612b99
checksum/matching-rules-config: 9282b3916f506ac98eccbdfe686271420ff520374de611f7efce8235dcdf8809
Expand Down Expand Up @@ -8505,7 +8505,7 @@ disable otel:
data:
capabilities: |
{
"capabilities":{"admissionController":"disable","autoUpgrading":"disable","configurationScan":"enable","continuousScan":"disable","malwareDetection":"disable","networkPolicyService":"enable","nodeProfileService":"disable","nodeScan":"enable","prometheusExporter":"disable","relevancy":"enable","runtimeDetection":"disable","runtimeObservability":"enable","seccompProfileService":"enable","vexGeneration":"disable","vulnerabilityScan":"enable"},
"capabilities":{"admissionController":"disable","autoUpgrading":"disable","configurationScan":"enable","continuousScan":"disable","malwareDetection":"disable","networkPolicyService":"enable","nodeProfileService":"disable","nodeScan":"enable","prometheusExporter":"disable","relevancy":"enable","runtimeDetection":"disable","runtimeObservability":"enable","seccompProfileService":"enable","testing":{"nodeAgentMultiplication":{"enabled":false,"replicas":5}},"vexGeneration":"disable","vulnerabilityScan":"enable"},
"components":{"autoUpdater":{"enabled":false},"clamAV":{"enabled":false},"cloudSecret":{"create":true,"name":"cloud-secret"},"customCaCertificates":{"name":"custom-ca-certificates"},"gateway":{"enabled":true},"hostScanner":{"enabled":true},"kollector":{"enabled":true},"kubescape":{"enabled":true},"kubescapeScheduler":{"enabled":true},"kubevuln":{"enabled":true},"kubevulnScheduler":{"enabled":true},"nodeAgent":{"enabled":true},"operator":{"enabled":true},"otelCollector":{"enabled":true},"prometheusExporter":{"enabled":false},"serviceDiscovery":{"enabled":true},"storage":{"enabled":true},"synchronizer":{"enabled":true}},
"configurations":{"persistence":"enable","priorityClass":{"daemonset":100000100,"enabled":true},"prometheusAnnotations":"disable"} ,
"serviceScanConfig" :{"enabled":false,"interval":"1h"}
Expand Down Expand Up @@ -10246,7 +10246,7 @@ disable otel:
template:
metadata:
annotations:
checksum/capabilities-config: 22df21a26a93a5ef90a0efcb9a6dd81db2984092cd7cd2e6bf4343c11ebc0add
checksum/capabilities-config: 1d96df9621c6fc4249bf372a1a7d328adbb018b48b120fc211f8bb55d2bd937f
checksum/cloud-config: d86e4cf3e23bd0c1f8294391eb1cf93ab4eb95040706cb65e18dd8e41570bfb6
checksum/cloud-secret: 8665d3f0f7282091716b5fbf7356972eb83a5a9e86eb064218d24e9f66612b99
checksum/matching-rules-config: 9282b3916f506ac98eccbdfe686271420ff520374de611f7efce8235dcdf8809
Expand Down Expand Up @@ -11663,7 +11663,7 @@ minimal capabilities:
data:
capabilities: |
{
"capabilities":{"admissionController":"disable","autoUpgrading":"disable","configurationScan":"enable","continuousScan":"disable","malwareDetection":"disable","networkPolicyService":"enable","nodeProfileService":"disable","nodeScan":"enable","prometheusExporter":"disable","relevancy":"enable","runtimeDetection":"disable","runtimeObservability":"enable","seccompProfileService":"enable","vexGeneration":"disable","vulnerabilityScan":"enable"},
"capabilities":{"admissionController":"disable","autoUpgrading":"disable","configurationScan":"enable","continuousScan":"disable","malwareDetection":"disable","networkPolicyService":"enable","nodeProfileService":"disable","nodeScan":"enable","prometheusExporter":"disable","relevancy":"enable","runtimeDetection":"disable","runtimeObservability":"enable","seccompProfileService":"enable","testing":{"nodeAgentMultiplication":{"enabled":false,"replicas":5}},"vexGeneration":"disable","vulnerabilityScan":"enable"},
"components":{"autoUpdater":{"enabled":false},"clamAV":{"enabled":false},"cloudSecret":{"create":true,"name":"cloud-secret"},"customCaCertificates":{"name":"custom-ca-certificates"},"gateway":{"enabled":false},"hostScanner":{"enabled":true},"kollector":{"enabled":false},"kubescape":{"enabled":true},"kubescapeScheduler":{"enabled":false},"kubevuln":{"enabled":true},"kubevulnScheduler":{"enabled":false},"nodeAgent":{"enabled":true},"operator":{"enabled":true},"otelCollector":{"enabled":true},"prometheusExporter":{"enabled":false},"serviceDiscovery":{"enabled":false},"storage":{"enabled":true},"synchronizer":{"enabled":false}},
"configurations":{"otelUrl":"otelCollector:4317","persistence":"enable","priorityClass":{"daemonset":100000100,"enabled":true},"prometheusAnnotations":"disable"} ,
"serviceScanConfig" :{"enabled":false,"interval":"1h"}
Expand Down Expand Up @@ -12910,7 +12910,7 @@ minimal capabilities:
template:
metadata:
annotations:
checksum/capabilities-config: 7e3ff836d6b9441f7e977cd4f5090f17c516ed925cd75004d63cc4f639891566
checksum/capabilities-config: 77dc181edfec59a65cc109383430d890c400a9d44ef03f6b8c70aac925ce6c4d
checksum/cloud-config: c8580dbb81fa1c832dc787a966fc068feacfb2ee7f67fdd928c256f4094ad656
checksum/cloud-secret: baefa7c2a6f06e1afdaffb0829d1caf36ff7428773197f1e5ca4731c132ecb78
checksum/matching-rules-config: 9282b3916f506ac98eccbdfe686271420ff520374de611f7efce8235dcdf8809
Expand Down
5 changes: 5 additions & 0 deletions charts/kubescape-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ capabilities:
prometheusExporter: disable
# seccompGenerator: disable

testing:
nodeAgentMultiplication:
enabled: false
replicas: 5

serviceScanConfig:
enabled : false
interval: 1h
Expand Down

0 comments on commit f6fe406

Please sign in to comment.