@@ -64,6 +64,8 @@ type Data struct {
6464 NginxPodCount int64
6565 // ControlPlanePodCount is the total number of NGF control plane Pods.
6666 ControlPlanePodCount int64
67+ // NginxOneConnectionEnabled is a boolean that indicates whether the connection to the Nginx One Console is enabled.
68+ NginxOneConnectionEnabled bool
6769}
6870
6971// NGFResourceCounts stores the counts of all relevant resources that NGF processes and generates configuration from.
@@ -107,20 +109,14 @@ type NGFResourceCounts struct {
107109
108110// DataCollectorConfig holds configuration parameters for DataCollectorImpl.
109111type DataCollectorConfig struct {
110- // K8sClientReader is a Kubernetes API client Reader.
111- K8sClientReader client.Reader
112- // GraphGetter allows us to get the Graph.
113- GraphGetter GraphGetter
114- // ConfigurationGetter allows us to get the Configuration.
115- ConfigurationGetter ConfigurationGetter
116- // Version is the NGF version.
117- Version string
118- // PodNSName is the NamespacedName of the NGF Pod.
119- PodNSName types.NamespacedName
120- // ImageSource is the source of the NGF image.
121- ImageSource string
122- // Flags contains the command-line NGF flag keys and values.
123- Flags config.Flags
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
124120}
125121
126122// DataCollectorImpl is am implementation of DataCollector.
@@ -189,6 +185,7 @@ func (c DataCollectorImpl) Collect(ctx context.Context) (Data, error) {
189185 SnippetsFiltersDirectivesCount : snippetsFiltersDirectivesCount ,
190186 NginxPodCount : nginxPodCount ,
191187 ControlPlanePodCount : int64 (replicaCount ),
188+ NginxOneConnectionEnabled : c .cfg .NginxOneConsoleSecretName != "" ,
192189 }
193190
194191 return data , nil
0 commit comments