Skip to content

Commit 3db249f

Browse files
authored
Merge pull request kubernetes-sigs#555 from CecileRobertMichon/sweep-todos
πŸƒ Remove all TODOs in the codebase
2 parents 994b380 + 9734e9f commit 3db249f

File tree

18 files changed

+8
-169
lines changed

18 files changed

+8
-169
lines changed

β€ŽMakefileβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ generate-go: $(CONTROLLER_GEN) $(MOCKGEN) $(CONVERSION_GEN) ## Runs Go related g
177177
paths=./api/... \
178178
paths=./$(EXP_DIR)/api/... \
179179
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt
180-
181180
$(CONVERSION_GEN) \
182181
--input-dirs=./api/v1alpha2 \
183182
--output-file-base=zz_generated.conversion \

β€ŽREADME.mdβ€Ž

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ hybrid deployments of Kubernetes.
1919

2020
Check out the [Cluster API Quick Start][quickstart] to create your first Kubernetes cluster on Azure using Cluster API.
2121

22-
## Features
23-
24-
TODO
25-
26-
---
22+
------
2723

2824
## Support Policy
2925

@@ -47,7 +43,7 @@ Each version of Cluster API for Azure will attempt to support at least two Kuber
4743

4844
**NOTE:** As the versioning for this project is tied to the versioning of Cluster API, future modifications to this policy may be made to more closely align with other providers in the Cluster API ecosystem.
4945

50-
---
46+
------
5147

5248
## Documentation
5349

β€Žapi/v1alpha2/zz_generated.conversion.goβ€Ž

Lines changed: 0 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žapi/v1alpha3/types.goβ€Ž

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,6 @@ import (
2323
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2424
)
2525

26-
// // ResourceSpec defines a generic spec that can used to define Azure resources.
27-
// TODO: ResourceSpec should be removed once concrete specs have been defined for all Azure resources in use.
28-
// type ResourceSpec interface{}
29-
30-
// TODO: Write type tests
31-
32-
// AzureResourceReference is a reference to a specific Azure resource by ID
33-
type AzureResourceReference struct {
34-
// ID of resource
35-
// +optional
36-
ID *string `json:"id,omitempty"`
37-
// TODO: Investigate if we should reference resources in other ways
38-
}
39-
40-
// TODO: Investigate resource filters
41-
4226
// AzureMachineProviderConditionType is a valid value for AzureMachineProviderCondition.Type
4327
type AzureMachineProviderConditionType string
4428

@@ -157,14 +141,6 @@ type SecurityGroup struct {
157141
Tags Tags `json:"tags,omitempty"`
158142
}
159143

160-
/*
161-
// TODO
162-
// String returns a string representation of the security group.
163-
func (s *SecurityGroup) String() string {
164-
return fmt.Sprintf("id=%s/name=%s", s.ID, s.Name)
165-
}
166-
*/
167-
168144
// SecurityGroupProtocol defines the protocol type for a security group rule.
169145
type SecurityGroupProtocol string
170146

@@ -197,45 +173,10 @@ type IngressRule struct {
197173
Destination *string `json:"destination,omitempty"`
198174
}
199175

200-
// TODO
201-
// String returns a string representation of the ingress rule.
202-
/*
203-
func (i *IngressRule) String() string {
204-
return fmt.Sprintf("protocol=%s/range=[%d-%d]/description=%s", i.Protocol, i.FromPort, i.ToPort, i.Description)
205-
}
206-
*/
207-
208176
// IngressRules is a slice of Azure ingress rules for security groups.
209177
type IngressRules []*IngressRule
210178

211-
// TODO
212-
// Difference returns the difference between this slice and the other slice.
213-
/*
214-
func (i IngressRules) Difference(o IngressRules) (out IngressRules) {
215-
for _, x := range i {
216-
found := false
217-
for _, y := range o {
218-
sort.Strings(x.CidrBlocks)
219-
sort.Strings(y.CidrBlocks)
220-
sort.Strings(x.SourceSecurityGroupIDs)
221-
sort.Strings(y.SourceSecurityGroupIDs)
222-
if reflect.DeepEqual(x, y) {
223-
found = true
224-
break
225-
}
226-
}
227-
228-
if !found {
229-
out = append(out, x)
230-
}
231-
}
232-
233-
return
234-
}
235-
*/
236-
237179
// PublicIP defines an Azure public IP address.
238-
// TODO: Remove once load balancer is implemented.
239180
type PublicIP struct {
240181
ID string `json:"id,omitempty"`
241182
Name string `json:"name,omitempty"`

β€Žapi/v1alpha3/zz_generated.deepcopy.goβ€Ž

Lines changed: 0 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žcloud/services/subnets/subnets.goβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ func (s *Service) Reconcile(ctx context.Context, spec interface{}) error {
7575
return errors.New("Invalid Subnet Specification")
7676
}
7777
if subnet, err := s.Get(ctx, subnetSpec); err == nil {
78-
// TODO: add validation on existing subnet
7978
// subnet already exists, skip creation
8079
if subnetSpec.Role == infrav1.SubnetControlPlane {
8180
subnet.DeepCopyInto(s.Scope.ControlPlaneSubnet())

β€Žcloud/services/virtualmachineextensions/virtualmachineextensions.goβ€Ž

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,6 @@ func (s *Service) Reconcile(ctx context.Context, spec interface{}) error {
7878
return errors.Wrapf(err, "cannot create vm extension")
7979
}
8080

81-
// TODO: review if can remove this code
82-
// if *vmExt.ProvisioningState != string(compute.ProvisioningStateSucceeded) {
83-
// // If the script failed delete it so it can be retried
84-
// s.Delete(ctx, vmExtSpec)
85-
// }
86-
8781
klog.V(2).Infof("successfully created vm extension %s ", vmExtSpec.Name)
8882
return nil
8983
}

β€Žcloud/services/virtualmachines/virtualmachines.goβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ func getResourceNameByID(resourceID string) string {
275275

276276
// generateStorageProfile generates a pointer to a compute.StorageProfile which can utilized for VM creation.
277277
func generateStorageProfile(vmSpec Spec) (*compute.StorageProfile, error) {
278-
// TODO: Validate parameters before building storage profile
279278
storageProfile := &compute.StorageProfile{
280279
OsDisk: &compute.OSDisk{
281280
Name: to.StringPtr(azure.GenerateOSDiskName(vmSpec.Name)),

β€Žcloud/services/virtualnetworks/virtualnetworks.goβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ func (s *Service) Reconcile(ctx context.Context, spec interface{}) error {
8989
s.Scope.V(2).Info("Working on custom vnet", "vnet-id", vnet.ID)
9090
}
9191
// vnet already exists, cannot update since it's immutable
92-
// TODO: ensure tags & other managed vnet attributes
9392
vnet.DeepCopyInto(s.Scope.Vnet())
9493
return nil
9594
}

β€Žcontrollers/azurecluster_controller.goβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ func (r *AzureClusterReconciler) reconcileNormal(clusterScope *scope.ClusterScop
123123
return reconcile.Result{}, errors.Wrap(err, "failed to reconcile cluster services")
124124
}
125125

126-
// TODO: We may need to use azureCluster.Status.Network.APIServerIP.IPAddress
127-
// instead when we look at configuring private clusters.
128126
if azureCluster.Status.Network.APIServerIP.DNSName == "" {
129127
clusterScope.Info("Waiting for API server endpoint to exist")
130128
return reconcile.Result{RequeueAfter: 15 * time.Second}, nil

0 commit comments

Comments
Β (0)