Skip to content

Commit

Permalink
Review findings
Browse files Browse the repository at this point in the history
Signed-off-by: killianmuldoon <[email protected]>
  • Loading branch information
killianmuldoon committed Sep 25, 2023
1 parent dfa31df commit b4025de
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apis/v1beta1/vsphereclusteridentity_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
const (
// SecretIdentitySetFinalizer is the finalizer for VSphereCluster credentials secrets .
SecretIdentitySetFinalizer = "vspherecluster/infrastructure.cluster.x-k8s.io"
// VSphereClusterIdentityFinalizer is the finalizer for VSphereClusterIdentityFinalizer credentials secrets.
// VSphereClusterIdentityFinalizer is the finalizer for VSphereClusterIdentity credentials secrets.
VSphereClusterIdentityFinalizer = "vsphereclusteridentity/infrastructure.cluster.x-k8s.io"
)

Expand Down
2 changes: 1 addition & 1 deletion apis/vmware/v1beta1/vspherecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type VSphereClusterStatus struct {
// +kubebuilder:storageversion
// +kubebuilder:subresource:status

// VSphereCluster is the Schema for the VSphereClusters APIl.
// VSphereCluster is the Schema for the VSphereClusters API.
type VSphereCluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// Package constants contains a number of constants used in CAPV.
// Package constants contains constants used in CAPV.
package constants

import (
Expand Down
2 changes: 1 addition & 1 deletion pkg/identity/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
const (
// UsernameKey is the key used for the username.
UsernameKey = "username"
// PasswordKey is the key used for the username.
// PasswordKey is the key used for the password.
PasswordKey = "password"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/services/govmomi/clustermodules/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (cm *provider) DoesModuleExist(ctx context.Context, moduleID string, cluste
return false, nil
}

// IsMoRefModuleMember checks whether the passed managed objectReference is in the ClusterModule.
// IsMoRefModuleMember checks whether the passed managed object reference is in the ClusterModule.
func (cm *provider) IsMoRefModuleMember(ctx context.Context, moduleID string, moRef types.ManagedObjectReference) (bool, error) {
moduleMembers, err := cm.manager.ListModuleMembers(ctx, moduleID)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/services/network/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
package network

const (
// NSXTTypeNetwork is the name of the NSXT network type.
// NSXTTypeNetwork is the name of the NSX-T network type.
NSXTTypeNetwork = "nsx-t"
// NSXTVNetSelectorKey is also defined in VM Operator.
NSXTVNetSelectorKey = "ncp.vmware.com/virtual-network-name"
Expand Down
4 changes: 2 additions & 2 deletions pkg/services/vimmachine.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (v *VimMachineService) FetchVSphereCluster(c client.Client, cluster *cluste
return vimMachineCtx, err
}

// ReconcileDelete reconciles delete events for the VSphereVM.
// ReconcileDelete reconciles delete events for the VSphere VM.
func (v *VimMachineService) ReconcileDelete(machineCtx capvcontext.MachineContext) error {
vimMachineCtx, ok := machineCtx.(*capvcontext.VIMMachineContext)
if !ok {
Expand Down Expand Up @@ -115,7 +115,7 @@ func (v *VimMachineService) SyncFailureReason(machineCtx capvcontext.MachineCont
return vimMachineCtx.VSphereMachine.Status.FailureReason != nil || vimMachineCtx.VSphereMachine.Status.FailureMessage != nil, err
}

// ReconcileNormal reconciles create and update events for the VSphereVM.
// ReconcileNormal reconciles create and update events for the VSphere VM.
func (v *VimMachineService) ReconcileNormal(machineCtx capvcontext.MachineContext) (bool, error) {
vimMachineCtx, ok := machineCtx.(*capvcontext.VIMMachineContext)
if !ok {
Expand Down
1 change: 0 additions & 1 deletion pkg/util/vmware/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (

// GetMachineDeploymentNameForCluster returns the MachineDeployment name for a Cluster.
// This is also the name used by VSphereMachineTemplate and KubeadmConfigTemplate.
// TODO: (killianmuldoon) remove this.
func GetMachineDeploymentNameForCluster(cluster *clusterv1.Cluster) string {
return fmt.Sprintf("%s-workers-0", cluster.Name)
}

0 comments on commit b4025de

Please sign in to comment.