@@ -148,7 +148,7 @@ func (c DataCollectorImpl) Collect(ctx context.Context) (Data, error) {
148
148
return Data {}, fmt .Errorf ("failed to collect NGF resource counts: %w" , err )
149
149
}
150
150
151
- replicaSet , err := GetPodReplicaSet (ctx , c .cfg .K8sClientReader , c .cfg .PodNSName )
151
+ replicaSet , err := getPodReplicaSet (ctx , c .cfg .K8sClientReader , c .cfg .PodNSName )
152
152
if err != nil {
153
153
return Data {}, fmt .Errorf ("failed to get replica set for pod %v: %w" , c .cfg .PodNSName , err )
154
154
}
@@ -158,7 +158,7 @@ func (c DataCollectorImpl) Collect(ctx context.Context) (Data, error) {
158
158
return Data {}, fmt .Errorf ("failed to collect NGF replica count: %w" , err )
159
159
}
160
160
161
- deploymentID , err := GetDeploymentID (replicaSet )
161
+ deploymentID , err := getDeploymentID (replicaSet )
162
162
if err != nil {
163
163
return Data {}, fmt .Errorf ("failed to get NGF deploymentID: %w" , err )
164
164
}
@@ -280,8 +280,8 @@ func computeRouteCount(
280
280
}
281
281
}
282
282
283
- // GetPodReplicaSet returns the replicaset for the provided Pod.
284
- func GetPodReplicaSet (
283
+ // getPodReplicaSet returns the replicaset for the provided Pod.
284
+ func getPodReplicaSet (
285
285
ctx context.Context ,
286
286
k8sClient client.Reader ,
287
287
podNSName types.NamespacedName ,
@@ -324,8 +324,8 @@ func getReplicas(replicaSet *appsv1.ReplicaSet) (int, error) {
324
324
return int (* replicaSet .Spec .Replicas ), nil
325
325
}
326
326
327
- // GetDeploymentID gets the deployment ID of the provided ReplicaSet.
328
- func GetDeploymentID (replicaSet * appsv1.ReplicaSet ) (string , error ) {
327
+ // getDeploymentID gets the deployment ID of the provided ReplicaSet.
328
+ func getDeploymentID (replicaSet * appsv1.ReplicaSet ) (string , error ) {
329
329
replicaOwnerRefs := replicaSet .GetOwnerReferences ()
330
330
if len (replicaOwnerRefs ) != 1 {
331
331
return "" , fmt .Errorf ("expected one owner reference of the NGF ReplicaSet, got %d" , len (replicaOwnerRefs ))
0 commit comments