hostedcluster

package
v0.1.44 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: Apache-2.0 Imports: 102 Imported by: 1

Documentation

Index

Constants

View Source
const (
	HostedClusterFinalizer  = "hypershift.openshift.io/finalizer"
	HostedClusterAnnotation = "hypershift.openshift.io/cluster"

	ReportingGracePeriodRequeueDuration = 25 * time.Second

	ImageStreamCAPI                        = "cluster-capi-controllers"
	ImageStreamAutoscalerImage             = "cluster-autoscaler"
	ImageStreamClusterMachineApproverImage = "cluster-machine-approver"
)
View Source
const (
	NeedManagementKASAccessLabel = "hypershift.openshift.io/need-management-kas-access"
	NeedMetricsServerAccessLabel = "hypershift.openshift.io/need-metrics-server-access"
)

Variables

View Source
var (
	// NoopReconcile is just a default mutation function that does nothing.
	NoopReconcile controllerutil.MutateFn = func() error { return nil }
)

Functions

func FindNodePoolStatusCondition added in v0.1.43

func FindNodePoolStatusCondition(conditions []hyperv1.NodePoolCondition, conditionType string) *hyperv1.NodePoolCondition

FindStatusCondition finds the conditionType in conditions.

func GetControlPlaneOperatorImage

func GetControlPlaneOperatorImage(ctx context.Context, hc *hyperv1.HostedCluster, releaseProvider releaseinfo.Provider, hypershiftOperatorImage string, pullSecret []byte) (string, error)

GetControlPlaneOperatorImage resolves the appropriate control plane operator image based on the following order of precedence (from most to least preferred):

  1. The image specified by the ControlPlaneOperatorImageAnnotation on the HostedCluster resource itself
  2. The hypershift image specified in the release payload indicated by the HostedCluster's release field
  3. The hypershift-operator's own image for release versions 4.9 and 4.10
  4. The registry.ci.openshift.org/hypershift/hypershift:4.8 image for release version 4.8

If no image can be found according to these rules, an error is returned.

func GetControlPlaneOperatorImageLabels added in v0.1.19

func GetControlPlaneOperatorImageLabels(ctx context.Context, hc *hyperv1.HostedCluster, controlPlaneOperatorImage string, pullSecret []byte, imageMetadataProvider hyperutil.ImageMetadataProvider) (map[string]string, error)

GetControlPlaneOperatorImageLabels resolves the appropriate control plane operator image labels based on the following order of precedence (from most to least preferred):

  1. The labels specified by the ControlPlaneOperatorImageLabelsAnnotation on the HostedCluster resource itself
  2. The image labels in the medata of the image as resolved by GetControlPlaneOperatorImage

func SetupWebhookWithManager

func SetupWebhookWithManager(mgr ctrl.Manager, imageMetaDataProvider *hyperutil.RegistryClientImageMetadataProvider, logger logr.Logger) error

SetupWebhookWithManager sets up HostedCluster webhooks.

Types

type ClusterMachineApproverConfig

type ClusterMachineApproverConfig struct {
	NodeClientCert NodeClientCert `json:"nodeClientCert,omitempty"`
}

type DashboardTemplateData added in v0.1.10

type DashboardTemplateData struct {
	Name                  string
	Namespace             string
	ID                    string
	ControlPlaneNamespace string
}

type HostedClusterReconciler

type HostedClusterReconciler struct {
	client.Client

	// ManagementClusterCapabilities can be asked for support of optional management cluster capabilities
	ManagementClusterCapabilities capabilities.CapabiltyChecker

	// HypershiftOperatorImage is the image used to deploy the control plane operator if
	// 1) There is no hypershift.openshift.io/control-plane-operator-image annotation on the HostedCluster and
	// 2) The OCP version being deployed is the latest version supported by Hypershift
	HypershiftOperatorImage string

	RegistryOverrides map[string]string

	// SetDefaultSecurityContext is used to configure Security Context for containers
	SetDefaultSecurityContext bool

	// Clock is used to determine the time in a testable way.
	Clock clock.WithTickerAndDelayedExecution

	EnableOCPClusterMonitoring bool

	EnableCIDebugOutput bool

	PrivatePlatform hyperv1.PlatformType

	OIDCStorageProviderS3BucketName string
	S3Client                        s3iface.S3API

	MetricsSet    metrics.MetricsSet
	SREConfigHash string

	OperatorNamespace string

	ReconcileMetadataProviders func(ctx context.Context, imgOverrides map[string]string) (releaseinfo.ProviderWithOpenShiftImageRegistryOverrides, hyperutil.ImageMetadataProvider, error)

	KubevirtInfraClients kvinfra.KubevirtInfraClientMap

	MonitoringDashboards bool

	CertRotationScale time.Duration

	EnableCVOManagementClusterMetricsAccess bool
	// contains filtered or unexported fields
}

HostedClusterReconciler reconciles a HostedCluster object

func (*HostedClusterReconciler) Reconcile

func (r *HostedClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*HostedClusterReconciler) ReconcileMetadataProvidersImpl added in v0.1.26

func (*HostedClusterReconciler) SetupWithManager

func (r *HostedClusterReconciler) SetupWithManager(mgr ctrl.Manager, createOrUpdate upsert.CreateOrUpdateProvider, metricsSet metrics.MetricsSet, operatorNamespace string) error

type NodeClientCert

type NodeClientCert struct {
	Disabled bool `json:"disabled,omitempty"`
}

Jump to

Keyboard shortcuts

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