Skip to content

Commit 31c652e

Browse files
authored
Add INSTALLED_AS for docker and swarm (#101)
1 parent a507bb7 commit 31c652e

5 files changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/docker-compose-match.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
run: |
3535
# Extract beyla service from docker-compose.yml, excluding build: and depends_on: sections
3636
# These sections are not applicable in the swarm beyla file
37+
# Also exclude INSTALLED_AS= line as it's intentionally different (docker vs swarm)
3738
awk '
3839
BEGIN { in_beyla = 0; skip_block = 0; block_indent = 0 }
3940
/^ beyla:$/ { in_beyla = 1; next }
@@ -54,16 +55,21 @@ jobs:
5455
}
5556
}
5657
58+
# Skip INSTALLED_AS line (intentionally different between docker and swarm)
59+
if (/INSTALLED_AS=/) { next }
60+
5761
if (skip_block == 0) {
5862
print
5963
}
6064
}
6165
' docker-compose.yml > /tmp/beyla-main.yml
6266
6367
# Extract beyla service from swarm file (skip header comments and services: line)
68+
# Also exclude INSTALLED_AS= line as it's intentionally different (docker vs swarm)
6469
awk '
6570
BEGIN { in_beyla = 0 }
6671
/^ beyla:$/ { in_beyla = 1; next }
72+
/INSTALLED_AS=/ { next }
6773
in_beyla == 1 { print }
6874
' swarm/docker-compose.swarm-beyla.yml > /tmp/beyla-swarm.yml
6975

docker-compose.seccomp.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ services:
2424
- HOSTNAME
2525
# Optional proxy port for upstream proxy mode
2626
- PROXY_PORT
27+
- INSTALLED_AS=docker
2728
volumes:
2829
# Mount host root filesystem to enable reading system metrics, logs (including logs outside /var/log), and container data
2930
# Can be customized via MOUNT_HOST_PATHS environment variable in install.sh to restrict access to specific paths
@@ -58,6 +59,7 @@ services:
5859
- HOSTNAME
5960
# Enable dockerprobe
6061
- ENABLE_DOCKERPROBE
62+
- INSTALLED_AS=docker
6163
volumes:
6264
- /sys/kernel/tracing:/sys/kernel/tracing:rw
6365
- /sys/kernel/debug:/sys/kernel/debug:rw

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ services:
2222
- HOSTNAME
2323
# Optional proxy port for upstream proxy mode
2424
- PROXY_PORT
25+
- INSTALLED_AS=docker
2526
volumes:
2627
# Mount host root filesystem to enable reading system metrics, logs (including logs outside /var/log), and container data
2728
# Can be customized via MOUNT_HOST_PATHS environment variable in install.sh to restrict access to specific paths
@@ -56,6 +57,7 @@ services:
5657
- HOSTNAME
5758
# Enable dockerprobe
5859
- ENABLE_DOCKERPROBE
60+
- INSTALLED_AS=docker
5961
volumes:
6062
- /sys/kernel/tracing:/sys/kernel/tracing:rw
6163
- /sys/kernel/debug:/sys/kernel/debug:rw

swarm/docker-compose.swarm-beyla.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ services:
3434
- HOSTNAME
3535
# Enable dockerprobe
3636
- ENABLE_DOCKERPROBE
37+
- INSTALLED_AS=swarm
3738
volumes:
3839
- /sys/kernel/tracing:/sys/kernel/tracing:rw
3940
- /sys/kernel/debug:/sys/kernel/debug:rw

swarm/docker-compose.swarm-collector.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ services:
3636
- VECTOR_LOG_FORMAT=json
3737
# Optional proxy port for upstream proxy mode
3838
- PROXY_PORT
39+
- INSTALLED_AS=swarm
3940
volumes:
4041
# Mount host root filesystem to enable reading system metrics, logs (including logs outside /var/log), and container data
4142
# Can be customized via MOUNT_HOST_PATHS environment variable in deploy-to-swarm.sh to restrict access to specific paths

0 commit comments

Comments
 (0)