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

Add initial provider and prometheus implementation #170

Merged
merged 7 commits into from
Sep 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
50 changes: 50 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 14 additions & 5 deletions manifests/crds/analysis-run-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,36 @@ spec:
count:
format: int32
type: integer
failFast:
type: boolean
failureCondition:
type: string
interval:
format: int32
type: integer
maxConsecutiveErrors:
format: int32
type: integer
maxFailures:
format: int32
type: integer
name:
type: string
prometheus:
provider:
properties:
query:
type: string
server:
type: string
prometheus:
properties:
query:
type: string
server:
type: string
type: object
type: object
successCondition:
type: string
required:
- name
- provider
type: object
type: array
required:
Expand Down
19 changes: 14 additions & 5 deletions manifests/crds/analysis-template-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,36 @@ spec:
count:
format: int32
type: integer
failFast:
type: boolean
failureCondition:
type: string
interval:
format: int32
type: integer
maxConsecutiveErrors:
format: int32
type: integer
maxFailures:
format: int32
type: integer
name:
type: string
prometheus:
provider:
properties:
query:
type: string
server:
type: string
prometheus:
properties:
query:
type: string
server:
type: string
type: object
type: object
successCondition:
type: string
required:
- name
- provider
type: object
type: array
required:
Expand Down
38 changes: 28 additions & 10 deletions manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,36 @@ spec:
count:
format: int32
type: integer
failFast:
type: boolean
failureCondition:
type: string
interval:
format: int32
type: integer
maxConsecutiveErrors:
format: int32
type: integer
maxFailures:
format: int32
type: integer
name:
type: string
prometheus:
provider:
properties:
query:
type: string
server:
type: string
prometheus:
properties:
query:
type: string
server:
type: string
type: object
type: object
successCondition:
type: string
required:
- name
- provider
type: object
type: array
required:
Expand Down Expand Up @@ -173,27 +182,36 @@ spec:
count:
format: int32
type: integer
failFast:
type: boolean
failureCondition:
type: string
interval:
format: int32
type: integer
maxConsecutiveErrors:
format: int32
type: integer
maxFailures:
format: int32
type: integer
name:
type: string
prometheus:
provider:
properties:
query:
type: string
server:
type: string
prometheus:
properties:
query:
type: string
server:
type: string
type: object
type: object
successCondition:
type: string
required:
- name
- provider
type: object
type: array
required:
Expand Down
38 changes: 28 additions & 10 deletions manifests/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,36 @@ spec:
count:
format: int32
type: integer
failFast:
type: boolean
failureCondition:
type: string
interval:
format: int32
type: integer
maxConsecutiveErrors:
format: int32
type: integer
maxFailures:
format: int32
type: integer
name:
type: string
prometheus:
provider:
properties:
query:
type: string
server:
type: string
prometheus:
properties:
query:
type: string
server:
type: string
type: object
type: object
successCondition:
type: string
required:
- name
- provider
type: object
type: array
required:
Expand Down Expand Up @@ -173,27 +182,36 @@ spec:
count:
format: int32
type: integer
failFast:
type: boolean
failureCondition:
type: string
interval:
format: int32
type: integer
maxConsecutiveErrors:
format: int32
type: integer
maxFailures:
format: int32
type: integer
name:
type: string
prometheus:
provider:
properties:
query:
type: string
server:
type: string
prometheus:
properties:
query:
type: string
server:
type: string
type: object
type: object
successCondition:
type: string
required:
- name
- provider
type: object
type: array
required:
Expand Down
9 changes: 9 additions & 0 deletions pkg/apis/rollouts/v1alpha1/analysis_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ type Metric struct {
// MaxConsecutiveErrors is the maximum number of times the measurement is allowed to error in
// succession, before the metric is considered error (default: 4)
MaxConsecutiveErrors *int32 `json:"maxConsecutiveErrors,omitempty"`
// FailFast will fail the entire analysis run prematurely
FailFast bool `json:"failFast,omitempty"`
// Provider configuration to the external system to use to verify the analysis
Provider AnalysisProvider `json:"provider"`
dthomson25 marked this conversation as resolved.
Show resolved Hide resolved
}

// AnalysisProvider which external system to use to verify the analysis
// Only one of the fields in this struct should be non-nil
type AnalysisProvider struct {
// PrometheusMetric specifies the prometheus metric to query
Prometheus *PrometheusMetric `json:"prometheus,omitempty"`
}
Expand Down
Loading