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: configurable and more aggressive cleanup of old AnalysisRuns and Experiments #1342

Merged
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bb1d92b
feat: More aggressive cleanup of old AnalysisRuns and Experiments (1214)
perenesenko Jul 12, 2021
8d8bfac
feat: Adding description for the analysis run history configuration t…
perenesenko Jul 13, 2021
46bc616
feat: Adding description for the analysis run history configuration i…
perenesenko Jul 14, 2021
92c251f
feat: Change the parameter olderRSs => allRSs
perenesenko Jul 14, 2021
87429e0
feat: Updating test, shuffle the ARs order
perenesenko Jul 14, 2021
c4aa8a5
Adding tests for AnalysisRun history limits
perenesenko Jul 23, 2021
d39f4e0
lint fix, adding new line for import
perenesenko Jul 23, 2021
cfb6986
launch codegen to pass the build checks
perenesenko Jul 23, 2021
0dcb5a5
fix the tests, remove accidental modification
perenesenko Jul 23, 2021
d37650d
launch codegen
perenesenko Jul 26, 2021
9ecdf29
Adding tests for AnalysisRun history limits
perenesenko Jul 26, 2021
01536ea
lint fix sorting import
perenesenko Jul 26, 2021
ebaaf3e
feat: More aggressive cleanup of old AnalysisRuns and Experiments. Re…
perenesenko Aug 3, 2021
6eeedbe
feat: More aggressive cleanup of old AnalysisRuns and Experiments. Re…
perenesenko Aug 3, 2021
d9ead0c
feat: More aggressive cleanup of old AnalysisRuns and Experiments. Re…
perenesenko Aug 3, 2021
8858399
feat: More aggressive cleanup for only 2 phases successful and failed
perenesenko Aug 3, 2021
6e3374e
feat: More aggressive cleanup of old AnalysisRuns and Experiments. Re…
perenesenko Aug 3, 2021
eb3403e
feat: More aggressive cleanup of old AnalysisRuns and Experiments. Us…
perenesenko Aug 3, 2021
5a8de9c
feat: More aggressive cleanup of old Experiments
perenesenko Aug 3, 2021
43d6813
feat: More aggressive cleanup of old Experiments. Adding tests
perenesenko Aug 3, 2021
24d3b46
Change imports order to fix linter
perenesenko Aug 3, 2021
0a91596
feat: More aggressive cleanup of old Experiments. Default limits to 5
perenesenko Aug 4, 2021
720fdf8
feat: More aggressive cleanup of old Experiments. Codegen
perenesenko Aug 4, 2021
d5a3c2c
feat: More aggressive cleanup of old Experiments. Adding docs, rename…
perenesenko Aug 4, 2021
01b16c6
sort imports
perenesenko Aug 4, 2021
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
5 changes: 5 additions & 0 deletions docs/features/specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ spec:
# Number of desired pods.
# Defaults to 1.
replicas: 5
analysis:
# limits the number of failed analysis runs to be stored in a history
succeedRunHistoryLimit: 0
# limits the number of succeeded analysis runs to be stored in a history
failedRunHistoryLimit: 0
perenesenko marked this conversation as resolved.
Show resolved Hide resolved

# Label selector for pods. Existing ReplicaSets whose pods are selected by
# this will be the ones affected by this rollout. It must match the pod
Expand Down
3 changes: 2 additions & 1 deletion examples/analysis-templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
args: [exit 0]
restartPolicy: Never
backoffLimit: 0

count: 1
---
# This AnalysisTemplate will run a Kubernetes Job every 5 seconds, with a 50% chance of failure.
# When the number of accumulated failures exceeds failureLimit, it will cause the analysis run to
Expand All @@ -36,6 +36,7 @@ metadata:
spec:
metrics:
- name: random-fail
count: 2
perenesenko marked this conversation as resolved.
Show resolved Hide resolved
interval: 5s
failureLimit: 1
provider:
Expand Down
9 changes: 9 additions & 0 deletions manifests/crds/rollout-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ spec:
type: object
spec:
properties:
analysis:
properties:
failedRunHistoryLimit:
format: int32
type: integer
succeedRunHistoryLimit:
format: int32
type: integer
type: object
minReadySeconds:
format: int32
type: integer
Expand Down
9 changes: 9 additions & 0 deletions manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9745,6 +9745,15 @@ spec:
type: object
spec:
properties:
analysis:
properties:
failedRunHistoryLimit:
format: int32
type: integer
succeedRunHistoryLimit:
format: int32
type: integer
type: object
minReadySeconds:
format: int32
type: integer
Expand Down
9 changes: 9 additions & 0 deletions manifests/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9745,6 +9745,15 @@ spec:
type: object
spec:
properties:
analysis:
properties:
failedRunHistoryLimit:
format: int32
type: integer
succeedRunHistoryLimit:
format: int32
type: integer
type: object
minReadySeconds:
format: int32
type: integer
Expand Down
20 changes: 20 additions & 0 deletions pkg/apiclient/rollout/rollout.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,22 @@
},
"title": "AmbassadorTrafficRouting defines the configuration required to use Ambassador as traffic\nrouter"
},
"github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.Analysis": {
"type": "object",
"properties": {
"succeedRunHistoryLimit": {
"type": "integer",
"format": "int32",
"title": "SucceedRunHistoryLimit limits the number of old analysis runs succeeded to be retained in a history"
},
"failedRunHistoryLimit": {
"type": "integer",
"format": "int32",
"title": "FailedRunHistoryLimit limits the number of old analysis runs failed to be retained in a history"
}
},
"title": "Analysis configuration for the analysis runs to retain"
},
"github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.AnalysisRunArgument": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1165,6 +1181,10 @@
"restartAt": {
"$ref": "#/definitions/k8s.io.apimachinery.pkg.apis.meta.v1.Time",
"title": "RestartAt indicates when all the pods of a Rollout should be restarted"
},
"analysis": {
"$ref": "#/definitions/github.com.argoproj.argo_rollouts.pkg.apis.rollouts.v1alpha1.Analysis",
"title": "Analysis configuration for the analysis runs to retain"
}
},
"title": "RolloutSpec is the spec for a Rollout resource"
Expand Down
Loading