Documentation
¶
Index ¶
Constants ¶
View Source
const ( BoskosIdLabel = "boskos-lease-id" JobNameLabel = "job-name" ALLOW_MULTI_TO_USE_SINGLE = false // LEASE_PENDING_RETRY_INTERVAL controls how often PENDING leases are retried // when no pools/networks are available LEASE_PENDING_RETRY_INTERVAL = 30 * time.Second // LEASE_PARTIAL_RETRY_INTERVAL controls how often PARTIAL leases are retried // when not all pools/networks are fulfilled LEASE_PARTIAL_RETRY_INTERVAL = 30 * time.Second // PROW_JOB_PERIODICAL_URL is used to generate URL for periodical jobs. Need to supply PROW_JOB_URL_PREFIX_KEY, PROW_GS_BUCKET_KEY, PROW_JOB and PROW_BUILD_ID. PROW_JOB_PERIODICAL_URL = "%vgs/%v/logs/%v/%v" // PROW_JOB_PRESUBMIT_URL is used to generate URL for presubmit jobs. Need to supply PROW_JOB_URL_PREFIX_KEY, PROW_GS_BUCKET_KEY,GIT_ORG, GIT_REPO, GIT_PR, PROW_JOB, and PROW_BUILD_ID. PROW_JOB_PRESUBMIT_URL = "%vgs/%v/pr-logs/pull/%v_%v/%v/%v/%v" PROW_JOB_TYPE_KEY = "prow-job-type" PROW_JOB_KEY = "prow-job-name" PROW_JOB_URL_PREFIX_KEY = "prow-url-prefix" PROW_GS_BUCKET_KEY = "prow-gs-bucket" PROW_BUILD_ID_KEY = "prow-build-id" GIT_ORG_KEY = "git-org" GIT_REPO_KEY = "git-repo" GIT_PR_KEY = "git-pr" DEFAULT_PROW_JOB_URL_PREFIX = "https://prow.ci.openshift.org/view/" DEFAULT_PROW_GS_BUCKET = "test-platform-results" PERIODICAL_JOB_TYPE = "periodic" PRESUBMIT_JOB_TYPE = "presubmit" )
Variables ¶
View Source
var ( PoolMemoryAvailable = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "pool_memory_available", Help: "The amount of memory available in a pool", }, []string{"namespace", "pool"}) PoolMemoryTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "pool_memory_total", Help: "The total amount of memory of a pool", }, []string{"namespace", "pool"}) PoolCpusAvailable = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "pool_cpus_available", Help: "The amount of cpus available in a pool", }, []string{"namespace", "pool"}) PoolCpusTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "pool_cpus_total", Help: "The total amount of cpus of a pool", }, []string{"namespace", "pool"}) PoolNetworksAvailable = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "pool_networks_available", Help: "Number of available (not in use) networks per pool", }, []string{"namespace", "pool"}) PoolNetworksTotal = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "pool_networks_total", Help: "Total number of networks in a pool", }, []string{"namespace", "pool"}) PoolNetworksAvailableByType = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "pool_networks_available_by_type", Help: "Number of available (not in use) networks per pool, broken down by network type", }, []string{"namespace", "pool", "networkType"}) PoolNetworksTotalByType = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "pool_networks_total_by_type", Help: "Total number of networks per pool, broken down by network type", }, []string{"namespace", "pool", "networkType"}) PoolVcpusUtilizationRatio = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "pool_vcpus_utilization_ratio", Help: "Ratio of vCPUs in use to total available (with overcommit) per pool", }, []string{"namespace", "pool"}) PoolMemoryUtilizationRatio = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "pool_memory_utilization_ratio", Help: "Ratio of memory in use to total available per pool", }, []string{"namespace", "pool"}) PoolNetworksUtilizationRatio = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "pool_networks_utilization_ratio", Help: "Ratio of networks in use to total available per pool", }, []string{"namespace", "pool"}) PoolNoSchedule = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "pool_no_schedule", Help: "Whether pool has scheduling disabled (1=disabled, 0=enabled)", }, []string{"namespace", "pool"}) PoolExcluded = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "pool_excluded", Help: "Whether pool is excluded from default scheduling (1=excluded, 0=included)", }, []string{"namespace", "pool"}) LeasesInUse = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "leases_in_use", Help: "Number of leases in use", }, []string{"namespace", "pool"}) LeaseCounts = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "leases_counts", Help: "Counts of active leases", }, []string{"namespace", "networkType", "phase"}) LeaseAgeSeconds = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "lease_age_seconds", Help: "Age of active leases in seconds since creation", }, []string{"namespace", "lease", "pool", "networkType"}) LeaseTransitionsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "lease_transitions_total", Help: "Total number of lease phase transitions", }, []string{"namespace", "networkType", "phase"}) LeaseDelaysTotal = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "lease_delays_total", Help: "Total number of times leases have been delayed", }, []string{"namespace", "networkType"}) NetworkLeaseCount = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "network_lease_count", Help: "Number of leases currently using each network", }, []string{"namespace", "network", "networkType", "pool"}) )
Functions ¶
func InitMetrics ¶
func InitMetrics()
Types ¶
type LeaseReconciler ¶
type LeaseReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder record.EventRecorder
RESTMapper meta.RESTMapper
UncachedClient client.Client
// Namespace is the namespace in which the ControlPlaneMachineSet controller should operate.
// Any ControlPlaneMachineSet not in this namespace should be ignored.
Namespace string
// OperatorName is the name of the ClusterOperator with which the controller should report
// its status.
OperatorName string
// ReleaseVersion is the version of current cluster operator release.
ReleaseVersion string
// Option to allow multi-tenant lease to use single-tenant networks
AllowMultiToUseSingle bool
}
func (*LeaseReconciler) SetupWithManager ¶
func (l *LeaseReconciler) SetupWithManager(mgr ctrl.Manager) error
type NamespaceReconciler ¶
type NamespaceReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder record.EventRecorder
RESTMapper meta.RESTMapper
UncachedClient client.Client
// Namespace is the namespace in which the ControlPlaneMachineSet controller should operate.
// Any ControlPlaneMachineSet not in this namespace should be ignored.
Namespace string
// OperatorName is the name of the ClusterOperator with which the controller should report
// its status.
OperatorName string
// ReleaseVersion is the version of current cluster operator release.
ReleaseVersion string
}
func (*NamespaceReconciler) PruneAbandonedLeases ¶
func (l *NamespaceReconciler) PruneAbandonedLeases(ctx context.Context)
func (*NamespaceReconciler) SetupWithManager ¶
func (l *NamespaceReconciler) SetupWithManager(mgr ctrl.Manager) error
type NetworkReconciler ¶
type NetworkReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder record.EventRecorder
RESTMapper meta.RESTMapper
UncachedClient client.Client
// Namespace is the namespace in which the ControlPlaneMachineSet controller should operate.
// Any ControlPlaneMachineSet not in this namespace should be ignored.
Namespace string
// OperatorName is the name of the ClusterOperator with which the controller should report
// its status.
OperatorName string
// ReleaseVersion is the version of current cluster operator release.
ReleaseVersion string
}
func (*NetworkReconciler) SetupWithManager ¶
func (l *NetworkReconciler) SetupWithManager(mgr ctrl.Manager) error
type PoolReconciler ¶
type PoolReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder record.EventRecorder
RESTMapper meta.RESTMapper
UncachedClient client.Client
// Namespace is the namespace in which the ControlPlaneMachineSet controller should operate.
// Any ControlPlaneMachineSet not in this namespace should be ignored.
Namespace string
// OperatorName is the name of the ClusterOperator with which the controller should report
// its status.
OperatorName string
// ReleaseVersion is the version of current cluster operator release.
ReleaseVersion string
}
func (*PoolReconciler) SetupWithManager ¶
func (l *PoolReconciler) SetupWithManager(mgr ctrl.Manager) error
Click to show internal directories.
Click to hide internal directories.