Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: improve metrics integration tests by adding kuttl log collectors #2765

Merged
merged 21 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions test/testmetrics/metrics-hpa/01-assert.yaml
odubajDT marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: podtato-head-entry
labels:
app: podtato-head
spec:
selector:
matchLabels:
component: podtato-head-entry
replicas: 3
template:
metadata:
labels:
component: podtato-head-entry
assert: deployment.yaml
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
odubajDT marked this conversation as resolved.
Show resolved Hide resolved
collectors:
- type: pod
selector: app=podtato-head
- command: |
kubectl logs -l control-plane=lifecycle-operator -n keptn-system
kubectl describe keptnmetric podtatometric -n $NAMESPACE
odubajDT marked this conversation as resolved.
Show resolved Hide resolved
kubectl describe keptnmetricsprovider dynatrace -n $NAMESPACE
kubectl describe pods -l app=podtato-head -n $NAMESPACE
15 changes: 15 additions & 0 deletions test/testmetrics/metrics-hpa/deployment.yaml
odubajDT marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: podtato-head-entry
labels:
app: podtato-head
spec:
selector:
matchLabels:
component: podtato-head-entry
replicas: 3
template:
metadata:
labels:
component: podtato-head-entry
8 changes: 8 additions & 0 deletions test/testmetrics/metrics/02-teststep-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@ assert: # this checks that kubectl get resource succeeds
- goodmetric3.yaml
- goodmetric4.yaml
- goodmetric5.yaml
collectors:
- type: pod
selector: app=test
- command: |
kubectl logs -l control-plane=lifecycle-operator -n keptn-system
odubajDT marked this conversation as resolved.
Show resolved Hide resolved
kubectl describe keptnmetric podtatometric -n $NAMESPACE
kubectl describe keptnmetricsprovider dynatrace -n $NAMESPACE
kubectl describe pods -l app=podtato-head -n $NAMESPACE
Loading