-
Notifications
You must be signed in to change notification settings - Fork 61
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
WIP: Define schema with cue #32
Conversation
Closes: OpenSLO#20 Signed-off-by: Michael Gasch <mgasch@vmware.com>
@ian-bartholomew first proposal for discussion. There's couple of areas where the spec is a bit fuzzy/unclear to me (and I made some minor adjustments based on some other comments). On
Why do we need to spread the different metrics over various spec parts, e.g. one in
and
|
@@ -0,0 +1,198 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generated with cue export --out=openapi meta.cue spec.cue > openapi.json
@@ -0,0 +1,6 @@ | |||
package v1alpha1 | |||
|
|||
apiVersion: "openslo/v1alpha1" & #apiVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enforcing v1alpha1
semantics
package v1alpha1 | ||
|
||
apiVersion: "openslo/v1alpha1" & #apiVersion | ||
kind: "SLO" & #kind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Service
the spec is rather brief on what goes into it (besides spec.Description
) so I did not include Service
type yet.
import "time" | ||
|
||
#spec: { | ||
// list? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the spec it looks like a list []
?
service: string | ||
// optional | ||
// TODO: 1050 exceeds go regex limit (1000) | ||
description?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't use regex to validate 1050 char limit here due to go regex package limit (1000).
service: string | ||
// optional | ||
// TODO: 1050 exceeds go regex limit (1000) | ||
description?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't use regex to validate 1050 char limit here due to go regex package limit (1000).
// TODO: 1050 exceeds go regex limit (1000) | ||
description?: string | ||
// object oneOf | ||
timeWindow: #timeWindowSecond | #timeWindowCalendar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: made this oneOf instead of list
// indicator: | ||
} | ||
|
||
#indicator: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See questions in PR comments.
} | ||
calendar: { | ||
// note: leap-seconds not supported | ||
startTime: time.Format(time.RFC3339) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enforcing RFC3339 and avoiding additional timezone field.
Agreed as I mentioned this here: #29 Whats the best mechanism for suggesting the recommended change to the spec? |
@embano1 this has come up a few times, and I agree, it leads to some issues, and should get addressed. This is an artifact of us open sourcing our internal spec @its02003 I think a good way of doing is it is a PR here with changes in the spec, and then pinging the OpenSLO Slack channel where we can discuss it. Thanks both! |
TODO:
indicator
objectives
Closes: #20
Signed-off-by: Michael Gasch mgasch@vmware.com