@@ -109,14 +109,22 @@ type NGFResourceCounts struct {
109109
110110// DataCollectorConfig holds configuration parameters for DataCollectorImpl.
111111type DataCollectorConfig struct {
112- K8sClientReader client.Reader
113- GraphGetter GraphGetter
114- ConfigurationGetter ConfigurationGetter
115- PodNSName types.NamespacedName
116- Version string
117- ImageSource string
118- NginxOneConsoleSecretName string
119- Flags config.Flags
112+ // K8sClientReader is a Kubernetes API client Reader.
113+ K8sClientReader client.Reader
114+ // GraphGetter allows us to get the Graph.
115+ GraphGetter GraphGetter
116+ // ConfigurationGetter allows us to get the Configuration.
117+ ConfigurationGetter ConfigurationGetter
118+ // PodNSName is the NamespacedName of the NGF Pod.
119+ PodNSName types.NamespacedName
120+ // Version is the NGF version.
121+ Version string
122+ // ImageSource is the source of the NGF image.
123+ ImageSource string
124+ // Flags contains the command-line NGF flag keys and values.
125+ Flags config.Flags
126+ // NginxOneConsoleConnection is a boolean that indicates whether the connection to the Nginx One Console is enabled.
127+ NginxOneConsoleConnection bool
120128}
121129
122130// DataCollectorImpl is am implementation of DataCollector.
@@ -185,7 +193,7 @@ func (c DataCollectorImpl) Collect(ctx context.Context) (Data, error) {
185193 SnippetsFiltersDirectivesCount : snippetsFiltersDirectivesCount ,
186194 NginxPodCount : nginxPodCount ,
187195 ControlPlanePodCount : int64 (replicaCount ),
188- NginxOneConnectionEnabled : c .cfg .NginxOneConsoleSecretName != "" ,
196+ NginxOneConnectionEnabled : c .cfg .NginxOneConsoleConnection ,
189197 }
190198
191199 return data , nil
0 commit comments