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

Add event for cluster controller #749

Merged
merged 1 commit into from
Oct 19, 2021

Conversation

pigletfly
Copy link
Contributor

Signed-off-by: pigletfly [email protected]

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

Which issue(s) this PR fixes:
part of ##398

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

     NONE

@karmada-bot karmada-bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Sep 22, 2021
@karmada-bot karmada-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 22, 2021
@pigletfly pigletfly force-pushed the cluster-controller-event branch from a16e329 to 812b147 Compare October 9, 2021 11:22
@karmada-bot karmada-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 9, 2021
@pigletfly pigletfly force-pushed the cluster-controller-event branch from 812b147 to 810b2ba Compare October 9, 2021 11:26
@karmada-bot karmada-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 9, 2021
@pigletfly pigletfly force-pushed the cluster-controller-event branch from 810b2ba to bbed507 Compare October 9, 2021 11:27
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

Sorry for letting this sit so long, I missed it from my radar.

pkg/controllers/cluster/cluster_controller.go Outdated Show resolved Hide resolved
@@ -113,6 +115,7 @@ func (c *Controller) syncCluster(cluster *clusterv1alpha1.Cluster) (controllerru
// create execution space
err := c.createExecutionSpace(cluster)
if err != nil {
c.EventRecorder.Event(cluster, corev1.EventTypeWarning, fmt.Sprintf("Failed %s", eventTypeCreateExecutionNamespace), err.Error())
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
c.EventRecorder.Event(cluster, corev1.EventTypeWarning, fmt.Sprintf("Failed %s", eventTypeCreateExecutionNamespace), err.Error())
c.EventRecorder.Event(cluster, corev1.EventTypeWarning, eventReasonCreateExecutionNamespaceFailed, err.Error())

The reason might be proceeded by computer, so keep it short and clean.

pkg/controllers/cluster/cluster_controller.go Outdated Show resolved Hide resolved
@RainbowMango
Copy link
Member

cc @pigletfly
/assign
/priority important-soon

@karmada-bot karmada-bot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Oct 13, 2021
@RainbowMango
Copy link
Member

/remove-kind cleanup
/kind feature

@karmada-bot karmada-bot added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Oct 13, 2021
@RainbowMango RainbowMango added this to the v0.10 milestone Oct 13, 2021
@pigletfly pigletfly force-pushed the cluster-controller-event branch from bbed507 to 3e1d447 Compare October 19, 2021 01:57
@RainbowMango
Copy link
Member

/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 19, 2021
@RainbowMango RainbowMango added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 19, 2021
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: RainbowMango

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

@karmada-bot karmada-bot merged commit 9b97ca9 into karmada-io:master Oct 19, 2021
@pigletfly pigletfly deleted the cluster-controller-event branch February 25, 2022 08:15
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants