You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The metrics server should be controlled through a feature gate (MetricsEndpoint) to provide flexibility in enabling or disabling it. The following requirements must be met:
If the feature gate is disabled, the MetricsServer in the controller should not be initialized.
If the feature gate is enabled, the metrics server should function as expected.
No changes should be required in the default Kustomize configuration or deployment files to accommodate this functionality.
(Discussed in the meeting on Jan 14)
Acceptance Criteria - TL'DR
Metrics Server Initialization:
The metrics server is initialized only when the feature gate is enabled for catalogd and operator-controller
-
// Note that the metrics server is not serving if the BindAddress is set to "0".
// Therefore, the metrics server is disabled by default. It is only enabled
// if certFile and keyFile are provided. The intention is not allowing the metrics
// be served with the default self-signed certificate generated by controller-runtime.
metricsServerOptions.BindAddress="0"
setupLog.Info("WARNING: Metrics Server is disabled. "+
"Metrics will not be served since the TLS certificate and key file are not provided.")
}
If the feature gate is disabled, the server should bind 0 to metricsServerOptions.BindAddress to prevent the controller runtime from starting the server.
Kustomize Configuration:
The existing Kustomize configuration should remain unchanged.
Testing:
The e2e tests to validate the metrics endpoint should still be used and working with the future gate enabled.
(Required to discuss in the channel/PR) The default configuration should continue to enable the metrics server (i.e., the feature gate is enabled by default).
The metrics server should be controlled through a feature gate (
MetricsEndpoint
) to provide flexibility in enabling or disabling it. The following requirements must be met:MetricsServer
in the controller should not be initialized.(Discussed in the meeting on Jan 14)
Acceptance Criteria - TL'DR
Metrics Server Initialization:
-
operator-controller/cmd/operator-controller/main.go
Lines 187 to 224 in da28803
-
operator-controller/catalogd/cmd/catalogd/main.go
Lines 191 to 208 in da28803
0
tometricsServerOptions.BindAddress
to prevent the controller runtime from starting the server.Kustomize Configuration:
Testing:
Default Behavior:
Ensure properly documentation
under docs/draft
.- Update it to ensure the doc covers enabling and disabling the metrics
- Check if the docs should be moved for the public docs as a feature gate feature
The text was updated successfully, but these errors were encountered: