Skip to content

Commit

Permalink
adapt to pr review
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Bacher <[email protected]>
  • Loading branch information
bacherfl committed Sep 27, 2023
1 parent 668778e commit 1ab71d7
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 39 deletions.
20 changes: 10 additions & 10 deletions .github/scripts/.helm-tests/default/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,22 +215,22 @@ spec:
timeframe:
description: Timeframe specifies the range for the corresponding query
in the AnalysisValueTemplate. Please note that either a combination
of 'from' and 'to' or the 'recent' property may be set. If this
is not the case, the Analysis can not be added to the cluster.
of 'from' and 'to' or the 'recent' property may be set. If neither
is set, the Analysis can not be added to the cluster.
properties:
from:
description: From is the time of start for the query, this field
description: From is the time of start for the query. This field
follows RFC3339 time format
format: date-time
type: string
recent:
description: Recent describes a recent timeframe using a duration
string. E.g. Setting this to '5m' will cause the Analysis to
be performed for the last five minutes
string. E.g. Setting this to '5m' provides an Analysis for the
last five minutes
pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
type: string
to:
description: To is the time of end for the query, this field follows
description: To is the time of end for the query. This field follows
RFC3339 time format
format: date-time
type: string
Expand Down Expand Up @@ -286,18 +286,18 @@ spec:
by the Analysis
properties:
from:
description: From is the time of start for the query, this field
description: From is the time of start for the query. This field
follows RFC3339 time format
format: date-time
type: string
recent:
description: Recent describes a recent timeframe using a duration
string. E.g. Setting this to '5m' will cause the Analysis to
be performed for the last five minutes
string. E.g. Setting this to '5m' provides an Analysis for the
last five minutes
pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
type: string
to:
description: To is the time of end for the query, this field follows
description: To is the time of end for the query. This field follows
RFC3339 time format
format: date-time
type: string
Expand Down
8 changes: 4 additions & 4 deletions docs/content/en/docs/crd-ref/metrics/v1alpha3/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ _Appears in:_

