Skip to content

Commit

Permalink
Add custom metadata support for AnalysisRun
Browse files Browse the repository at this point in the history
Signed-off-by: lukasz <[email protected]>
  • Loading branch information
lukaszgyg committed Apr 24, 2023
1 parent 3c9c291 commit 14bfaec
Show file tree
Hide file tree
Showing 12 changed files with 1,469 additions and 624 deletions.
20 changes: 20 additions & 0 deletions docs/features/analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,26 @@ spec:
limit: 20
```

### Define custom Labels/Annotations for AnalysisRun

If you would like to annotate/label the `AnalysisRun` with the custom labels your can do it by specifying
`analysisRunMetadata` field.

```yaml hl_lines="9 10 11"
kind: Rollout
spec:
...
steps:
- analysis:
templates:
- templateName: my-template
analysisRunMetadata:
labels:
my-custom-label: label-value
annotations:
my-custom-annotation: annotation-value
```

### Measurements Retention for Experiments

If an experiment wants to retain more results of its analysis metrics, it simply needs to specify the
Expand Down
44 changes: 44 additions & 0 deletions manifests/crds/rollout-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,17 @@ spec:
x-kubernetes-int-or-string: true
postPromotionAnalysis:
properties:
analysisRunMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
args:
items:
properties:
Expand Down Expand Up @@ -210,6 +221,17 @@ spec:
type: object
prePromotionAnalysis:
properties:
analysisRunMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
args:
items:
properties:
Expand Down Expand Up @@ -297,6 +319,17 @@ spec:
type: integer
analysis:
properties:
analysisRunMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
args:
items:
properties:
Expand Down Expand Up @@ -430,6 +463,17 @@ spec:
properties:
analysis:
properties:
analysisRunMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
args:
items:
properties:
Expand Down
44 changes: 44 additions & 0 deletions manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11208,6 +11208,17 @@ spec:
x-kubernetes-int-or-string: true
postPromotionAnalysis:
properties:
analysisRunMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
args:
items:
properties:
Expand Down Expand Up @@ -11265,6 +11276,17 @@ spec:
type: object
prePromotionAnalysis:
properties:
analysisRunMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
args:
items:
properties:
Expand Down Expand Up @@ -11352,6 +11374,17 @@ spec:
type: integer
analysis:
properties:
analysisRunMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
args:
items:
properties:
Expand Down Expand Up @@ -11485,6 +11518,17 @@ spec:
properties:
analysis:
properties:
analysisRunMetadata:
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
args:
items:
properties:
Expand Down
24 changes: 24 additions & 0 deletions pkg/apiclient/rollout/rollout.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,26 @@
},
"title": "AnalysisRunArgument argument to add to analysisRun"
},
"github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.AnalysisRunMetadata": {
"type": "object",
"properties": {
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"title": "Labels Additional labels to add to the AnalysisRun\n+optional"
},
"annotations": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"title": "Annotations additional annotations to add to the AnalysisRun\n+optional"
}
},
"title": "AnalysisRunMetadata extra labels to add to the AnalysisRun"
},
"github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.AnalysisRunStrategy": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1225,6 +1245,10 @@
"$ref": "#/definitions/github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.MeasurementRetention"
},
"title": "MeasurementRetention object contains the settings for retaining the number of measurements during the analysis\n+patchMergeKey=metricName\n+patchStrategy=merge\n+optional"
},
"analysisRunMetadata": {
"$ref": "#/definitions/github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.AnalysisRunMetadata",
"title": "AnalysisRunMetadata labels and annotations that will be added to the AnalysisRuns\n+optional"
}
},
"title": "RolloutAnalysis defines a template that is used to create a analysisRun"
Expand Down
Loading

0 comments on commit 14bfaec

Please sign in to comment.