-
Notifications
You must be signed in to change notification settings - Fork 73
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
auto patch webhook objectSelector label on workload #158
auto patch webhook objectSelector label on workload #158
Conversation
5e6d7bd
to
1e0d1b7
Compare
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #158 +/- ##
==========================================
- Coverage 43.74% 43.38% -0.37%
==========================================
Files 50 50
Lines 5301 5352 +51
==========================================
+ Hits 2319 2322 +3
- Misses 2588 2634 +46
- Partials 394 396 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
case util.ControllerKruiseKindDS.Kind: | ||
workloadType = util.DaemonSetType | ||
} | ||
if workload.Annotations[util.WorkloadTypeLabel] == "" && workloadType != "" { |
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.
can we move this code block to a separate func ? e.g. updateRolloutWorkload, since it has nothing to do with the rollout object. updateRolloutWorkload can be placed before handleFinalizer
1e0d1b7
to
7c52ee5
Compare
@@ -19,6 +19,7 @@ package rollout | |||
import ( | |||
"context" | |||
"fmt" | |||
"k8s.io/apimachinery/pkg/runtime/schema" |
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.
goimports: File is not goimports
-ed
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
7c52ee5
to
728afb9
Compare
8d71bd5
to
34d2989
Compare
Signed-off-by: liheng.zms <[email protected]>
34d2989
to
082e0a5
Compare
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
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zmberg 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 |
Signed-off-by: liheng.zms <[email protected]>
Ⅰ. Describe what this PR does
Rollout patch webhook label on workload
Currently rollout will webhook all workloads update requests, include Deployment, StatefulSet, CloneSet, Advanced StatefulSet. But not all workloads have to be rollout released, and if kruise rollout crashes will lead to workload update failed. So we can add configuration in MutatingWebhookConfiguration yaml.
And the rollout controller patches the above label to the workload according to the Rollout objectRef.