Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 4bceea1

Browse files
committed
docs: Update comments
- Add missing package comments - Add missing exported function comments - also add periods to end of many comments Signed-off-by: Chris Privitere <[email protected]>
1 parent 721e346 commit 4bceea1

20 files changed

+94
-65
lines changed

api/v1alpha3/groupversion_info.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ import (
2525
)
2626

2727
var (
28-
// GroupVersion is group version used to register these objects
28+
// GroupVersion is group version used to register these objects.
2929
GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha3"}
3030

31-
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
31+
// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
3232
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
3333

3434
// AddToScheme adds the types in this group-version to the given scheme.

api/v1alpha3/packetcluster_types.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ import (
2121
clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha3"
2222
)
2323

24-
// VIPManagerType describes if the VIP will be managed by CPEM or kube-vip
24+
// VIPManagerType describes if the VIP will be managed by CPEM or kube-vip.
2525
type VIPManagerType string
2626

27-
// PacketClusterSpec defines the desired state of PacketCluster
27+
// PacketClusterSpec defines the desired state of PacketCluster.
2828
type PacketClusterSpec struct {
2929
// ProjectID represents the Packet Project where this cluster will be placed into
3030
ProjectID string `json:"projectID"`
@@ -48,7 +48,7 @@ type PacketClusterSpec struct {
4848
VIPManager VIPManagerType `json:"vipManager"`
4949
}
5050

51-
// PacketClusterStatus defines the observed state of PacketCluster
51+
// PacketClusterStatus defines the observed state of PacketCluster.
5252
type PacketClusterStatus struct {
5353
// Ready denotes that the cluster (infrastructure) is ready.
5454
// +optional
@@ -61,7 +61,7 @@ type PacketClusterStatus struct {
6161
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this PacketCluster belongs"
6262
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="PacketCluster ready status"
6363

64-
// PacketCluster is the Schema for the packetclusters API
64+
// PacketCluster is the Schema for the packetclusters API.
6565
type PacketCluster struct {
6666
metav1.TypeMeta `json:",inline"`
6767
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -72,7 +72,7 @@ type PacketCluster struct {
7272

7373
// +kubebuilder:object:root=true
7474

75-
// PacketClusterList contains a list of PacketCluster
75+
// PacketClusterList contains a list of PacketCluster.
7676
type PacketClusterList struct {
7777
metav1.TypeMeta `json:",inline"`
7878
metav1.ListMeta `json:"metadata,omitempty"`

api/v1alpha3/packetmachine_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const (
2828
MachineFinalizer = "packetmachine.infrastructure.cluster.x-k8s.io"
2929
)
3030

31-
// PacketMachineSpec defines the desired state of PacketMachine
31+
// PacketMachineSpec defines the desired state of PacketMachine.
3232
type PacketMachineSpec struct {
3333
OS string `json:"OS"` //nolint: tagliatelle
3434
BillingCycle string `json:"billingCycle"`
@@ -64,7 +64,7 @@ type PacketMachineSpec struct {
6464
Tags Tags `json:"tags,omitempty"`
6565
}
6666

67-
// PacketMachineStatus defines the observed state of PacketMachine
67+
// PacketMachineStatus defines the observed state of PacketMachine.
6868
type PacketMachineStatus struct {
6969
// Ready is true when the provider resource is ready.
7070
// +optional
@@ -112,7 +112,7 @@ type PacketMachineStatus struct {
112112
// +kubebuilder:printcolumn:name="InstanceID",type="string",JSONPath=".spec.providerID",description="Packet instance ID"
113113
// +kubebuilder:printcolumn:name="Machine",type="string",JSONPath=".metadata.ownerReferences[?(@.kind==\"Machine\")].name",description="Machine object which owns with this PacketMachine"
114114

115-
// PacketMachine is the Schema for the packetmachines API
115+
// PacketMachine is the Schema for the packetmachines API.
116116
type PacketMachine struct {
117117
metav1.TypeMeta `json:",inline"`
118118
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -123,7 +123,7 @@ type PacketMachine struct {
123123

124124
// +kubebuilder:object:root=true
125125

126-
// PacketMachineList contains a list of PacketMachine
126+
// PacketMachineList contains a list of PacketMachine.
127127
type PacketMachineList struct {
128128
metav1.TypeMeta `json:",inline"`
129129
metav1.ListMeta `json:"metadata,omitempty"`

api/v1alpha3/packetmachinetemplate_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2121
)
2222

23-
// PacketMachineTemplateSpec defines the desired state of PacketMachineTemplate
23+
// PacketMachineTemplateSpec defines the desired state of PacketMachineTemplate.
2424
type PacketMachineTemplateSpec struct {
2525
Template PacketMachineTemplateResource `json:"template"`
2626
}
2727

2828
// +kubebuilder:object:root=true
2929
// +kubebuilder:resource:path=packetmachinetemplates,shortName=pmt,scope=Namespaced,categories=cluster-api
3030

31-
// PacketMachineTemplate is the Schema for the packetmachinetemplates API
31+
// PacketMachineTemplate is the Schema for the packetmachinetemplates API.
3232
type PacketMachineTemplate struct {
3333
metav1.TypeMeta `json:",inline"`
3434
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -38,7 +38,7 @@ type PacketMachineTemplate struct {
3838

3939
// +kubebuilder:object:root=true
4040

41-
// PacketMachineTemplateList contains a list of PacketMachineTemplate
41+
// PacketMachineTemplateList contains a list of PacketMachineTemplate.
4242
type PacketMachineTemplateList struct {
4343
metav1.TypeMeta `json:",inline"`
4444
metav1.ListMeta `json:"metadata,omitempty"`

api/v1alpha3/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var (
4242
// Tags defines a slice of tags.
4343
type Tags []string
4444

45-
// PacketMachineTemplateResource describes the data needed to create am PacketMachine from a template
45+
// PacketMachineTemplateResource describes the data needed to create am PacketMachine from a template.
4646
type PacketMachineTemplateResource struct {
4747
// Spec is the specification of the desired behavior of the machine.
4848
Spec PacketMachineSpec `json:"spec"`

api/v1beta1/groupversion_info.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ import (
2525
)
2626

2727
var (
28-
// GroupVersion is group version used to register these objects
28+
// GroupVersion is group version used to register these objects.
2929
GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1beta1"}
3030

31-
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
31+
// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
3232
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
3333

3434
// AddToScheme adds the types in this group-version to the given scheme.

api/v1beta1/packetcluster_types.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ const (
2626
NetworkInfrastructureReadyCondition clusterv1.ConditionType = "NetworkInfrastructureReady"
2727
)
2828

29-
// VIPManagerType describes if the VIP will be managed by CPEM or kube-vip
29+
// VIPManagerType describes if the VIP will be managed by CPEM or kube-vip.
3030
type VIPManagerType string
3131

32-
// PacketClusterSpec defines the desired state of PacketCluster
32+
// PacketClusterSpec defines the desired state of PacketCluster.
3333
type PacketClusterSpec struct {
3434
// ProjectID represents the Packet Project where this cluster will be placed into
3535
ProjectID string `json:"projectID"`
@@ -53,7 +53,7 @@ type PacketClusterSpec struct {
5353
VIPManager VIPManagerType `json:"vipManager"`
5454
}
5555

56-
// PacketClusterStatus defines the observed state of PacketCluster
56+
// PacketClusterStatus defines the observed state of PacketCluster.
5757
type PacketClusterStatus struct {
5858
// Ready denotes that the cluster (infrastructure) is ready.
5959
// +optional
@@ -71,7 +71,7 @@ type PacketClusterStatus struct {
7171
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this PacketCluster belongs"
7272
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="PacketCluster ready status"
7373

74-
// PacketCluster is the Schema for the packetclusters API
74+
// PacketCluster is the Schema for the packetclusters API.
7575
type PacketCluster struct {
7676
metav1.TypeMeta `json:",inline"`
7777
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -82,7 +82,7 @@ type PacketCluster struct {
8282

8383
// +kubebuilder:object:root=true
8484

85-
// PacketClusterList contains a list of PacketCluster
85+
// PacketClusterList contains a list of PacketCluster.
8686
type PacketClusterList struct {
8787
metav1.TypeMeta `json:",inline"`
8888
metav1.ListMeta `json:"metadata,omitempty"`

api/v1beta1/packetmachine_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const (
5151
WaitingForBootstrapDataReason = "WaitingForBootstrapData"
5252
)
5353

54-
// PacketMachineSpec defines the desired state of PacketMachine
54+
// PacketMachineSpec defines the desired state of PacketMachine.
5555
type PacketMachineSpec struct {
5656
OS string `json:"os"`
5757
BillingCycle string `json:"billingCycle"`
@@ -87,7 +87,7 @@ type PacketMachineSpec struct {
8787
Tags Tags `json:"tags,omitempty"`
8888
}
8989

90-
// PacketMachineStatus defines the observed state of PacketMachine
90+
// PacketMachineStatus defines the observed state of PacketMachine.
9191
type PacketMachineStatus struct {
9292
// Ready is true when the provider resource is ready.
9393
// +optional
@@ -140,7 +140,7 @@ type PacketMachineStatus struct {
140140
// +kubebuilder:printcolumn:name="InstanceID",type="string",JSONPath=".spec.providerID",description="Packet instance ID"
141141
// +kubebuilder:printcolumn:name="Machine",type="string",JSONPath=".metadata.ownerReferences[?(@.kind==\"Machine\")].name",description="Machine object which owns with this PacketMachine"
142142

143-
// PacketMachine is the Schema for the packetmachines API
143+
// PacketMachine is the Schema for the packetmachines API.
144144
type PacketMachine struct {
145145
metav1.TypeMeta `json:",inline"`
146146
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -151,7 +151,7 @@ type PacketMachine struct {
151151

152152
// +kubebuilder:object:root=true
153153

154-
// PacketMachineList contains a list of PacketMachine
154+
// PacketMachineList contains a list of PacketMachine.
155155
type PacketMachineList struct {
156156
metav1.TypeMeta `json:",inline"`
157157
metav1.ListMeta `json:"metadata,omitempty"`

api/v1beta1/packetmachinetemplate_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2121
)
2222

23-
// PacketMachineTemplateSpec defines the desired state of PacketMachineTemplate
23+
// PacketMachineTemplateSpec defines the desired state of PacketMachineTemplate.
2424
type PacketMachineTemplateSpec struct {
2525
Template PacketMachineTemplateResource `json:"template"`
2626
}
@@ -29,7 +29,7 @@ type PacketMachineTemplateSpec struct {
2929
// +kubebuilder:resource:path=packetmachinetemplates,shortName=pmt,scope=Namespaced,categories=cluster-api
3030
// +kubebuilder:storageversion
3131

32-
// PacketMachineTemplate is the Schema for the packetmachinetemplates API
32+
// PacketMachineTemplate is the Schema for the packetmachinetemplates API.
3333
type PacketMachineTemplate struct {
3434
metav1.TypeMeta `json:",inline"`
3535
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -39,7 +39,7 @@ type PacketMachineTemplate struct {
3939

4040
// +kubebuilder:object:root=true
4141

42-
// PacketMachineTemplateList contains a list of PacketMachineTemplate
42+
// PacketMachineTemplateList contains a list of PacketMachineTemplate.
4343
type PacketMachineTemplateList struct {
4444
metav1.TypeMeta `json:",inline"`
4545
metav1.ListMeta `json:"metadata,omitempty"`

api/v1beta1/tags.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ limitations under the License.
1717
package v1beta1
1818

1919
const (
20+
// ControlPlaneTag defines what we tag the control plane nodes in Equinix Metal.
2021
ControlPlaneTag = "kubernetes.io/role:master"
21-
WorkerTag = "kubernetes.io/role:node"
22+
// WorkerTag defines what we tag the control plane nodes in Equinix Metal.
23+
WorkerTag = "kubernetes.io/role:node"
2224
)

0 commit comments

Comments
 (0)