Skip to content

Commit ee2b6e8

Browse files
committed
Remove unused ANCHOR comments
Signed-off-by: Stefan Büringer [email protected]
1 parent 49e535f commit ee2b6e8

24 files changed

+0
-252
lines changed

api/addons/v1beta1/clusterresourceset_types.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ const (
5151
ClusterResourceSetFinalizer = "addons.cluster.x-k8s.io"
5252
)
5353

54-
// ANCHOR: ClusterResourceSetSpec
55-
5654
// ClusterResourceSetSpec defines the desired state of ClusterResourceSet.
5755
type ClusterResourceSetSpec struct {
5856
// clusterSelector is the label selector for Clusters. The Clusters that are
@@ -73,8 +71,6 @@ type ClusterResourceSetSpec struct {
7371
Strategy string `json:"strategy,omitempty"`
7472
}
7573

76-
// ANCHOR_END: ClusterResourceSetSpec
77-
7874
// ClusterResourceSetResourceKind is a string representation of a ClusterResourceSet resource kind.
7975
type ClusterResourceSetResourceKind string
8076

@@ -115,8 +111,6 @@ func (c *ClusterResourceSetSpec) SetTypedStrategy(p ClusterResourceSetStrategy)
115111
c.Strategy = string(p)
116112
}
117113

