-
Notifications
You must be signed in to change notification settings - Fork 168
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: support artifact retention #1408
Conversation
c0abd9d
to
5a6f305
Compare
lgtm |
5a6f305
to
bfbd2d4
Compare
sigs.k8s.io/yaml v1.2.0 // indirect | ||
) | ||
|
||
replace ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, since we used k8s.io/kubernetes
helm/cyclone/templates/server.yaml
Outdated
"retention_seconds": {{ .Values.server.artifact.retentionSeconds }}, | ||
"available_disk_percentage": {{ .Values.server.artifact.availableDiskPercentage }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be better to use similar style and extensible names.
"retention_seconds": {{ .Values.server.artifact.retentionSeconds }}, | |
"available_disk_percentage": {{ .Values.server.artifact.availableDiskPercentage }} | |
"retention_interval": {{ .Values.server.artifact.retentionInterval }}, | |
"retention_threshold": {{ .Values.server.artifact.retentionThreshold }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will change available_disk_percentage
to retention_disk_protection_threshold
release/cyclone-server.yaml
Outdated
@@ -64,8 +64,8 @@ _config: | |||
modes: | |||
- ReadWriteMany | |||
storage: | |||
request: 200Gi | |||
limit: 200Gi | |||
request: 500Gi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the quota is too large as we will not allow oversold of storage.
/cc @iawia002
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/hold
We are going to discuss this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update it to 10Gi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -59,6 +65,45 @@ func CreateWorkflowRun(ctx context.Context, project, workflow, tenant string, wf | |||
return handler.K8sClient.CycloneV1alpha1().WorkflowRuns(common.TenantNamespace(tenant)).Create(wfr) | |||
} | |||
|
|||
func workflowRunCreationDryRun(project, workflow, tenant string, wfr *v1alpha1.WorkflowRun) (*v1alpha1.WorkflowRun, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is a little confused, which will make CreateWorkflowRun()
more complex.
The target of this function is to check the disk free space before create the workflowrun.
I think it would be better to add an additional API for workflowrun precheck. We can add more precheck logic into this API later if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dry-run could do the same thing with precheck API. I think there is no need to add another API as the dry-run is easier to understand.
request: 10Gi | ||
limit: 10Gi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: supereagle The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
Which issue(s) this PR is related to (optional, link to 3rd issue(s)):
Fixes #
Reference to #
Special notes for your reviewer:
/cc @supereagle @hyy0322
Release note: