-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
- Loading branch information
1 parent
fac10b1
commit ecf8697
Showing
15 changed files
with
211 additions
and
91 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,33 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
creationTimestamp: null | ||
name: kafka | ||
spec: | ||
steps: | ||
- name: step-00 | ||
try: | ||
- apply: | ||
file: 00-create-kafka-instance.yaml | ||
- assert: | ||
file: 00-assert.yaml | ||
- apply: | ||
file: 01-create-kafka-topics.yaml | ||
- assert: | ||
file: 01-assert.yaml | ||
- apply: | ||
file: 02-otel-kakfa-receiver.yaml | ||
- assert: | ||
file: 02-assert.yaml | ||
- apply: | ||
file: 03-otel-kakfa-exporter.yaml | ||
- assert: | ||
file: 03-assert.yaml | ||
- apply: | ||
file: 04-generate-traces.yaml | ||
- assert: | ||
file: 04-assert.yaml | ||
catch: | ||
- script: | ||
content: ./tests/e2e-openshift/kafka/check_traces.sh |
This file was deleted.
Oops, something went wrong.
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,36 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
creationTimestamp: null | ||
name: monitoring | ||
spec: | ||
steps: | ||
- catch: | ||
- script: | ||
content: ./tests/e2e-openshift/monitoring/check_user_workload_monitoring.sh | ||
name: step-00 | ||
try: | ||
- apply: | ||
file: 00-workload-monitoring.yaml | ||
- name: step-01 | ||
try: | ||
- apply: | ||
file: 01-otel-collector.yaml | ||
- assert: | ||
file: 01-assert.yaml | ||
- name: step-02 | ||
try: | ||
- apply: | ||
file: 02-generate-traces.yaml | ||
- assert: | ||
file: 02-assert.yaml | ||
- catch: | ||
- script: | ||
content: ./tests/e2e-openshift/monitoring/check_metrics.sh | ||
name: step-03 | ||
try: | ||
- apply: | ||
file: 03-create-monitoring-roles.yaml | ||
- assert: | ||
file: 03-assert.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
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 |
---|---|---|
@@ -1,46 +1,57 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: kuttl-multi-cluster | ||
namespace: kuttl-multi-cluster-send | ||
|
||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: kuttl-multi-cluster | ||
rules: | ||
- apiGroups: ["config.openshift.io"] | ||
resources: ["infrastructures", "infrastructures/status"] | ||
verbs: ["get", "watch", "list"] | ||
- apiGroups: ["apps"] | ||
resources: ["replicasets"] | ||
verbs: ["get", "watch", "list"] | ||
- apiGroups: [""] | ||
resources: ["pods"] | ||
verbs: ["get", "watch", "list"] | ||
- apiGroups: [""] | ||
resources: ["namespaces"] | ||
verbs: ["get", "watch", "list"] | ||
|
||
- apiGroups: | ||
- config.openshift.io | ||
resources: | ||
- infrastructures | ||
- infrastructures/status | ||
verbs: | ||
- get | ||
- watch | ||
- list | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- replicasets | ||
verbs: | ||
- get | ||
- watch | ||
- list | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
verbs: | ||
- get | ||
- watch | ||
- list | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- namespaces | ||
verbs: | ||
- get | ||
- watch | ||
- list | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: kuttl-multi-cluster | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: kuttl-multi-cluster | ||
subjects: | ||
- kind: ServiceAccount | ||
name: kuttl-multi-cluster | ||
namespace: kuttl-multi-cluster-send | ||
roleRef: | ||
kind: ClusterRole | ||
name: kuttl-multi-cluster | ||
apiGroup: rbac.authorization.k8s.io | ||
|
||
--- | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: ./create_otlp_sender.sh |
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
creationTimestamp: null | ||
name: multi-cluster | ||
spec: | ||
steps: | ||
- name: step-00 | ||
try: | ||
- apply: | ||
file: 00-create-namespaces.yaml | ||
- assert: | ||
file: 00-assert.yaml | ||
- apply: | ||
file: 01-create-jaeger.yaml | ||
- assert: | ||
file: 01-assert.yaml | ||
- script: | ||
content: ./generate_certs.sh | ||
- apply: | ||
file: 02-otlp-receiver.yaml | ||
- assert: | ||
file: 02-assert.yaml | ||
- script: | ||
content: ./create_otlp_sender.sh | ||
- apply: | ||
file: 03-otlp-sender.yaml | ||
- assert: | ||
file: 03-assert.yaml | ||
- apply: | ||
file: 04-generate-traces.yaml | ||
- assert: | ||
file: 04-assert.yaml | ||
catch: | ||
- script: | ||
content: ./tests/e2e-openshift/multi-cluster/check_traces.sh |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
tests/e2e-openshift/otlp-metrics-traces/chainsaw-test.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,33 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
creationTimestamp: null | ||
name: otlp-metrics-traces | ||
spec: | ||
steps: | ||
- name: step-00 | ||
try: | ||
- apply: | ||
file: 00-install-jaeger.yaml | ||
- assert: | ||
file: 00-assert.yaml | ||
- name: step-01 | ||
try: | ||
- apply: | ||
file: 01-workload-monitoring.yaml | ||
- apply: | ||
file: 02-otel-metrics-collector.yaml | ||
- assert: | ||
file: 02-assert.yaml | ||
- apply: | ||
file: 03-metrics-traces-gen.yaml | ||
- assert: | ||
file: 03-assert.yaml | ||
catch: | ||
- script: | ||
content: ./tests/e2e-openshift/otlp-metrics-traces/check_user_workload_monitoring.sh | ||
- script: | ||
content: ./tests/e2e-openshift/otlp-metrics-traces/check_traces.sh | ||
- script: | ||
content: ./tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh |
9 changes: 0 additions & 9 deletions
9
tests/e2e-openshift/route/01-report-empty-otlphttp-spans.yaml
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
creationTimestamp: null | ||
name: route | ||
spec: | ||
steps: | ||
- name: step-00 | ||
try: | ||
- apply: | ||
file: 00-install.yaml | ||
- assert: | ||
file: 00-assert.yaml | ||
- name: step-01 | ||
try: | ||
- script: | ||
content: | | ||
#!/bin/bash | ||
set -ex | ||
# Export empty payload and check of collector accepted it with 2xx status code | ||
otlp_http_host=$(kubectl get route otlp-http-simplest-route -n $NAMESPACE -o jsonpath='{.spec.host}') | ||
for i in {1..40}; do curl --fail -ivX POST http://${otlp_http_host}:80/v1/traces -H "Content-Type: application/json" -d '{}' && break || sleep 1; done |