-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inter-zone traffic monitoring (#1593)
- Loading branch information
Showing
12 changed files
with
445 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
kind: Cluster | ||
name: beyla | ||
nodes: | ||
- role: control-plane | ||
labels: | ||
# faking a multi-zone cluster | ||
topology.kubernetes.io/zone: control-plane-zone | ||
extraMounts: | ||
# configuration files that need to be mounted in the host | ||
- hostPath: ../../configs | ||
containerPath: /configs | ||
# testoutput folder to store coverage data | ||
- hostPath: ../../../../testoutput | ||
containerPath: /testoutput | ||
- role: worker | ||
labels: | ||
# faking a multi-zone cluster | ||
topology.kubernetes.io/zone: server-zone | ||
extraMounts: | ||
# configuration files that need to be mounted in the host | ||
- hostPath: ../../configs | ||
containerPath: /configs | ||
# testoutput folder to store coverage data | ||
- hostPath: ../../../../testoutput | ||
containerPath: /testoutput | ||
- role: worker | ||
labels: | ||
# faking a multi-zone cluster | ||
topology.kubernetes.io/zone: client-zone | ||
# otel collector needs to be placed here, due to port mappings | ||
deployment/zone: otel | ||
extraMounts: | ||
# configuration files that need to be mounted in the host | ||
- hostPath: ../../configs | ||
containerPath: /configs | ||
# testoutput folder to store coverage data | ||
- hostPath: ../../../../testoutput | ||
containerPath: /testoutput | ||
extraPortMappings: | ||
# to avoid having to do port-forwarding from the Go client (a bit cumbersome process), | ||
# we just make visible some container ports through host ports | ||
# hostPorts need to be in range 30000-32767 | ||
# containerPort must be the "hostPort" value that needs to be | ||
# exposed on each Pod container | ||
- containerPort: 8999 | ||
hostPort: 38999 | ||
- containerPort: 9090 | ||
hostPort: 39090 | ||
|
103 changes: 103 additions & 0 deletions
103
test/integration/k8s/manifests/05-uninstrumented-multizone-client-server.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# this file depends in the annotations and 00-kind-multi-node.yml to deploy a testserver | ||
# and a client in different nodes. | ||
# Beyla will instrument both, but restricting the metadata only to the local node, | ||
# so network flows between client and testserver would be incomplete | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: httppinger | ||
labels: | ||
component: httppinger | ||
# this label will trigger a deletion of beyla pods before tearing down | ||
# kind, to force Beyla writing the coverage data | ||
teardown: delete | ||
annotations: | ||
resource.opentelemetry.io/deployment.environment: integration-test | ||
resource.opentelemetry.io/service.version: '3.2.1' | ||
spec: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
# force multi-zone traffic: server is in us-west-1b | ||
- matchExpressions: | ||
- key: topology.kubernetes.io/zone | ||
operator: In | ||
values: | ||
- client-zone | ||
containers: | ||
- name: httppinger | ||
image: httppinger:dev | ||
env: | ||
- name: TARGET_URL | ||
value: "http://testserver:8080" | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: testserver | ||
spec: | ||
selector: | ||
app: testserver | ||
ports: | ||
- port: 8080 | ||
name: http0 | ||
targetPort: http0 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: testserver | ||
labels: | ||
app: testserver | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: testserver | ||
template: | ||
metadata: | ||
name: testserver | ||
labels: | ||
app: testserver | ||
# this label will trigger a deletion of beyla pods before tearing down | ||
# kind, to force Beyla writing the coverage data | ||
teardown: delete | ||
annotations: | ||
resource.opentelemetry.io/deployment.environment: integration-test | ||
resource.opentelemetry.io/service.version: '3.2.1' | ||
spec: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
# force multi-zone traffic: client is in us-west-1a | ||
- key: topology.kubernetes.io/zone | ||
operator: In | ||
values: | ||
- server-zone | ||
containers: | ||
- name: testserver | ||
image: testserver:dev | ||
imagePullPolicy: Never # loaded into Kind from localhost | ||
ports: | ||
# exposing hostports to enable operation from tests | ||
- containerPort: 8080 | ||
hostPort: 8080 | ||
name: http0 | ||
- containerPort: 8081 | ||
hostPort: 8081 | ||
name: http1 | ||
- containerPort: 8082 | ||
hostPort: 8082 | ||
name: http2 | ||
- containerPort: 8083 | ||
hostPort: 8083 | ||
name: http3 | ||
- containerPort: 5051 | ||
hostPort: 5051 | ||
name: grpc | ||
env: | ||
- name: LOG_LEVEL | ||
value: "DEBUG" |
Oops, something went wrong.