Skip to content

Commit

Permalink
Merge pull request #4607 from chymy/fix-comment-0513
Browse files Browse the repository at this point in the history
🌱 Fix comment issue in controlplane/kubeadm/internal/etcd/etcd.go
  • Loading branch information
k8s-ci-robot authored May 18, 2021
2 parents 9a69d3b + b5ffb8b commit 18b2741
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions controlplane/kubeadm/internal/etcd/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type AlarmType int32

const (
// AlarmOK denotes that the cluster member is OK.
AlarmOk AlarmType = iota
AlarmOK AlarmType = iota

// AlarmNoSpace denotes that the cluster member has run out of disk space.
AlarmNoSpace
Expand All @@ -80,7 +80,7 @@ const (

// AlarmTypeName provides a text translation for AlarmType codes.
var AlarmTypeName = map[AlarmType]string{
AlarmOk: "NONE",
AlarmOK: "NONE",
AlarmNoSpace: "NOSPACE",
AlarmCorrupt: "CORRUPT",
}
Expand Down Expand Up @@ -211,7 +211,7 @@ func (c *Client) RemoveMember(ctx context.Context, id uint64) error {
return errors.Wrapf(err, "failed to remove member: %v", id)
}

// UpdateMemberPeerList updates the list of peer URLs.
// UpdateMemberPeerURLs updates the list of peer URLs.
func (c *Client) UpdateMemberPeerURLs(ctx context.Context, id uint64, peerURLs []string) ([]*Member, error) {
response, err := c.EtcdClient.MemberUpdate(ctx, id, peerURLs)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (w *Workload) updateManagedEtcdConditions(ctx context.Context, controlPlane
alarmList := []string{}
for _, alarm := range member.Alarms {
switch alarm {
case etcd.AlarmOk:
case etcd.AlarmOK:
continue
default:
alarmList = append(alarmList, etcd.AlarmTypeName[alarm])
Expand Down
4 changes: 2 additions & 2 deletions util/record/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ func Eventf(object runtime.Object, reason, message string, args ...interface{})
defaultRecorder.Eventf(object, corev1.EventTypeNormal, strings.Title(reason), message, args...)
}

// Event constructs a warning event from the given information and puts it in the queue for sending.
// Warn constructs a warning event from the given information and puts it in the queue for sending.
func Warn(object runtime.Object, reason, message string) {
defaultRecorder.Event(object, corev1.EventTypeWarning, strings.Title(reason), message)
}

// Eventf is just like Event, but with Sprintf for the message field.
// Warnf is just like Warn, but with Sprintf for the message field.
func Warnf(object runtime.Object, reason, message string, args ...interface{}) {
defaultRecorder.Eventf(object, corev1.EventTypeWarning, strings.Title(reason), message, args...)
}

0 comments on commit 18b2741

Please sign in to comment.