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

feat: add merge key to analysis template #2842

Merged
merged 1 commit into from
Jun 14, 2023
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
48 changes: 48 additions & 0 deletions docs/features/kustomize/rollout_cr_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -17124,6 +17124,22 @@
"type": "array",
"x-kubernetes-patch-merge-key": "metricName",
"x-kubernetes-patch-strategy": "merge"
},
"templates": {
"items": {
"properties": {
"clusterScope": {
"type": "boolean"
},
"templateName": {
"type": "string"
}
},
"type": "object"
},
"type": "array",
"x-kubernetes-patch-merge-key": "templateName",
"x-kubernetes-patch-strategy": "merge"
}
},
"type": "object"
Expand Down Expand Up @@ -17204,6 +17220,22 @@
"type": "array",
"x-kubernetes-patch-merge-key": "metricName",
"x-kubernetes-patch-strategy": "merge"
},
"templates": {
"items": {
"properties": {
"clusterScope": {
"type": "boolean"
},
"templateName": {
"type": "string"
}
},
"type": "object"
},
"type": "array",
"x-kubernetes-patch-merge-key": "templateName",
"x-kubernetes-patch-strategy": "merge"
}
},
"type": "object"
Expand Down Expand Up @@ -17292,6 +17324,22 @@
"type": "array",
"x-kubernetes-patch-merge-key": "metricName",
"x-kubernetes-patch-strategy": "merge"
},
"templates": {
"items": {
"properties": {
"clusterScope": {
"type": "boolean"
},
"templateName": {
"type": "string"
}
},
"type": "object"
},
"type": "array",
"x-kubernetes-patch-merge-key": "templateName",
"x-kubernetes-patch-strategy": "merge"
}
},
"type": "object"
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiclient/rollout/rollout.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@
"items": {
"$ref": "#/definitions/github.conef.uk.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.RolloutAnalysisTemplate"
},
"title": "Templates reference to a list of analysis templates to combine for an AnalysisRun"
"title": "Templates reference to a list of analysis templates to combine for an AnalysisRun\n+patchMergeKey=templateName\n+patchStrategy=merge"
},
"args": {
"type": "array",
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/rollouts/v1alpha1/generated.proto

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

12 changes: 12 additions & 0 deletions pkg/apis/rollouts/v1alpha1/openapi_generated.go

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

6 changes: 4 additions & 2 deletions pkg/apis/rollouts/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,10 @@ type RolloutAnalysisBackground struct {

// RolloutAnalysis defines a template that is used to create a analysisRun
type RolloutAnalysis struct {
//Templates reference to a list of analysis templates to combine for an AnalysisRun
Templates []RolloutAnalysisTemplate `json:"templates,omitempty" protobuf:"bytes,1,rep,name=templates"`
// Templates reference to a list of analysis templates to combine for an AnalysisRun
// +patchMergeKey=templateName
// +patchStrategy=merge
Templates []RolloutAnalysisTemplate `json:"templates,omitempty" patchStrategy:"merge" patchMergeKey:"templateName" protobuf:"bytes,1,rep,name=templates"`
leoluz marked this conversation as resolved.
Show resolved Hide resolved
// Args the arguments that will be added to the AnalysisRuns
// +patchMergeKey=name
// +patchStrategy=merge
Expand Down