@@ -109,14 +109,22 @@ type NGFResourceCounts struct {
109
109
110
110
// DataCollectorConfig holds configuration parameters for DataCollectorImpl.
111
111
type 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
120
128
}
121
129
122
130
// DataCollectorImpl is am implementation of DataCollector.
@@ -185,7 +193,7 @@ func (c DataCollectorImpl) Collect(ctx context.Context) (Data, error) {
185
193
SnippetsFiltersDirectivesCount : snippetsFiltersDirectivesCount ,
186
194
NginxPodCount : nginxPodCount ,
187
195
ControlPlanePodCount : int64 (replicaCount ),
188
- NginxOneConnectionEnabled : c .cfg .NginxOneConsoleSecretName != "" ,
196
+ NginxOneConnectionEnabled : c .cfg .NginxOneConsoleConnection ,
189
197
}
190
198
191
199
return data , nil
0 commit comments