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

Enable the support of NodeSelectors and tolerations on Jobs #1479

Merged
merged 2 commits into from
Jul 11, 2023

Conversation

houshengbo
Copy link
Contributor

@houshengbo houshengbo commented Jun 22, 2023

Fixes: #1480

@knative-prow knative-prow bot requested review from aliok and maximilien June 22, 2023 21:11
@knative-prow knative-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 22, 2023
@knative-prow
Copy link

knative-prow bot commented Jun 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: houshengbo

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 22, 2023
@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Patch coverage: 57.14% and project coverage change: -0.09 ⚠️

Comparison is base (d3a1748) 79.32% compared to head (22a3bc5) 79.23%.

❗ Current head 22a3bc5 differs from pull request most recent head 9f4b20a. Consider uploading reports for the commit 9f4b20a to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1479      +/-   ##
==========================================
- Coverage   79.32%   79.23%   -0.09%     
==========================================
  Files          40       40              
  Lines        1775     1782       +7     
==========================================
+ Hits         1408     1412       +4     
- Misses        267      269       +2     
- Partials      100      101       +1     
Impacted Files Coverage Δ
pkg/reconciler/common/workload_override.go 85.71% <57.14%> (-1.43%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@nak3 nak3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for one nit.

@@ -61,6 +62,14 @@ func OverridesTransform(overrides []base.WorkloadOverride, log *zap.SugaredLogge
ss.Spec.Replicas = override.Replicas
}
}
if u.GetKind() == "Job" && u.GetGenerateName() == override.Name {
ss := &batchv1.Job{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ss := &batchv1.Job{}
job := &batchv1.Job{}

nit: ss is used for StatefulSet above but here is job.

@houshengbo houshengbo force-pushed the add-job-selector-toleration branch 2 times, most recently from a4d57f8 to 22a3bc5 Compare July 6, 2023 16:29
@houshengbo houshengbo force-pushed the add-job-selector-toleration branch from 22a3bc5 to 9f4b20a Compare July 6, 2023 16:59
@nak3
Copy link
Contributor

nak3 commented Jul 7, 2023

/lgtm
/retest

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2023
@houshengbo
Copy link
Contributor Author

/test serving-upgrade-tests

@knative-prow knative-prow bot merged commit a9b6fb7 into knative:main Jul 11, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the ability to configure tolerations and nodeselector for Knative pre/post-install jobs
2 participants