Skip to content

Commit

Permalink
Pyrra specific SLO schema addition
Browse files Browse the repository at this point in the history
Signed-off-by: Suzana Nesic <snesic@redhat.com>
  • Loading branch information
suzana-nesic committed Sep 5, 2024
1 parent 047ebcc commit 5c11ab8
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
38 changes: 38 additions & 0 deletions graphql-schemas/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4270,6 +4270,44 @@ confs:
- { name: app, type: App_v1, isRequired: true }
- { name: namespaces, type: SLONamespaces_v1, isList: true, isRequired: true }
- { name: slos, type: SLODocumentSLO_v1, isList: true }
- { name: managedSLO, type: ManagedSLODocument_v1, isList: true, isRequired: false }

- name: ManagedSLODocument_v1
fields:
- { name: name, type: string, isRequired: true }
- { name: annotations, type: ManagedSLOAnnotations_v1, isRequired: true }
- { name: spec, type: ManagedSLOSpec_v1, isRequired: true }

- name: ManagedSLOAnnotations_v1
fields:
- { name: runbook, type: string, isRequired: true }
- { name: message, type: string, isRequired: true }
- { name: dashboard, type: string, isRequired: true }
- { name: link_url, type: string, isRequired: true }

- name: ManagedSLOSpec_v1
fields:
- { name: description, type: string, isRequired: true }
- { name: indicator, type: ManagedSLOIndicator_v1, isRequired: true }
- { name: target, type: string, isRequired: true }
- { name: window, type: string, isRequired: true }

- name: ManagedSLOIndicator_v1
fields:
- { name: ratio, type: ManagedSLORatio_v1, isRequired: true }

- name: ManagedSLORatio_v1
fields:
- { name: errors, type: ManagedSLOErrors_v1, isRequired: true }
- { name: total, type: ManagedSLOTotal_v1, isRequired: true }

- name: ManagedSLOErrors_v1
fields:
- { name: metric, type: string, isRequired: true }

- name: ManagedSLOTotal_v1
fields:
- { name: metric, type: string, isRequired: true }

- name: SLONamespaces_v1
fields:
Expand Down
46 changes: 46 additions & 0 deletions schemas/app-sre/slo-document-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,52 @@ properties:
- expr
- prometheusRules
- dashboard
managedSLO:
type: array
items:
type: object
additionalProperties: false
properties:
name:
type: string
annotations:
type: object
properties:
runbook:
type: string
message:
type: string
dashboard:
type: string
link_url:
type: string
spec:
type: object
properties:
# # alerting:
# # type: string
description:
type: string
indicator:
type: object
properties:
ratio:
type: object
properties:
errors:
type: object
properties:
metric:
type: string
total:
type: object
properties:
metric:
type: string
target:
type: string
window:
type: string
required:
- "$schema"
- labels
Expand Down

0 comments on commit 5c11ab8

Please sign in to comment.