Skip to content

Commit cda07b3

Browse files
committed
fix(capacitybuffer): correct spelling mistakes in function names and messages
Fixed spelling errors: - atrtibutesSetSuccessfully -> attributesSetSuccessfully - provisioing -> provisioning - UpdateBufferStatusToFailedProvisioing -> UpdateBufferStatusToFailedProvisioning - UpdateBufferStatusToSuccessfullyProvisioing -> UpdateBufferStatusToSuccessfullyProvisioning - passes -> passed (in function comments)
1 parent 7b95cb0 commit cda07b3

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

cluster-autoscaler/capacitybuffer/common/common.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@ func SetBufferAsReadyForProvisioning(buffer *v1.CapacityBuffer, PodTemplateRef *
4545
Type: ReadyForProvisioningCondition,
4646
Status: ConditionTrue,
4747
Message: "ready",
48-
Reason: "atrtibutesSetSuccessfully",
48+
Reason: "attributesSetSuccessfully",
4949
LastTransitionTime: metav1.Time{Time: time.Now()},
5050
}
5151
buffer.Status.Conditions = []metav1.Condition{readyCondition}
5252
}
5353

5454
// SetBufferAsNotReadyForProvisioning updates the passed buffer object with the rest of the attributes and sets its condition to not ready with the passed error
55-
func SetBufferAsNotReadyForProvisioning(buffer *v1.CapacityBuffer, PodTemplateRef *v1.LocalObjectRef, podTemplateGeneration *int64, replicas *int32, provStrategy *string, err error) {
56-
errorMessage := "Buffer not ready for provisioing"
55+
func SetBufferAsNotReadyForProvisioning(buffer *v1.CapacityBuffer, PodTemplateRef *v1.LocalObjectRef, podTemplateGeneration *int64, replicas *int32, provStrategy *string, err error) { errorMessage := "Buffer not ready for provisioning"
5756
if err != nil {
5857
errorMessage = err.Error()
5958
}
@@ -80,8 +79,8 @@ func mapEmptyProvStrategyToDefault(ps *string) *string {
8079
return ps
8180
}
8281

83-
// UpdateBufferStatusToFailedProvisioing updates the status of the passed buffer and set Provisioning to false with the passes reason and message
84-
func UpdateBufferStatusToFailedProvisioing(buffer *v1.CapacityBuffer, reason, errorMessage string) {
82+
// UpdateBufferStatusToFailedProvisioning updates the status of the passed buffer and set Provisioning to false with the passed reason and message
83+
func UpdateBufferStatusToFailedProvisioning(buffer *v1.CapacityBuffer, reason, errorMessage string) {
8584
buffer.Status.Conditions = []metav1.Condition{{
8685
Type: ProvisioningCondition,
8786
Status: ConditionFalse,
@@ -91,8 +90,8 @@ func UpdateBufferStatusToFailedProvisioing(buffer *v1.CapacityBuffer, reason, er
9190
}}
9291
}
9392

94-
// UpdateBufferStatusToSuccessfullyProvisioing updates the status of the passed buffer and set Provisioning to true with the passes reason
95-
func UpdateBufferStatusToSuccessfullyProvisioing(buffer *v1.CapacityBuffer, reason string) {
93+
// UpdateBufferStatusToSuccessfullyProvisioning updates the status of the passed buffer and set Provisioning to true with the passed reason
94+
func UpdateBufferStatusToSuccessfullyProvisioning(buffer *v1.CapacityBuffer, reason string) {
9695
buffer.Status.Conditions = []metav1.Condition{{
9796
Type: ProvisioningCondition,
9897
Status: ConditionTrue,

cluster-autoscaler/processors/capacitybuffer/pod_list_processor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ func (p *CapacityBufferPodListProcessor) provision(buffer *v1alpha1.CapacityBuff
140140
}
141141
fakePods, err := makeFakePods(buffer, &podTemplate.Template, int(*replicas))
142142
if err != nil {
143-
common.UpdateBufferStatusToFailedProvisioing(buffer, "FailedToMakeFakePods", fmt.Sprintf("failed to create fake pods with error: %v", err.Error()))
143+
common.UpdateBufferStatusToFailedProvisioning(buffer, "FailedToMakeFakePods", fmt.Sprintf("failed to create fake pods with error: %v", err.Error()))
144144
p.updateBufferStatus(buffer)
145145
return []*apiv1.Pod{}
146146
}
147-
common.UpdateBufferStatusToSuccessfullyProvisioing(buffer, "FakePodsInjected")
147+
common.UpdateBufferStatusToSuccessfullyProvisioning(buffer, "FakePodsInjected")
148148
p.updateBufferStatus(buffer)
149149
return fakePods
150150
}

0 commit comments

Comments
 (0)