Documentation ¶
Index ¶
- Constants
- func GetService(c client.Client, namespace, svcName, portName string) (string, error)
- func MonitoringTLSConfig(c client.Client) (*tls.Config, error)
- func NetworkTarget(c client.Client, namespace, appName, portName string) (string, error)
- func RequestPrometheusServiceAccountAPIToken(c client.Client) (string, error)
- type AlertData
- type AlertResponse
- type AlertResult
- type Counter
- func (c *Counter) AlertsFromUpgrade(upgradeStart time.Time, upgradeEnd time.Time) ([]string, error)
- func (c *Counter) IsAlertFiring(alert string, checkedNS, ignoredNS []string) (bool, error)
- func (c *Counter) IsClusterVersionAtVersion(version string) (bool, error)
- func (c *Counter) IsMetricNotificationEventSentSet(upgradeConfigName string, event string, version string) (bool, error)
- func (c *Counter) Query(query string) (*AlertResponse, error)
- func (c *Counter) ResetAllMetricNodeDrainFailed()
- func (c *Counter) ResetEphemeralMetrics()
- func (c *Counter) ResetFailureMetrics()
- func (c *Counter) ResetMetricNodeDrainFailed(nodeName string)
- func (c *Counter) ResetMetricUpgradeControlPlaneTimeout(upgradeConfigName, version string)
- func (c *Counter) ResetMetricUpgradeWorkerTimeout(upgradeConfigName, version string)
- func (c *Counter) UpdateMetricHealthcheckFailed(upgradeConfigName, reason string, version string, state string)
- func (c *Counter) UpdateMetricHealthcheckSucceeded(upgradeConfigName string, reason string, version string, state string)
- func (c *Counter) UpdateMetricNodeDrainFailed(nodeName string)
- func (c *Counter) UpdateMetricNotificationEventSent(upgradeConfigName string, event string, version string)
- func (c *Counter) UpdateMetricScalingFailed(upgradeConfigName string)
- func (c *Counter) UpdateMetricScalingSucceeded(upgradeConfigName string)
- func (c *Counter) UpdateMetricUpgradeConfigSyncTimestamp(name string, time time.Time)
- func (c *Counter) UpdateMetricUpgradeControlPlaneTimeout(upgradeConfigName, version string)
- func (c *Counter) UpdateMetricUpgradeResult(name string, precedingVersion string, version string, stream string, ...)
- func (c *Counter) UpdateMetricUpgradeWindowBreached(upgradeConfigName string)
- func (c *Counter) UpdateMetricUpgradeWindowNotBreached(upgradeConfigName string)
- func (c *Counter) UpdateMetricUpgradeWorkerTimeout(upgradeConfigName, version string)
- func (c *Counter) UpdateMetricValidationFailed(upgradeConfigName string)
- func (c *Counter) UpdateMetricValidationSucceeded(upgradeConfigName string)
- type Metrics
- type MetricsBuilder
Constants ¶
const ( Namespace = "upgradeoperator" Subsystem = "upgrade" StateLabel = "state" VersionLabel = "version" PrecedingVersionLabel = "preceding_version" StreamLabel = "stream" ScheduledStateValue = "scheduled" StartedStateValue = "started" FinishedStateValue = "finished" ControlPlaneStartedStateValue = "control_plane_started" ControlPlaneCompletedStateValue = "control_plane_completed" WorkersStartedStateValue = "workers_started" WorkersCompletedStateValue = "workers_completed" MonitoringNS = "openshift-monitoring" MonitoringCAConfigMapName = "serving-certs-ca-bundle" MonitoringConfigField = "service-ca.crt" MetricsQueryFailed = "healthcheck_query_failed" CriticalAlertsFiring = "critical_alerts_firing" ClusterOperatorsDegraded = "cluster_operators_degraded" ClusterOperatorsStatusFailed = "cluster_operator_status_failed" DefaultWorkerMachinepoolNotFound = "default_worker_machinepool_not_found" ClusterNodeQueryFailed = "cluster_node_query_failed" ClusterNodesManuallyCordoned = "cluster_node_manually_cordoned" ClusterNodesTaintedUnschedulable = "cluster_node_taint_unschedulable" ClusterInvalidPDB = "cluster_invalid_pdb" ClusterInvalidPDBConf = "cluster_invalid_pdb_configuration" PDBQueryFailed = "pdb_query_failed" DvoClientCreationFailed = "dvo_client_creation_failed" DvoMetricsQueryFailed = "dvo_metrics_query_failed" )
Variables ¶
This section is empty.
Functions ¶
func GetService ¶
GetService accepts a client,namespace,svcName and portName and attempts to retrieve the services endpoint in the form of resolveable.service:portnumber.
func MonitoringTLSConfig ¶
MonitoringTLSConfig accepts a client.Client and returns a *tls.Config for monitoring services using the monitoring services CA.
func NetworkTarget ¶
NetworkTarget returns a host:port address that represents either a kubernetes route or service depending on the runtime conditions.
Types ¶
type AlertData ¶
type AlertData struct {
Result []AlertResult `json:"result"`
}
type AlertResponse ¶
type AlertResult ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
func (*Counter) AlertsFromUpgrade ¶
AlertsFromUpgrade reports any primary-paging critical alerts that were fired from managed-upgrade-operator during the last upgrade.
func (*Counter) IsAlertFiring ¶
func (*Counter) IsClusterVersionAtVersion ¶
func (*Counter) IsMetricNotificationEventSentSet ¶
func (*Counter) ResetAllMetricNodeDrainFailed ¶
func (c *Counter) ResetAllMetricNodeDrainFailed()
func (*Counter) ResetEphemeralMetrics ¶
func (c *Counter) ResetEphemeralMetrics()
ResetEphemeralMetrics will reset all ephemeral metrics
func (*Counter) ResetFailureMetrics ¶
func (c *Counter) ResetFailureMetrics()
ResetFailureMetrics will reset the metric which indicates the upgrade failed
func (*Counter) ResetMetricNodeDrainFailed ¶
func (*Counter) ResetMetricUpgradeControlPlaneTimeout ¶
func (*Counter) ResetMetricUpgradeWorkerTimeout ¶
func (*Counter) UpdateMetricHealthcheckFailed ¶
func (*Counter) UpdateMetricHealthcheckSucceeded ¶
func (*Counter) UpdateMetricNodeDrainFailed ¶
func (*Counter) UpdateMetricNotificationEventSent ¶
func (*Counter) UpdateMetricScalingFailed ¶
func (*Counter) UpdateMetricScalingSucceeded ¶
func (*Counter) UpdateMetricUpgradeConfigSyncTimestamp ¶
func (*Counter) UpdateMetricUpgradeControlPlaneTimeout ¶
func (*Counter) UpdateMetricUpgradeResult ¶
func (*Counter) UpdateMetricUpgradeWindowBreached ¶
func (*Counter) UpdateMetricUpgradeWindowNotBreached ¶
func (*Counter) UpdateMetricUpgradeWorkerTimeout ¶
func (*Counter) UpdateMetricValidationFailed ¶
func (*Counter) UpdateMetricValidationSucceeded ¶
type Metrics ¶
type Metrics interface { UpdateMetricValidationFailed(string) UpdateMetricValidationSucceeded(string) UpdateMetricHealthcheckSucceeded(string, string, string, string) UpdateMetricScalingFailed(string) UpdateMetricScalingSucceeded(string) UpdateMetricUpgradeWindowNotBreached(string) UpdateMetricUpgradeConfigSyncTimestamp(string, time.Time) UpdateMetricUpgradeWindowBreached(string) UpdateMetricUpgradeControlPlaneTimeout(string, string) ResetMetricUpgradeControlPlaneTimeout(string, string) UpdateMetricHealthcheckFailed(string, string, string, string) UpdateMetricUpgradeWorkerTimeout(string, string) ResetMetricUpgradeWorkerTimeout(string, string) UpdateMetricNodeDrainFailed(string) ResetMetricNodeDrainFailed(string) ResetAllMetricNodeDrainFailed() ResetFailureMetrics() ResetEphemeralMetrics() UpdateMetricNotificationEventSent(string, string, string) UpdateMetricUpgradeResult(string, string, string, string, []string) AlertsFromUpgrade(time.Time, time.Time) ([]string, error) IsAlertFiring(alert string, checkedNS, ignoredNS []string) (bool, error) IsMetricNotificationEventSentSet(upgradeConfigName string, event string, version string) (bool, error) IsClusterVersionAtVersion(version string) (bool, error) Query(query string) (*AlertResponse, error) }
type MetricsBuilder ¶
func NewBuilder ¶
func NewBuilder() MetricsBuilder