hypershift

package
v0.0.0-...-7604c18 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// ClusterIDLabel (_id) is the common label used to identify clusters in telemeter.
	// For hypershift, it will identify metrics produced by the both the control plane
	// components and guest cluster monitoring stack.
	ClusterIDLabel = "_id"
	// HyperShiftConditionTypePrefix is a cluster network operator condition type prefix in hostedControlPlane status
	HyperShiftConditionTypePrefix = "network.operator.openshift.io/"
)
View Source
const HostedClusterDefaultAdvertiseAddressIPV4 = "172.20.0.1"
View Source
const HostedClusterDefaultAdvertiseAddressIPV6 = "fd00::1"
View Source
const HostedClusterDefaultAdvertisePort = int64(6443)
View Source
const HostedClusterLocalProxy = "socks5://127.0.0.1:8090"

Variables

View Source
var HostedControlPlaneGVK = schema.GroupVersionKind{
	Group:   "hypershift.openshift.io",
	Version: "v1beta1",
	Kind:    "HostedControlPlane",
}

HostedControlPlaneGVK GroupVersionKind for HostedControlPlane Based on https://github.com/openshift/hypershift/blob/27316d734d806a29d63f65ddf746cafd4409a1de/api/hypershift/v1beta1/hosted_controlplane.go#L19

Functions

func SetHostedControlPlaneConditions

func SetHostedControlPlaneConditions(hcp *unstructured.Unstructured, operStatus *operv1.NetworkStatus) ([]metav1.Condition, error)

SetHostedControlPlaneConditions updates the hcp status.conditions based on the provided operStatus Returns an updated list of conditions and an error. If there are no changes, the returned list is empty.

Types

type AvailabilityPolicy

type AvailabilityPolicy string

AvailabilityPolicy specifies a high level availability policy for components.

const (
	// HighlyAvailable means components should be resilient to problems across
	// fault boundaries as defined by the component to which the policy is
	// attached. This usually means running critical workloads with 3 replicas and
	// with little or no toleration of disruption of the component.
	HighlyAvailable AvailabilityPolicy = "HighlyAvailable"

	// SingleReplica means components are not expected to be resilient to problems
	// across most fault boundaries associated with high availability. This
	// usually means running critical workloads with just 1 replica and with
	// toleration of full disruption of the component.
	SingleReplica AvailabilityPolicy = "SingleReplica"
)

type HostedControlPlane

type HostedControlPlane struct {
	ClusterID                    string
	ControllerAvailabilityPolicy AvailabilityPolicy
	NodeSelector                 map[string]string
	AdvertiseAddress             string
	AdvertisePort                int
}

HostedControlPlane represents a subset of HyperShift API definition for HostedControlPlane

func ParseHostedControlPlane

func ParseHostedControlPlane(hcp *unstructured.Unstructured) (*HostedControlPlane, error)

ParseHostedControlPlane parses the provided unstructured argument into a HostedControlPlane struct

type HyperShiftConfig

type HyperShiftConfig struct {
	sync.Mutex
	Enabled           bool
	Name              string
	Namespace         string
	RunAsUser         string
	RelatedObjects    []RelatedObject
	ReleaseImage      string
	ControlPlaneImage string
	CAConfigMap       string
	CAConfigMapKey    string
}

func NewHyperShiftConfig

func NewHyperShiftConfig() *HyperShiftConfig

func (*HyperShiftConfig) SetRelatedObjects

func (hc *HyperShiftConfig) SetRelatedObjects(relatedObjects []RelatedObject)

type RelatedObject

type RelatedObject struct {
	configv1.ObjectReference
	ClusterName string
}

Jump to

Keyboard shortcuts

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