openshift

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

package openshift provides tools for interacting with OpenShift clusters.

- Convert between OpenShift console URL and korrel8r Query. - Locate default observability services deployed in an OpenShift cluster.

Index

Constants

View Source
const (
	OpenshiftLogging    = "openshift-logging"
	LoggingLoki         = "logging-loki"
	OpenshiftConsole    = "openshift-console"
	OpenshiftMonitoring = "openshift-monitoring"
	ThanosQuerier       = "thanos-querier"
	AlertmanagerMain    = "alertmanager-main"
)

Observability namespaces

Variables

View Source
var (
	LokiStackNSName        = NamespacedName(OpenshiftLogging, LoggingLoki)
	ConsoleNSName          = NamespacedName(OpenshiftConsole, "console")
	ThanosQuerierNSName    = NamespacedName(OpenshiftMonitoring, ThanosQuerier)
	PrometheusK8sName      = NamespacedName(OpenshiftMonitoring, "prometheus-k8s")
	AlertmanagerMainNSName = NamespacedName(OpenshiftMonitoring, AlertmanagerMain)
)

Observability service namespace-names

Functions

func ConsoleURL

func ConsoleURL(ctx context.Context, c client.Client) (*url.URL, error)

ConsoleURL returns the base URL for the Openshift console on the current cluster.

func NamespacedName

func NamespacedName(namespace, name string) types.NamespacedName

NamespacedName constructs a namespaced name

func RouteHost

func RouteHost(ctx context.Context, c client.Client, nn types.NamespacedName) (string, error)

RouteHost gets the host from a route.

func ServiceHost added in v0.5.2

func ServiceHost(ctx context.Context, c client.Client, nn types.NamespacedName) (string, error)

Types

type Console added in v0.5.7

type Console struct {
	BaseURL *url.URL
	// contains filtered or unexported fields
}

Console convert console URL to/from korrel8r Query.

func NewConsole added in v0.5.7

func NewConsole(baseURL *url.URL, c client.Client) *Console

func (*Console) QueryFromURL added in v0.6.1

func (c *Console) QueryFromURL(u *url.URL) (q korrel8r.Query, err error)

func (*Console) URLFromQuery added in v0.6.1

func (c *Console) URLFromQuery(q korrel8r.Query) (u *url.URL, err error)

Jump to

Keyboard shortcuts

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