-
Notifications
You must be signed in to change notification settings - Fork 32
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
Kubernetes consolidation #368
Conversation
E2E - k8s1 files ±0 1 suites ±0 0s ⏱️ - 1m 58s For more details on these failures, see this check. Results for commit abdc52d. ± Comparison against base commit ea91049. This pull request removes 7 tests.
♻️ This comment has been updated with latest results. |
api/context/context.go
Outdated
@@ -62,3 +65,35 @@ func (ctx *Context) New(environment map[string]interface{}) *Context { | |||
Logger: ctx.Logger, | |||
} | |||
} | |||
func (ctx *Context) GetInnerCanaries(namespace string, canaryRef []k8sv1.LocalObjectReference) ([]v1.Canary, []string, error) { |
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.
func (ctx *Context) GetInnerCanaries(namespace string, canaryRef []k8sv1.LocalObjectReference) ([]v1.Canary, []string, error) { | |
func (ctx *Context) GetCanaries(namespace string, canaryRef []k8sv1.LocalObjectReference) ([]v1.Canary, []string, error) { |
checks/cloudwatch.go
Outdated
@@ -31,7 +31,11 @@ func (c *CloudWatchChecker) Type() string { | |||
} | |||
|
|||
func (c *CloudWatchChecker) Check(ctx *context.Context, extConfig external.Check) *pkg.CheckResult { | |||
check := extConfig.(v1.CloudWatchCheck) | |||
updated, err := Contextualise(extConfig, ctx) |
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.
updated, err := Contextualise(extConfig, ctx) | |
updated, err := ctx.Contextualise(extConfig) |
if err != nil { | ||
return pkg.Fail(extConfig, ctx.Canary) | ||
} | ||
check := updated.(v1.CloudWatchCheck) |
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.
does the contextualization not need to happen on check with type information ?
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.
Not sure I follow. The need is to generically template any chained canary, so the function is written to take an external.Check rather than a specifically typed v1.xxCheck
…ubernetes-consolidation
#341 #309
Adds a contextualise function to generically handle inserting defaults values to checks, and templating environment values into chained checks