ocpmetadata

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 13 Imported by: 8

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"`
	OCPVersion       string `json:"ocpVersion"`
	OCPMajorVersion  string `json:"ocpMajorVersion"`
	K8SVersion       string `json:"k8sVersion"`
	MasterNodesType  string `json:"masterNodesType"`
	WorkerNodesType  string `json:"workerNodesType"`
	MasterNodesCount int    `json:"masterNodesCount"`
	InfraNodesType   string `json:"infraNodesType"`
	WorkerNodesCount int    `json:"workerNodesCount"`
	InfraNodesCount  int    `json:"infraNodesCount"`
	OtherNodesCount  int    `json:"otherNodesCount"`
	TotalNodes       int    `json:"totalNodes"`
	SDNType          string `json:"sdnType"`
	ClusterName      string `json:"clusterName"`
	Region           string `json:"region"`
}

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