cluster

package
v0.29.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	LabelKeyRancherFieldProjectId      = "field.cattle.io/projectId"
	LabelKeyRancherHelmProjectId       = "helm.cattle.io/projectId"
	LabelKeyRancherHelmProjectOperated = "helm.cattle.io/helm-project-operated"

	NamespaceRancherMonitoring  = "cattle-monitoring-system"
	PrometheusRancherMonitoring = "rancher-monitoring-prometheus"
)

Variables

This section is empty.

Functions

func AreSiblingNamespaces

func AreSiblingNamespaces(kc client.Client, ns1, ns2 string) (bool, error)

func ClusterMetadata

func ClusterMetadata(c client.Reader) (*kmapi.ClusterMetadata, error)

func ClusterUID

func ClusterUID(c client.Reader) (string, error)

func DetectCAPICluster

func DetectCAPICluster(kc client.Client) (*kmapi.CAPIClusterInfo, error)

func DetectClusterManager

func DetectClusterManager(kc client.Client, mappers ...meta.RESTMapper) kmapi.ClusterManager

func GetDefaultProjectId

func GetDefaultProjectId(kc client.Client) (string, bool, error)

func GetProjectId

func GetProjectId(kc client.Client, nsName string) (string, bool, error)

func GetSystemProjectId

func GetSystemProjectId(kc client.Client) (string, bool, error)

func IsACEManaged

func IsACEManaged(kc client.Client) bool

func IsInDefaultProject

func IsInDefaultProject(kc client.Client, nsName string) (bool, error)

func IsInSystemProject

func IsInSystemProject(kc client.Client, nsName string) (bool, error)

func IsInUserProject

func IsInUserProject(kc client.Client, nsName string) (bool, error)

func IsOpenClusterHub added in v0.25.35

func IsOpenClusterHub(mapper meta.RESTMapper) bool

func IsOpenClusterMulticlusterControlplane added in v0.25.35

func IsOpenClusterMulticlusterControlplane(mapper meta.RESTMapper) bool

func IsOpenClusterSpoke added in v0.25.35

func IsOpenClusterSpoke(mapper meta.RESTMapper) bool

func IsOpenShiftManaged added in v0.25.38

func IsOpenShiftManaged(mapper meta.RESTMapper) bool

func IsRancherManaged

func IsRancherManaged(mapper meta.RESTMapper) bool

func IsSingletonResource

func IsSingletonResource(kc client.Client, gvk schema.GroupVersionKind, key types.NamespacedName) (bool, error)

func IsVirtualCluster added in v0.25.38

func IsVirtualCluster(kc client.Client) (bool, error)

func ListProjectNamespaces

func ListProjectNamespaces(kc client.Client, projectId string) ([]core.Namespace, error)

func ListSiblingNamespaces

func ListSiblingNamespaces(kc client.Client, nsName string) ([]core.Namespace, error)

func MustIsVirtualCluster added in v0.25.38

func MustIsVirtualCluster(kc client.Client) bool

func Names

func Names(in []core.Namespace) (ret []string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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