ocpmetadata

package
v1.0.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 14 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterMetadata

type ClusterMetadata struct {
	MetricName       string `json:"metricName,omitempty"`
	Platform         string `json:"platform,omitempty"`
	ClusterType      string `json:"clusterType,omitempty"`
	OCPVersion       string `json:"ocpVersion,omitempty"`
	OCPMajorVersion  string `json:"ocpMajorVersion,omitempty"`
	K8SVersion       string `json:"k8sVersion,omitempty"`
	MasterNodesType  string `json:"masterNodesType,omitempty"`
	WorkerNodesType  string `json:"workerNodesType,omitempty"`
	MasterNodesCount int    `json:"masterNodesCount,omitempty"`
	InfraNodesType   string `json:"infraNodesType,omitempty"`
	WorkerNodesCount int    `json:"workerNodesCount,omitempty"`
	InfraNodesCount  int    `json:"infraNodesCount,omitempty"`
	OtherNodesCount  int    `json:"otherNodesCount,omitempty"`
	TotalNodes       int    `json:"totalNodes,omitempty"`
	SDNType          string `json:"sdnType,omitempty"`
	ClusterName      string `json:"clusterName,omitempty"`
	Region           string `json:"region,omitempty"`
}

Type to store cluster metadata

type Metadata

type Metadata struct {
	// contains filtered or unexported fields
}

Metadata object

func NewMetadata

func NewMetadata(restConfig *rest.Config) (Metadata, error)

NewMetadata instantiates a new OCP metadata discovery agent

func (*Metadata) GetClusterMetadata

func (meta *Metadata) GetClusterMetadata() (ClusterMetadata, error)

GetClusterMetadata returns a clusterMetadata object from the given OCP cluster

func (*Metadata) GetCurrentPodCount

func (meta *Metadata) GetCurrentPodCount() (int, error)

GetCurrentPodCount returns the number of current running pods across all worker nodes

func (*Metadata) GetDefaultIngressDomain

func (meta *Metadata) GetDefaultIngressDomain() (string, error)

GetDefaultIngressDomain returns default ingress domain of the default ingress controller

func (*Metadata) GetPrometheus

func (meta *Metadata) GetPrometheus() (string, string, error)

GetPrometheus Returns Prometheus URL and a valid Bearer token

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL