Skip to content

Commit

Permalink
feat: add step and aggregation fields for `kubectl get KeptnMetri…
Browse files Browse the repository at this point in the history
…c` (#2556)

Signed-off-by: aryansharma9917 <sharmaaryan9837@gmail.com>
Signed-off-by: Aryan Sharma <sharmaaryan9837@gmail.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Co-authored-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Co-authored-by: Florian Bacher <florian.bacher@dynatrace.com>
Co-authored-by: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com>
Co-authored-by: odubajDT <ondrej.dubaj@dynatrace.com>
  • Loading branch information
5 people committed Jan 17, 2024
1 parent 017e681 commit abe00fc
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/scripts/.helm-tests/default/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8956,6 +8956,12 @@ spec:
- jsonPath: .spec.range.interval
name: Interval
type: string
- jsonPath: .spec.range.step
name: Step
type: string
- jsonPath: .spec.range.aggregation
name: Aggregation
type: string
- jsonPath: .status.value
name: Value
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,12 @@ spec:
- jsonPath: .spec.range.interval
name: Interval
type: string
- jsonPath: .spec.range.step
name: Step
type: string
- jsonPath: .spec.range.aggregation
name: Aggregation
type: string
- jsonPath: .status.value
name: Value
type: string
Expand Down
6 changes: 6 additions & 0 deletions .github/scripts/.helm-tests/metrics-only/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,12 @@ spec:
- jsonPath: .spec.range.interval
name: Interval
type: string
- jsonPath: .spec.range.step
name: Step
type: string
- jsonPath: .spec.range.aggregation
name: Aggregation
type: string
- jsonPath: .status.value
name: Value
type: string
Expand Down
6 changes: 6 additions & 0 deletions .github/scripts/.helm-tests/metrics-with-certs/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,12 @@ spec:
- jsonPath: .spec.range.interval
name: Interval
type: string
- jsonPath: .spec.range.step
name: Step
type: string
- jsonPath: .spec.range.aggregation
name: Aggregation
type: string
- jsonPath: .status.value
name: Value
type: string
Expand Down
2 changes: 2 additions & 0 deletions metrics-operator/api/v1beta1/keptnmetric_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ type IntervalResult struct {
// +kubebuilder:printcolumn:name="Query",type=string,JSONPath=`.spec.query`
// +kubebuilder:printcolumn:name="Interval",type=string,JSONPath=`.spec.range.interval`
// +kubebuilder:printcolumn:name="Value",type=string,JSONPath=`.status.value`
// +kubebuilder:printcolumn:name="Step",type=string,JSONPath=`.spec.range.step`
// +kubebuilder:printcolumn:name="Aggregation",type=string,JSONPath=`.spec.range.aggregation`
// +kubebuilder:storageversion

// KeptnMetric is the Schema for the keptnmetrics API
Expand Down
6 changes: 6 additions & 0 deletions metrics-operator/chart/templates/keptnmetric-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ spec:
- jsonPath: .spec.range.interval
name: Interval
type: string
- jsonPath: .spec.range.step
name: Step
type: string
- jsonPath: .spec.range.aggregation
name: Aggregation
type: string
- jsonPath: .status.value
name: Value
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ spec:
- jsonPath: .spec.range.interval
name: Interval
type: string
- jsonPath: .spec.range.step
name: Step
type: string
- jsonPath: .spec.range.aggregation
name: Aggregation
type: string
- jsonPath: .status.value
name: Value
type: string
Expand Down

0 comments on commit abe00fc

Please sign in to comment.