Skip to content

Commit b5ffb8b

Browse files
committed
Fix comment issue in controlplane/kubeadm/internal/etcd/etcd.go
Signed-off-by: chymy <[email protected]> Signed-off-by: chymy <[email protected]>
1 parent ef06802 commit b5ffb8b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

controlplane/kubeadm/internal/etcd/etcd.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ type AlarmType int32
6969

7070
const (
7171
// AlarmOK denotes that the cluster member is OK.
72-
AlarmOk AlarmType = iota
72+
AlarmOK AlarmType = iota
7373

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

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

214-
// UpdateMemberPeerList updates the list of peer URLs.
214+
// UpdateMemberPeerURLs updates the list of peer URLs.
215215
func (c *Client) UpdateMemberPeerURLs(ctx context.Context, id uint64, peerURLs []string) ([]*Member, error) {
216216
response, err := c.EtcdClient.MemberUpdate(ctx, id, peerURLs)
217217
if err != nil {

controlplane/kubeadm/internal/workload_cluster_conditions.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func (w *Workload) updateManagedEtcdConditions(ctx context.Context, controlPlane
141141
alarmList := []string{}
142142
for _, alarm := range member.Alarms {
143143
switch alarm {
144-
case etcd.AlarmOk:
144+
case etcd.AlarmOK:
145145
continue
146146
default:
147147
alarmList = append(alarmList, etcd.AlarmTypeName[alarm])

util/record/recorder.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ func Eventf(object runtime.Object, reason, message string, args ...interface{})
5252
defaultRecorder.Eventf(object, corev1.EventTypeNormal, strings.Title(reason), message, args...)
5353
}
5454

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

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

0 commit comments

Comments
 (0)