mirror of https://github.com/kubernetes/kops.git
Merge pull request #10739 from zhijianli88/master
Fix ineffassign issues
This commit is contained in:
commit
f7b0f4444a
|
|
@ -627,7 +627,6 @@ func validateNetworking(cluster *kops.Cluster, v *kops.NetworkingSpec, fldPath *
|
|||
if optionTaken {
|
||||
allErrs = append(allErrs, field.Forbidden(fldPath.Child("gce"), "only one networking option permitted"))
|
||||
}
|
||||
optionTaken = true
|
||||
|
||||
allErrs = append(allErrs, validateNetworkingGCE(c, v.GCE, fldPath.Child("gce"))...)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,12 +103,10 @@ func (_ *RAMPolicy) RenderALI(t *aliup.ALIAPITarget, a, e, changes *RAMPolicy) e
|
|||
return fmt.Errorf("error rendering PolicyDocument: %v", err)
|
||||
}
|
||||
|
||||
policyRequest := ram.PolicyRequest{}
|
||||
|
||||
if a == nil {
|
||||
klog.V(2).Infof("Creating RAMPolicy with Name:%q", fi.StringValue(e.Name))
|
||||
|
||||
policyRequest = ram.PolicyRequest{
|
||||
policyRequest := ram.PolicyRequest{
|
||||
PolicyName: fi.StringValue(e.Name),
|
||||
PolicyDocument: policy,
|
||||
PolicyType: ram.Type(fi.StringValue(e.PolicyType)),
|
||||
|
|
|
|||
|
|
@ -171,7 +171,6 @@ func (_ *Subnet) RenderGCE(t *gce.GCEAPITarget, a, e, changes *Subnet) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("error patching Subnet: %v", err)
|
||||
}
|
||||
patch = false
|
||||
_, err = cloud.Compute().Subnetworks.Get(cloud.Project(), cloud.Region(), *e.GCEName).Do()
|
||||
if err != nil {
|
||||
return fmt.Errorf("error fetching subnet for patch: %v", err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue