Skip to content

Conversation

@jra3
Copy link
Collaborator

@jra3 jra3 commented Jul 10, 2025

It's just agent now

@jra3 jra3 merged commit eac1736 into main Jul 10, 2025
@jra3 jra3 deleted the jallen/fix-load-image branch July 22, 2025 22:54
jra3 added a commit that referenced this pull request Oct 9, 2025
… stripping

add container-specific human-readable identifier fields (container_name, workload_name) to metadata extraction and container graph nodes, enabling intuitive container identification across all runtimes without duplicating kubernetes pod-level fields.

container_name extraction:
- prioritize kubernetes container name from io.kubernetes.container.name label
- fall back to docker compose service name (com.docker.compose.service)
- default to image name when no explicit container name available
- provides consistent naming across kubernetes, docker, containerd, cri-o, podman runtimes

workload_name extraction with hash stripping:
- derive workload names from kubernetes pod names by stripping generated hashes
- strip both replicaset hash and pod hash (e.g., "web-server-7d4f8bd9c-abc12" -> "web-server")
- detect kubernetes hashes using alphanumeric pattern matching (5-10 chars with both letters and digits)
- preserve non-deployment pod names like statefulsets ("cassandra-0" -> "cassandra-0")
- only populate for kubernetes containers (requires io.kubernetes.pod.name label)

integration:
- add fields to internal/containers/graph/builder.go ContainerInfo struct
- populate fields in graph/nodes.go createContainerNode()
- extract names in manager.go collectRuntimeSnapshot() with sample logging
- update protobuf bindings (pkg/api/antimetal/runtime/v1/linux.pb.go) from jra3-apis PR #14

design decisions:
- container-specific fields only (no duplication of pod name, namespace, app)
- pod-level fields available via kubernetes pod resources and container->pod relationships
- graceful degradation when labels unavailable (fields remain empty)
- hash detection algorithm balances precision (avoid false positives) with recall (catch k8s hashes)

testing:
- 24 test cases across 6 test functions
- comprehensive coverage of extractHumanNames() with kubernetes/docker/fallback scenarios
- thorough stripPodHash() testing with deployments, statefulsets, edge cases
- helper function tests (isAlphanumeric, isKubernetesHash)

Note: 🤖 This commit includes significant code written with Claude Code assistance

Depends-On: jra3-apis#14
jra3 added a commit that referenced this pull request Oct 21, 2025
… stripping

add container-specific human-readable identifier fields (container_name, workload_name) to metadata extraction and container graph nodes, enabling intuitive container identification across all runtimes without duplicating kubernetes pod-level fields.

container_name extraction:
- prioritize kubernetes container name from io.kubernetes.container.name label
- fall back to docker compose service name (com.docker.compose.service)
- default to image name when no explicit container name available
- provides consistent naming across kubernetes, docker, containerd, cri-o, podman runtimes

workload_name extraction with hash stripping:
- derive workload names from kubernetes pod names by stripping generated hashes
- strip both replicaset hash and pod hash (e.g., "web-server-7d4f8bd9c-abc12" -> "web-server")
- detect kubernetes hashes using alphanumeric pattern matching (5-10 chars with both letters and digits)
- preserve non-deployment pod names like statefulsets ("cassandra-0" -> "cassandra-0")
- only populate for kubernetes containers (requires io.kubernetes.pod.name label)

integration:
- add fields to internal/containers/graph/builder.go ContainerInfo struct
- populate fields in graph/nodes.go createContainerNode()
- extract names in manager.go collectRuntimeSnapshot() with sample logging
- update protobuf bindings (pkg/api/antimetal/runtime/v1/linux.pb.go) from jra3-apis PR #14

design decisions:
- container-specific fields only (no duplication of pod name, namespace, app)
- pod-level fields available via kubernetes pod resources and container->pod relationships
- graceful degradation when labels unavailable (fields remain empty)
- hash detection algorithm balances precision (avoid false positives) with recall (catch k8s hashes)

testing:
- 24 test cases across 6 test functions
- comprehensive coverage of extractHumanNames() with kubernetes/docker/fallback scenarios
- thorough stripPodHash() testing with deployments, statefulsets, edge cases
- helper function tests (isAlphanumeric, isKubernetesHash)

Note: 🤖 This commit includes significant code written with Claude Code assistance

Depends-On: jra3-apis#14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants