-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add e2e test case for multi-cluster by exposing OTEL collector. (#1956)
- Loading branch information
1 parent
0a36bf9
commit c6531de
Showing
14 changed files
with
721 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: project.openshift.io/v1 | ||
kind: Project | ||
metadata: | ||
name: kuttl-multi-cluster-send | ||
status: | ||
phase: Active | ||
|
||
apiVersion: project.openshift.io/v1 | ||
kind: Project | ||
metadata: | ||
name: kuttl-multi-cluster-receive | ||
status: | ||
phase: Active |
10 changes: 10 additions & 0 deletions
10
tests/e2e-openshift/multi-cluster/00-create-namespaces.yaml
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,10 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: kuttl-multi-cluster-send | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: kuttl-multi-cluster-receive |
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,126 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: jaeger | ||
app.kubernetes.io/component: all-in-one | ||
app.kubernetes.io/instance: jaeger-allinone | ||
app.kubernetes.io/managed-by: jaeger-operator | ||
app.kubernetes.io/name: jaeger-allinone | ||
app.kubernetes.io/part-of: jaeger | ||
name: jaeger-allinone | ||
namespace: kuttl-multi-cluster-receive | ||
status: | ||
availableReplicas: 1 | ||
readyReplicas: 1 | ||
replicas: 1 | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: jaeger | ||
app.kubernetes.io/component: service-collector | ||
app.kubernetes.io/instance: jaeger-allinone | ||
app.kubernetes.io/managed-by: jaeger-operator | ||
app.kubernetes.io/name: jaeger-allinone-collector | ||
app.kubernetes.io/part-of: jaeger | ||
name: jaeger-allinone-collector | ||
namespace: kuttl-multi-cluster-receive | ||
spec: | ||
ports: | ||
- name: http-zipkin | ||
port: 9411 | ||
protocol: TCP | ||
targetPort: 9411 | ||
- name: tls-grpc-jaeger | ||
port: 14250 | ||
protocol: TCP | ||
targetPort: 14250 | ||
- name: http-c-tchan-trft | ||
port: 14267 | ||
protocol: TCP | ||
targetPort: 14267 | ||
- name: http-c-binary-trft | ||
port: 14268 | ||
protocol: TCP | ||
targetPort: 14268 | ||
- name: admin-http | ||
port: 14269 | ||
protocol: TCP | ||
targetPort: 14269 | ||
- name: grpc-otlp | ||
port: 4317 | ||
protocol: TCP | ||
targetPort: 4317 | ||
- name: http-otlp | ||
port: 4318 | ||
protocol: TCP | ||
targetPort: 4318 | ||
selector: | ||
app: jaeger | ||
app.kubernetes.io/component: all-in-one | ||
app.kubernetes.io/instance: jaeger-allinone | ||
app.kubernetes.io/managed-by: jaeger-operator | ||
app.kubernetes.io/name: jaeger-allinone | ||
app.kubernetes.io/part-of: jaeger | ||
type: ClusterIP | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: jaeger | ||
app.kubernetes.io/component: service-query | ||
app.kubernetes.io/instance: jaeger-allinone | ||
app.kubernetes.io/managed-by: jaeger-operator | ||
app.kubernetes.io/name: jaeger-allinone-query | ||
app.kubernetes.io/part-of: jaeger | ||
name: jaeger-allinone-query | ||
namespace: kuttl-multi-cluster-receive | ||
spec: | ||
ports: | ||
- name: http-query | ||
port: 16686 | ||
protocol: TCP | ||
targetPort: 16686 | ||
- name: grpc-query | ||
port: 16685 | ||
protocol: TCP | ||
targetPort: 16685 | ||
- name: admin-http | ||
port: 16687 | ||
protocol: TCP | ||
targetPort: 16687 | ||
selector: | ||
app: jaeger | ||
app.kubernetes.io/component: all-in-one | ||
app.kubernetes.io/instance: jaeger-allinone | ||
app.kubernetes.io/managed-by: jaeger-operator | ||
app.kubernetes.io/name: jaeger-allinone | ||
app.kubernetes.io/part-of: jaeger | ||
type: ClusterIP | ||
|
||
--- | ||
apiVersion: route.openshift.io/v1 | ||
kind: Route | ||
metadata: | ||
labels: | ||
app: jaeger | ||
app.kubernetes.io/component: query-route | ||
app.kubernetes.io/instance: jaeger-allinone | ||
app.kubernetes.io/managed-by: jaeger-operator | ||
app.kubernetes.io/name: jaeger-allinone | ||
app.kubernetes.io/part-of: jaeger | ||
name: jaeger-allinone | ||
namespace: kuttl-multi-cluster-receive | ||
spec: | ||
port: | ||
targetPort: http-query | ||
tls: | ||
termination: edge | ||
to: | ||
kind: Service | ||
name: jaeger-allinone-query |
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,9 @@ | ||
apiVersion: jaegertracing.io/v1 | ||
kind: Jaeger | ||
metadata: | ||
name: jaeger-allinone | ||
namespace: kuttl-multi-cluster-receive | ||
spec: | ||
strategy: allinone | ||
ingress: | ||
security: none |
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,147 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: opentelemetry-collector | ||
app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver | ||
app.kubernetes.io/managed-by: opentelemetry-operator | ||
app.kubernetes.io/name: otlp-receiver-collector | ||
app.kubernetes.io/part-of: opentelemetry | ||
app.kubernetes.io/version: latest | ||
name: otlp-receiver-collector | ||
namespace: kuttl-multi-cluster-receive | ||
status: | ||
availableReplicas: 1 | ||
readyReplicas: 1 | ||
replicas: 1 | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: opentelemetry-collector | ||
app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver | ||
app.kubernetes.io/managed-by: opentelemetry-operator | ||
app.kubernetes.io/name: otlp-receiver-collector | ||
app.kubernetes.io/part-of: opentelemetry | ||
app.kubernetes.io/version: latest | ||
name: otlp-receiver-collector | ||
namespace: kuttl-multi-cluster-receive | ||
spec: | ||
ports: | ||
- appProtocol: h2c | ||
name: otlp-grpc | ||
port: 4317 | ||
protocol: TCP | ||
targetPort: 4317 | ||
- appProtocol: http | ||
name: otlp-http | ||
port: 4318 | ||
protocol: TCP | ||
targetPort: 4318 | ||
selector: | ||
app.kubernetes.io/component: opentelemetry-collector | ||
app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver | ||
app.kubernetes.io/managed-by: opentelemetry-operator | ||
app.kubernetes.io/part-of: opentelemetry | ||
type: ClusterIP | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: opentelemetry-collector | ||
app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver | ||
app.kubernetes.io/managed-by: opentelemetry-operator | ||
app.kubernetes.io/name: otlp-receiver-collector | ||
app.kubernetes.io/part-of: opentelemetry | ||
app.kubernetes.io/version: latest | ||
operator.opentelemetry.io/collector-headless-service: Exists | ||
name: otlp-receiver-collector-headless | ||
namespace: kuttl-multi-cluster-receive | ||
spec: | ||
ports: | ||
- appProtocol: h2c | ||
name: otlp-grpc | ||
port: 4317 | ||
protocol: TCP | ||
targetPort: 4317 | ||
- appProtocol: http | ||
name: otlp-http | ||
port: 4318 | ||
protocol: TCP | ||
targetPort: 4318 | ||
selector: | ||
app.kubernetes.io/component: opentelemetry-collector | ||
app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver | ||
app.kubernetes.io/managed-by: opentelemetry-operator | ||
app.kubernetes.io/part-of: opentelemetry | ||
type: ClusterIP | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: opentelemetry-collector | ||
app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver | ||
app.kubernetes.io/managed-by: opentelemetry-operator | ||
app.kubernetes.io/name: otlp-receiver-collector-monitoring | ||
app.kubernetes.io/part-of: opentelemetry | ||
app.kubernetes.io/version: latest | ||
name: otlp-receiver-collector-monitoring | ||
namespace: kuttl-multi-cluster-receive | ||
spec: | ||
ports: | ||
- name: monitoring | ||
port: 8888 | ||
protocol: TCP | ||
targetPort: 8888 | ||
selector: | ||
app.kubernetes.io/component: opentelemetry-collector | ||
app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver | ||
app.kubernetes.io/managed-by: opentelemetry-operator | ||
app.kubernetes.io/part-of: opentelemetry | ||
type: ClusterIP | ||
|
||
--- | ||
apiVersion: route.openshift.io/v1 | ||
kind: Route | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver | ||
app.kubernetes.io/managed-by: opentelemetry-operator | ||
app.kubernetes.io/name: otlp-grpc-otlp-receiver-route | ||
name: otlp-grpc-otlp-receiver-route | ||
namespace: kuttl-multi-cluster-receive | ||
spec: | ||
port: | ||
targetPort: otlp-grpc | ||
tls: | ||
termination: passthrough | ||
to: | ||
kind: Service | ||
name: otlp-receiver-collector | ||
weight: 100 | ||
|
||
--- | ||
apiVersion: route.openshift.io/v1 | ||
kind: Route | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver | ||
app.kubernetes.io/managed-by: opentelemetry-operator | ||
app.kubernetes.io/name: otlp-http-otlp-receiver-route | ||
name: otlp-http-otlp-receiver-route | ||
namespace: kuttl-multi-cluster-receive | ||
spec: | ||
port: | ||
targetPort: otlp-http | ||
tls: | ||
termination: passthrough | ||
to: | ||
kind: Service | ||
name: otlp-receiver-collector | ||
weight: 100 |
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,49 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: ./generate_certs.sh | ||
|
||
--- | ||
apiVersion: opentelemetry.io/v1alpha1 | ||
kind: OpenTelemetryCollector | ||
metadata: | ||
name: otlp-receiver | ||
namespace: kuttl-multi-cluster-receive | ||
spec: | ||
mode: "deployment" | ||
ingress: | ||
type: route | ||
route: | ||
termination: "passthrough" | ||
volumes: | ||
- name: kuttl-certs | ||
configMap: | ||
name: kuttl-certs | ||
volumeMounts: | ||
- name: kuttl-certs | ||
mountPath: /certs | ||
config: | | ||
receivers: | ||
otlp: | ||
protocols: | ||
http: | ||
tls: | ||
cert_file: /certs/server.crt | ||
key_file: /certs/server.key | ||
client_ca_file: /certs/ca.crt | ||
grpc: | ||
tls: | ||
cert_file: /certs/server.crt | ||
key_file: /certs/server.key | ||
client_ca_file: /certs/ca.crt | ||
exporters: | ||
otlp: | ||
endpoint: "jaeger-allinone-collector.kuttl-multi-cluster-receive.svc:4317" | ||
tls: | ||
insecure: true | ||
service: | ||
pipelines: | ||
traces: | ||
receivers: [otlp] | ||
processors: [] | ||
exporters: [otlp] |
Oops, something went wrong.