Skip to content

Commit 5fc4b57

Browse files
authored
Merge pull request #32 from k8sstormcenter/entlein/adaptive-export-config
adaptive export config
2 parents 572dfb1 + e54adc0 commit 5fc4b57

9 files changed

Lines changed: 410 additions & 156 deletions

File tree

.github/workflows/trivy_fs.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ jobs:
2323
security-events: write
2424
steps:
2525
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26-
- uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # v0.29.0
26+
# v0.36.0 released 2026-04-22 (post-incident). Internally SHA-pins
27+
# setup-trivy@3fb12ec = Aqua's safe v0.2.6 per GHSA-69fq-xp46-6x23.
28+
- uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
2729
with:
2830
scan-type: 'fs'
2931
ignore-unfixed: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ skaffold_build/
6868

6969
# Hide generated .deb files
7070
*.deb
71+
*.local
7172

7273
compile_commands.json
7374
clang_tidy.log

k8s/vizier/bootstrap/adaptive_export_deployment.yaml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,12 @@ spec:
1818
nodeAffinity:
1919
requiredDuringSchedulingIgnoredDuringExecution:
2020
nodeSelectorTerms:
21+
# The beta.kubernetes.io/os label has been deprecated since
22+
# k8s v1.14; every modern kubelet sets kubernetes.io/os. The
23+
# single term below is enough — kept both ORed terms in the
24+
# past for pre-1.14 compatibility.
2125
- matchExpressions:
2226
- key: kubernetes.io/os
23-
operator: Exists
24-
- key: kubernetes.io/os
25-
operator: In
26-
values:
27-
- linux
28-
- matchExpressions:
29-
- key: beta.kubernetes.io/os
30-
operator: Exists
31-
- key: beta.kubernetes.io/os
3227
operator: In
3328
values:
3429
- linux
@@ -57,6 +52,31 @@ spec:
5752
value: "10"
5853
- name: DETECTION_LOOKBACK_SEC
5954
value: "30"
55+
# EXPORT_MODE controls the reconcile behaviour:
56+
# auto - detection drives on/off (default)
57+
# always - plugin always enabled (bypass detection)
58+
# never - plugin always disabled and ch-* scripts purged
59+
- name: EXPORT_MODE
60+
value: "auto"
61+
# Number of consecutive empty detection ticks before auto-disable fires.
62+
- name: EXPORT_QUIET_TICKS
63+
value: "6"
64+
# Optional overrides for the ClickHouse PxL scripts. When unset they are
65+
# parsed from CLICKHOUSE_DSN. Individual fields win over the parsed DSN.
66+
# Defaults below match soc/tree/clickhouse-lab (forensic-soc-db CHI,
67+
# ingest_writer user, forensic_db database).
68+
- name: KUBESCAPE_TABLE
69+
value: "kubescape_logs"
70+
# - name: CLICKHOUSE_HOST
71+
# value: "clickhouse-forensic-soc-db.clickhouse.svc.cluster.local"
72+
# - name: CLICKHOUSE_PORT
73+
# value: "9000"
74+
# - name: CLICKHOUSE_USER
75+
# value: "ingest_writer"
76+
# - name: CLICKHOUSE_PASSWORD
77+
# value: "changeme-ingest"
78+
# - name: CLICKHOUSE_DATABASE
79+
# value: "forensic_db"
6080
securityContext:
6181
allowPrivilegeEscalation: false
6282
capabilities:

k8s/vizier/bootstrap/adaptive_export_secrets.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ type: Opaque
77
stringData:
88
# Replace with your actual Pixie API key from https://work.withpixie.ai
99
pixie-api-key: "PIXIE_API_KEY_PLACEHOLDER"
10-
# Replace with your ClickHouse DSN: clickhouse://user:password@host:port/database
11-
clickhouse-dsn: "otelcollector:otelcollectorpass@hyperdx-hdx-oss-v2-clickhouse.click.svc.cluster.local:9000/default"
10+
# ClickHouse DSN matches soc/tree/clickhouse-lab (CHI "forensic-soc-db",
11+
# ingest_writer user with INSERT rights into the forensic_db database).
12+
# Format: user:password@host:port/database
13+
clickhouse-dsn: >-
14+
ingest_writer:changeme-ingest@clickhouse-forensic-soc-db.clickhouse.svc.cluster.local:9000/forensic_db

src/stirling/source_connectors/socket_tracer/testing/container_images/BUILD.bazel

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,29 @@ package(default_visibility = [
2424

2525
# Generate all Go container library permutations for supported Go versions.
2626
go_container_libraries(
27-
container_type = "grpc_server",
2827
bazel_sdk_versions = pl_all_supported_go_sdk_versions,
28+
container_type = "grpc_server",
2929
prebuilt_container_versions = pl_go_test_versions,
3030
)
3131

3232
# Stirling test cases usually test server side tracing. Therefore
3333
# we only need to provide the bazel SDK versions for the client containers.
3434
go_container_libraries(
35-
container_type = "grpc_client",
3635
bazel_sdk_versions = pl_all_supported_go_sdk_versions,
36+
container_type = "grpc_client",
3737
)
3838

3939
go_container_libraries(
40-
container_type = "tls_server",
4140
bazel_sdk_versions = pl_all_supported_go_sdk_versions,
41+
container_type = "tls_server",
4242
prebuilt_container_versions = pl_go_test_versions,
4343
)
4444

4545
# Stirling test cases usually test server side tracing. Therefore
4646
# we only need to provide the bazel SDK versions for the client containers.
4747
go_container_libraries(
48-
container_type = "tls_client",
4948
bazel_sdk_versions = pl_all_supported_go_sdk_versions,
49+
container_type = "tls_client",
5050
)
5151

5252
pl_cc_test_library(

0 commit comments

Comments
 (0)