118-
// ANCHOR: ClusterResourceSetStatus
119-
120114
// ClusterResourceSetStatus defines the observed state of ClusterResourceSet.
121115
type ClusterResourceSetStatus struct {
122116
// observedGeneration reflects the generation of the most recently observed ClusterResourceSet.
@@ -144,8 +138,6 @@ type ClusterResourceSetV1Beta2Status struct {
144138
Conditions []metav1.Condition `json:"conditions,omitempty"`
145139
}
146140

147-
// ANCHOR_END: ClusterResourceSetStatus
148-
149141
// GetConditions returns the set of conditions for this object.
150142
func (m *ClusterResourceSet) GetConditions() clusterv1beta1.Conditions {
151143
return m.Status.Conditions

api/addons/v1beta1/clusterresourcesetbinding_types.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ import (
2323
"k8s.io/apimachinery/pkg/runtime/schema"
2424
)
2525

26-
// ANCHOR: ResourceBinding
27-
2826
// ResourceBinding shows the status of a resource that belongs to a ClusterResourceSet matched by the owner cluster of the ClusterResourceSetBinding object.
2927
type ResourceBinding struct {
3028
// ResourceRef specifies a resource.
@@ -46,8 +44,6 @@ type ResourceBinding struct {
4644
Applied bool `json:"applied"`
4745
}
4846

49-
// ANCHOR_END: ResourceBinding
50-
5147
// ResourceSetBinding keeps info on all of the resources in a ClusterResourceSet.
5248
type ResourceSetBinding struct {
5349
// clusterResourceSetName is the name of the ClusterResourceSet that is applied to the owner cluster of the binding.
@@ -190,8 +186,6 @@ type ClusterResourceSetBinding struct {
190186
Spec ClusterResourceSetBindingSpec `json:"spec,omitempty"`
191187
}
192188

193-
// ANCHOR: ClusterResourceSetBindingSpec
194-
195189
// ClusterResourceSetBindingSpec defines the desired state of ClusterResourceSetBinding.
196190
type ClusterResourceSetBindingSpec struct {
197191
// bindings is a list of ClusterResourceSets and their resources.
@@ -207,8 +201,6 @@ type ClusterResourceSetBindingSpec struct {
207201
ClusterName string `json:"clusterName,omitempty"`
208202
}
209203

210-
// ANCHOR_END: ClusterResourceSetBindingSpec
211-
212204
// +kubebuilder:object:root=true
213205

214206
// ClusterResourceSetBindingList contains a list of ClusterResourceSetBinding.

api/addons/v1beta2/clusterresourceset_types.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ const (
5151
ClusterResourceSetFinalizer = "addons.cluster.x-k8s.io"
5252
)
5353

54-
// ANCHOR: ClusterResourceSetSpec
55-
5654
// ClusterResourceSetSpec defines the desired state of ClusterResourceSet.
5755
type ClusterResourceSetSpec struct {
5856
// clusterSelector is the label selector for Clusters. The Clusters that are
@@ -74,8 +72,6 @@ type ClusterResourceSetSpec struct {
7472
Strategy string `json:"strategy,omitempty"`
7573
}
7674

77-
// ANCHOR_END: ClusterResourceSetSpec
78-
7975
// ClusterResourceSetResourceKind is a string representation of a ClusterResourceSet resource kind.
8076
type ClusterResourceSetResourceKind string
8177

@@ -116,8 +112,6 @@ func (c *ClusterResourceSetSpec) SetTypedStrategy(p ClusterResourceSetStrategy)
116112
c.Strategy = string(p)
117113
}
118114

119-
// ANCHOR: ClusterResourceSetStatus
120-
121115
// ClusterResourceSetStatus defines the observed state of ClusterResourceSet.
122116
// +kubebuilder:validation:MinProperties=1
123117
type ClusterResourceSetStatus struct {
@@ -158,8 +152,6 @@ type ClusterResourceSetV1Beta1DeprecatedStatus struct {
158152
Conditions clusterv1.Conditions `json:"conditions,omitempty"`
159153
}
160154

161-
// ANCHOR_END: ClusterResourceSetStatus
162-
163155
// GetV1Beta1Conditions returns the set of conditions for this object.
164156
func (m *ClusterResourceSet) GetV1Beta1Conditions() clusterv1.Conditions {
165157
if m.Status.Deprecated == nil || m.Status.Deprecated.V1Beta1 == nil {

api/addons/v1beta2/clusterresourcesetbinding_types.go

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

25-
// ANCHOR: ResourceBinding
26-
2725
// ResourceBinding shows the status of a resource that belongs to a ClusterResourceSet matched by the owner cluster of the ClusterResourceSetBinding object.
2826
type ResourceBinding struct {
2927
// ResourceRef specifies a resource.
@@ -45,8 +43,6 @@ type ResourceBinding struct {
4543
Applied bool `json:"applied"`
4644
}
4745

48-
// ANCHOR_END: ResourceBinding
49-
5046
// ResourceSetBinding keeps info on all of the resources in a ClusterResourceSet.
5147
type ResourceSetBinding struct {
5248
// clusterResourceSetName is the name of the ClusterResourceSet that is applied to the owner cluster of the binding.
@@ -132,8 +128,6 @@ type ClusterResourceSetBinding struct {
132128
Spec ClusterResourceSetBindingSpec `json:"spec,omitempty,omitzero"`
133129
}
134130

135-
// ANCHOR: ClusterResourceSetBindingSpec
136-
137131
// ClusterResourceSetBindingSpec defines the desired state of ClusterResourceSetBinding.
138132
type ClusterResourceSetBindingSpec struct {
139133
// bindings is a list of ClusterResourceSets and their resources.
@@ -149,8 +143,6 @@ type ClusterResourceSetBindingSpec struct {
149143
ClusterName string `json:"clusterName"`
150144
}
151145

152-
// ANCHOR_END: ClusterResourceSetBindingSpec
153-
154146
// +kubebuilder:object:root=true
155147

156148
// ClusterResourceSetBindingList contains a list of ClusterResourceSetBinding.

api/core/v1beta1/cluster_types.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,6 @@ const (
458458
ClusterDeletingInternalErrorV1Beta2Reason = InternalErrorV1Beta2Reason
459459
)
460460

461-
// ANCHOR: ClusterSpec
462-
463461
// ClusterSpec defines the desired state of Cluster.
464462
type ClusterSpec struct {
465463
// paused can be used to prevent controllers from processing the Cluster and all its associated objects.
@@ -904,10 +902,6 @@ type MachinePoolVariables struct {
904902
Overrides []ClusterVariable `json:"overrides,omitempty"`
905903
}
906904

907-
// ANCHOR_END: ClusterSpec
908-
909-
// ANCHOR: ClusterNetwork
910-
911905
// ClusterNetwork specifies the different networking
912906
// parameters for a cluster.
913907
type ClusterNetwork struct {
@@ -931,10 +925,6 @@ type ClusterNetwork struct {
931925
ServiceDomain string `json:"serviceDomain,omitempty"`
932926
}
933927

934-
// ANCHOR_END: ClusterNetwork
935-
936-
// ANCHOR: NetworkRanges
937-
938928
// NetworkRanges represents ranges of network addresses.
939929
type NetworkRanges struct {
940930
// cidrBlocks is a list of CIDR blocks.
@@ -952,10 +942,6 @@ func (n NetworkRanges) String() string {
952942
return strings.Join(n.CIDRBlocks, ",")
953943
}
954944

955-
// ANCHOR_END: NetworkRanges
956-
957-
// ANCHOR: ClusterStatus
958-
959945
// ClusterStatus defines the observed state of Cluster.
960946
type ClusterStatus struct {
961947
// failureDomains is a slice of failure domain objects synced from the infrastructure provider.
@@ -1081,8 +1067,6 @@ type WorkersStatus struct {
10811067
AvailableReplicas *int32 `json:"availableReplicas,omitempty"`
10821068
}
10831069

1084-
// ANCHOR_END: ClusterStatus
1085-
10861070
// SetTypedPhase sets the Phase field to the string representation of ClusterPhase.
10871071
func (c *ClusterStatus) SetTypedPhase(p ClusterPhase) {
10881072
c.Phase = string(p)
@@ -1104,8 +1088,6 @@ func (c *ClusterStatus) GetTypedPhase() ClusterPhase {
11041088
}
11051089
}
11061090

1107-
// ANCHOR: APIEndpoint
1108-
11091091
// APIEndpoint represents a reachable Kubernetes API endpoint.
11101092
type APIEndpoint struct {
11111093
// host is the hostname on which the API server is serving.
@@ -1134,8 +1116,6 @@ func (v APIEndpoint) String() string {
11341116
return net.JoinHostPort(v.Host, fmt.Sprintf("%d", v.Port))
11351117
}
11361118

1137-
// ANCHOR_END: APIEndpoint
1138-
11391119
// +kubebuilder:object:root=true
11401120
// +kubebuilder:resource:path=clusters,shortName=cl,scope=Namespaced,categories=cluster-api
11411121
// +kubebuilder:deprecatedversion

api/core/v1beta1/clusterclass_types.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,8 +1136,6 @@ type LocalObjectTemplate struct {
11361136
Ref *corev1.ObjectReference `json:"ref"`
11371137
}
11381138

1139-
// ANCHOR: ClusterClassStatus
1140-
11411139
// ClusterClassStatus defines the observed state of the ClusterClass.
11421140
type ClusterClassStatus struct {
11431141
// variables is a list of ClusterClassStatusVariable that are defined for the ClusterClass.
@@ -1245,8 +1243,6 @@ func (c *ClusterClass) SetV1Beta2Conditions(conditions []metav1.Condition) {
12451243
c.Status.V1Beta2.Conditions = conditions
12461244
}
12471245

1248-
// ANCHOR_END: ClusterClassStatus
1249-
12501246
// +kubebuilder:object:root=true
12511247

12521248
// ClusterClassList contains a list of Cluster.

api/core/v1beta1/condition_consts.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ limitations under the License.
1616

1717
package v1beta1
1818

19-
// ANCHOR: CommonConditions
20-
2119
// Common ConditionTypes used by Cluster API objects.
2220
const (
2321
// ReadyCondition defines the Ready condition type that summarizes the operational state of a Cluster API object.
@@ -53,8 +51,6 @@ const (
5351
WaitingForInfrastructureFallbackReason = "WaitingForInfrastructure"
5452
)
5553

56-
// ANCHOR_END: CommonConditions
57-
5854
// Conditions and condition Reasons for the ClusterClass object.
5955
const (
6056
// ClusterClassVariablesReconciledCondition reports if the ClusterClass variables, including both inline and external

api/core/v1beta1/condition_types.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ import (
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2222
)
2323

24-
// ANCHOR: ConditionSeverity
25-
2624
// ConditionSeverity expresses the severity of a Condition Type failing.
2725
// +kubebuilder:validation:MaxLength=32
2826
type ConditionSeverity string
@@ -41,19 +39,11 @@ const (
4139
ConditionSeverityNone ConditionSeverity = ""
4240
)
4341

44-
// ANCHOR_END: ConditionSeverity
45-
46-
// ANCHOR: ConditionType
47-
4842
// ConditionType is a valid value for Condition.Type.
4943
// +kubebuilder:validation:MinLength=1
5044
// +kubebuilder:validation:MaxLength=256
5145
type ConditionType string
5246

53-
// ANCHOR_END: ConditionType
54-
55-
// ANCHOR: Condition
56-
5747
// Condition defines an observation of a Cluster API resource operational state.
5848
type Condition struct {
5949
// type of condition in CamelCase or in foo.example.com/CamelCase.
@@ -94,11 +84,5 @@ type Condition struct {
9484
Message string `json:"message,omitempty"`
9585
}
9686

97-
// ANCHOR_END: Condition
98-
99-
// ANCHOR: Conditions
100-
10187
// Conditions provide observations of the operational state of a Cluster API resource.
10288
type Conditions []Condition
103-
104-
// ANCHOR_END: Conditions

api/core/v1beta1/machine_types.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,6 @@ const (
375375
MachineDeletingDeletionCompletedV1Beta2Reason = DeletionCompletedV1Beta2Reason
376376
)
377377

378-
// ANCHOR: MachineSpec
379-
380378
// MachineSpec defines the desired state of Machine.
381379
type MachineSpec struct {
382380
// clusterName is the name of the Cluster this object belongs to.
@@ -483,10 +481,6 @@ type MachineReadinessGate struct {
483481
Polarity ConditionPolarity `json:"polarity,omitempty"`
484482
}
485483

486-
// ANCHOR_END: MachineSpec
487-
488-
// ANCHOR: MachineStatus
489-
490484
// MachineStatus defines the observed state of Machine.
491485
type MachineStatus struct {
492486
// nodeRef will point to the corresponding Node if it exists.
@@ -605,8 +599,6 @@ type MachineV1Beta2Status struct {
605599
Conditions []metav1.Condition `json:"conditions,omitempty"`
606600
}
607601

608-
// ANCHOR_END: MachineStatus
609-
610602
// MachineDeletionStatus is the deletion state of the Machine.
611603
type MachineDeletionStatus struct {
612604
// nodeDrainStartTime is the time when the drain of the node started and is used to determine
@@ -647,8 +639,6 @@ func (m *MachineStatus) GetTypedPhase() MachinePhase {
647639
}
648640
}
649641

650-
// ANCHOR: Bootstrap
651-
652642
// Bootstrap encapsulates fields to configure the Machine’s bootstrapping mechanism.
653643
type Bootstrap struct {
654644
// configRef is a reference to a bootstrap provider-specific resource
@@ -666,8 +656,6 @@ type Bootstrap struct {
666656
DataSecretName *string `json:"dataSecretName,omitempty"`
667657
}
668658

669-
// ANCHOR_END: Bootstrap
670-
671659
// +kubebuilder:object:root=true
672660
// +kubebuilder:resource:path=machines,shortName=ma,scope=Namespaced,categories=cluster-api
673661
// +kubebuilder:subresource:status

0 commit comments

Comments
 (0)