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

Request ephemeral storage to run 1-28-test-presubmit on fargate #537

Merged
merged 4 commits into from
Sep 6, 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
13 changes: 6 additions & 7 deletions jobs/aws/eks-distro/kubernetes-1-28-test-presubmits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,18 @@ presubmits:
always_run: false
run_if_changed: "projects/kubernetes/kubernetes/1-28/(GIT_TAG|patches)"
max_concurrency: 10
cluster: "prow-postsubmits-cluster"
cluster: "prow-presubmits-cluster"
skip_report: false
decoration_config:
gcs_configuration:
bucket: s3://prowdataclusterstack-316434458-prowbucket7c73355c-1n9f9v93wpjcm
bucket: s3://prowpresubmitsdataclusterstack-prowbucket7c73355c-vfwwxd2eb4gp
path_strategy: explicit
s3_credentials_secret: s3-credentials
labels:
disk-usage: "true"
spec:
serviceaccountName: postsubmits-build-account
serviceaccountName: presubmits-build-account
automountServiceAccountToken: false
nodeSelector:
arch: AMD64
containers:
- name: build-container
image: public.ecr.aws/eks-distro-build-tooling/builder-base:standard-db4232c256f3148b52205cce52f15716beec4011.2
Expand All @@ -55,8 +53,9 @@ presubmits:
value: "1-28"
resources:
requests:
memory: "16Gi"
cpu: "4"
memory: "32Gi"
cpu: "16"
ephemeralStorage: "50Gi"
- command:
- sh
args:
Expand Down
9 changes: 0 additions & 9 deletions linter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ func PresubmitBucketCheck(jc *JobConstants) presubmitCheck {
if strings.Contains(presubmitConfig.JobBase.Name, "kubernetes-1-27-test-presubmit") {
return true, 0, ""
}
if strings.Contains(presubmitConfig.JobBase.Name, "kubernetes-1-28-test-presubmit") {
return true, 0, ""
}
if presubmitConfig.JobBase.UtilityConfig.DecorationConfig.GCSConfiguration.Bucket != jc.Bucket {
return false, findLineNumber(fileContentsString, "bucket:"), fmt.Sprintf(`Incorrect bucket configuration, please configure S3 bucket as => bucket: %s`, jc.Bucket)
}
Expand All @@ -151,9 +148,6 @@ func PresubmitClusterCheck(jc *JobConstants) presubmitCheck {
if strings.Contains(presubmitConfig.JobBase.Name, "kubernetes-1-27-test-presubmit") {
return true, 0, ""
}
if strings.Contains(presubmitConfig.JobBase.Name, "kubernetes-1-28-test-presubmit") {
return true, 0, ""
}
if presubmitConfig.JobBase.Cluster != jc.Cluster {
return false, findLineNumber(fileContentsString, "cluster:"), fmt.Sprintf(`Incorrect cluster configuration, please configure cluster as => cluster: "%s"`, jc.Cluster)
}
Expand All @@ -178,9 +172,6 @@ func PresubmitServiceAccountCheck(jc *JobConstants) presubmitCheck {
if strings.Contains(presubmitConfig.JobBase.Name, "kubernetes-1-27-test-presubmit") {
return true, 0, ""
}
if strings.Contains(presubmitConfig.JobBase.Name, "kubernetes-1-28-test-presubmit") {
return true, 0, ""
}
if presubmitConfig.JobBase.Spec.ServiceAccountName != jc.ServiceAccountName {
return false, findLineNumber(fileContentsString, "serviceaccountName:"), fmt.Sprintf(`Incorrect service account configuration, please configure service account as => serviceaccountName: %s`, jc.ServiceAccountName)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ envVars:

# The following `if` block is a temp solution while awaiting more storage in presubmits from Fargate team.
# Once we have more space available we should move this back to the presubmit cluster
{{if or (eq .releaseBranch "1-27") (eq .releaseBranch "1-28")}}
{{ if eq .releaseBranch "1-27" }}
architecture: AMD64
cluster: prow-postsubmits-cluster
resources:
Expand All @@ -19,12 +19,15 @@ resources:
requests:
cpu: 4
memory: 16Gi
{{else}}
{{ else }}
resources:
limits:
cpu: 16
memory: 32Gi
requests:
cpu: 16
memory: 32Gi
{{end}}
{{ if eq .releaseBranch "1-28" }}
ephemeralStorage: "50Gi"
{{ end }}
{{ end }}
5 changes: 3 additions & 2 deletions templater/jobs/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ type Resources struct {
}

type ResourceConfig struct {
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
EphemeralStorage string `json:"ephemeralStorage,omitempty"`
}

type HostPath struct {
Expand Down
3 changes: 3 additions & 0 deletions templater/templates/presubmits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ presubmits:
requests:
memory: "{{ .resources.Requests.Memory }}"
cpu: "{{ .resources.Requests.CPU }}"
{{- if .resources.Requests.EphemeralStorage }}
ephemeralStorage: "{{ .resources.Requests.EphemeralStorage }}"
{{- end }}
{{- end }}
{{- end }}
{{- if .volumeMounts }}
Expand Down