| Field | Description |
| --- | --- |
| `timeframe` _[Timeframe](#timeframe)_ | Timeframe specifies the range for the corresponding query in the AnalysisValueTemplate. Please note that either a combination of 'from' and 'to' or the 'recent' property may be set. If this is not the case, the Analysis can not be added to the cluster. |
| `timeframe` _[Timeframe](#timeframe)_ | Timeframe specifies the range for the corresponding query in the AnalysisValueTemplate. Please note that either a combination of 'from' and 'to' or the 'recent' property may be set. If neither is set, the Analysis can not be added to the cluster. |
| `args` _object (keys:string, values:string)_ | Args corresponds to a map of key/value pairs that can be used to substitute placeholders in the AnalysisValueTemplate query. i.e. for args foo:bar the query could be "query:percentile(95)?scope=tag(my_foo_label:{{.foo}})". |
| `analysisDefinition` _[ObjectReference](#objectreference)_ | AnalysisDefinition refers to the AnalysisDefinition, a CRD that stores the AnalysisValuesTemplates |

Expand Down Expand Up @@ -499,9 +499,9 @@ _Appears in:_

| Field | Description |
| --- | --- |
| `from` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#time-v1-meta)_ | From is the time of start for the query, this field follows RFC3339 time format |
| `to` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#time-v1-meta)_ | To is the time of end for the query, this field follows RFC3339 time format |
| `recent` _[Duration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#duration-v1-meta)_ | Recent describes a recent timeframe using a duration string. E.g. Setting this to '5m' will cause the Analysis to be performed for the last five minutes |
| `from` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#time-v1-meta)_ | From is the time of start for the query. This field follows RFC3339 time format |
| `to` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#time-v1-meta)_ | To is the time of end for the query. This field follows RFC3339 time format |
| `recent` _[Duration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#duration-v1-meta)_ | Recent describes a recent timeframe using a duration string. E.g. Setting this to '5m' provides an Analysis for the last five minutes |


#### TotalScore
Expand Down
20 changes: 10 additions & 10 deletions helm/chart/templates/analysis-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,22 @@ spec:
timeframe:
description: Timeframe specifies the range for the corresponding query
in the AnalysisValueTemplate. Please note that either a combination
of 'from' and 'to' or the 'recent' property may be set. If this
is not the case, the Analysis can not be added to the cluster.
of 'from' and 'to' or the 'recent' property may be set. If neither
is set, the Analysis can not be added to the cluster.
properties:
from:
description: From is the time of start for the query, this field
description: From is the time of start for the query. This field
follows RFC3339 time format
format: date-time
type: string
recent:
description: Recent describes a recent timeframe using a duration
string. E.g. Setting this to '5m' will cause the Analysis to
be performed for the last five minutes
string. E.g. Setting this to '5m' provides an Analysis for the
last five minutes
pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
type: string
to:
description: To is the time of end for the query, this field follows
description: To is the time of end for the query. This field follows
RFC3339 time format
format: date-time
type: string
Expand Down Expand Up @@ -147,18 +147,18 @@ spec:
by the Analysis
properties:
from:
description: From is the time of start for the query, this field
description: From is the time of start for the query. This field
follows RFC3339 time format
format: date-time
type: string
recent:
description: Recent describes a recent timeframe using a duration
string. E.g. Setting this to '5m' will cause the Analysis to
be performed for the last five minutes
string. E.g. Setting this to '5m' provides an Analysis for the
last five minutes
pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
type: string
to:
description: To is the time of end for the query, this field follows
description: To is the time of end for the query. This field follows
RFC3339 time format
format: date-time
type: string
Expand Down
10 changes: 5 additions & 5 deletions metrics-operator/api/v1alpha3/analysis_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
// AnalysisSpec defines the desired state of Analysis
type AnalysisSpec struct {
// Timeframe specifies the range for the corresponding query in the AnalysisValueTemplate. Please note that either
// a combination of 'from' and 'to' or the 'recent' property may be set. If this is not the case, the Analysis can
// a combination of 'from' and 'to' or the 'recent' property may be set. If neither is set, the Analysis can
// not be added to the cluster.
Timeframe `json:"timeframe"`
// Args corresponds to a map of key/value pairs that can be used to substitute placeholders in the AnalysisValueTemplate query. i.e. for args foo:bar the query could be "query:percentile(95)?scope=tag(my_foo_label:{{.foo}})".
Expand Down Expand Up @@ -86,12 +86,12 @@ type AnalysisList struct {
}

type Timeframe struct {
// From is the time of start for the query, this field follows RFC3339 time format
// From is the time of start for the query. This field follows RFC3339 time format
From metav1.Time `json:"from,omitempty"`
// To is the time of end for the query, this field follows RFC3339 time format
// To is the time of end for the query. This field follows RFC3339 time format
To metav1.Time `json:"to,omitempty"`
// Recent describes a recent timeframe using a duration string. E.g. Setting this to '5m' will cause the Analysis
// to be performed for the last five minutes
// Recent describes a recent timeframe using a duration string. E.g. Setting this to '5m' provides an Analysis
// for the last five minutes
// +optional
// +kubebuilder:validation:Pattern="^0|([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$"
// +kubebuilder:validation:Type:=string
Expand Down
20 changes: 10 additions & 10 deletions metrics-operator/config/crd/bases/metrics.keptn.sh_analyses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,22 @@ spec:
timeframe:
description: Timeframe specifies the range for the corresponding query
in the AnalysisValueTemplate. Please note that either a combination
of 'from' and 'to' or the 'recent' property may be set. If this
is not the case, the Analysis can not be added to the cluster.
of 'from' and 'to' or the 'recent' property may be set. If neither
is set, the Analysis can not be added to the cluster.
properties:
from:
description: From is the time of start for the query, this field
description: From is the time of start for the query. This field
follows RFC3339 time format
format: date-time
type: string
recent:
description: Recent describes a recent timeframe using a duration
string. E.g. Setting this to '5m' will cause the Analysis to
be performed for the last five minutes
string. E.g. Setting this to '5m' provides an Analysis for the
last five minutes
pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
type: string
to:
description: To is the time of end for the query, this field follows
description: To is the time of end for the query. This field follows
RFC3339 time format
format: date-time
type: string
Expand Down Expand Up @@ -142,18 +142,18 @@ spec:
by the Analysis
properties:
from:
description: From is the time of start for the query, this field
description: From is the time of start for the query. This field
follows RFC3339 time format
format: date-time
type: string
recent:
description: Recent describes a recent timeframe using a duration
string. E.g. Setting this to '5m' will cause the Analysis to
be performed for the last five minutes
string. E.g. Setting this to '5m' provides an Analysis for the
last five minutes
pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
type: string
to:
description: To is the time of end for the query, this field follows
description: To is the time of end for the query. This field follows
RFC3339 time format
format: date-time
type: string
Expand Down

0 comments on commit 1ab71d7

Please sign in to comment.