Skip to content

Instantly share code, notes, and snippets.

Avatar
🥑
Channeling my inner Avocado at @kubeshop

Adnan Rahić adnanrahic

🥑
Channeling my inner Avocado at @kubeshop
View GitHub Profile
View docker-compose.yaml
version: "3"
services:
# Tracetest
tracetest:
image: kubeshop/tracetest
volumes:
- ./tracetest.config.yaml:/app/tracetest.yaml
- ./tracetest.provision.yaml:/app/provisioning.yaml
ports:
View test-api.yaml
type: Test
spec:
id: W656Q0c4g
name: http://app:8080
description: akadlkasjdf
trigger:
type: http
httpRequest:
url: http://app:8080
method: GET
View selector-1.yaml
- selector: span[tracetest.span.type="database" name="create pokeshop.pokemon" db.system="postgres"
db.name="pokeshop" db.user="ashketchum" db.operation="create" db.sql.table="pokemon"]
assertions:
- attr:db.result | json_path '$.name' = env:IMPORTED_POKEMON_NAME
View output-1.yaml
outputs:
- name: POKEMON_DB_ID
selector: span[tracetest.span.type="database" name="create pokeshop.pokemon" db.system="postgres"
db.name="pokeshop" db.user="ashketchum" db.operation="create" db.sql.table="pokemon"]
value: attr:db.result | json_path '$.id'
View assertion.txt
attr:http.response.body | json_path '$.name'
View test-1.yaml
type: Test
spec:
id: 6T0F1LOVR
name: OSCAR - DEMO - Import
description: Import a Pokemon
trigger:
type: http
httpRequest:
url: ${env:HTTP_HOST}/pokemon/import
method: POST
View sample-nginx-ingress.yaml
# k8s ingress
# Deployments
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: webapp1
spec:
replicas: 1
View patterns.yml
patterns:
- # Flink jobmanager and taskmanager
sourceName: !!js/regexp /flink/
blockStart: !!js/regexp /^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2},\d{3}\s/
match:
- type: flink[job|task]manager
regex: !!js/regexp /^(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2},\d{3})\s(INFO|info|WARN|ERROR|FATAL)\s+([\S]+)\s+-\s([\S|\s|\n]+)/
fields: [ts, severity, processid, message]
inputFilter: !!js/regexp /WARN|ERROR|FATAL/
dateFormat: YYYY-MM-DD HH:mm:ss:l