Documentation ¶
Index ¶
- Constants
- Variables
- func GetControlPlaneOperatorImage(ctx context.Context, hc *hyperv1.HostedCluster, ...) (string, error)
- func HasBeenAvailable(hc *hyperv1.HostedCluster) bool
- func SetupWebhookWithManager(mgr ctrl.Manager) error
- type ClusterMachineApproverConfig
- type HostedClusterReconciler
- type NodeClientCert
- type Webhook
Constants ¶
View Source
const ( HostedClusterAnnotation = "hypershift.openshift.io/cluster" // HasBeenAvailableAnnotation is an implementation detail to check if HC has ever been available. // This is useful for e.g. monitor duration from creation to available and avoid noise from condition flipping. HasBeenAvailableAnnotation = "hypershift.openshift.io/HasBeenAvailable" ImageStreamCAPI = "cluster-capi-controllers" ImageStreamAutoscalerImage = "cluster-autoscaler" ImageStreamClusterMachineApproverImage = "cluster-machine-approver" )
Variables ¶
View Source
var ( DeletionDurationMetricName = "hypershift_cluster_deletion_duration_seconds" GuestCloudResourcesDeletionDurationMetricName = "hypershift_cluster_guest_cloud_resources_deletion_duration_seconds" AvailableDurationName = "hypershift_cluster_available_duration_seconds" InitialRolloutDurationName = "hypershift_cluster_initial_rollout_duration_seconds" LimitedSupportEnabledName = "hypershift_cluster_limited_support_enabled" SilenceAlertsName = "hypershift_cluster_silence_alerts" ProxyName = "hypershift_cluster_proxy" )
View Source
var NoopReconcile controllerutil.MutateFn = func() error { return nil }
NoopReconcile is just a default mutation function that does nothing.
Functions ¶
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):
- The image specified by the ControlPlaneOperatorImageAnnotation on the HostedCluster resource itself
- The hypershift image specified in the release payload indicated by the HostedCluster's release field
- The hypershift-operator's own image for release versions 4.9 and 4.10
- 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 HasBeenAvailable ¶ added in v0.1.6
func HasBeenAvailable(hc *hyperv1.HostedCluster) bool
func SetupWebhookWithManager ¶
SetupWebhookWithManager sets up HostedCluster webhooks.
Types ¶
type ClusterMachineApproverConfig ¶
type ClusterMachineApproverConfig struct {
NodeClientCert NodeClientCert `json:"nodeClientCert,omitempty"`
}
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 // ReleaseProvider looks up the OCP version for the release images in HostedClusters ReleaseProvider releaseinfo.ProviderWithRegistryOverrides // 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 ImageMetadataProvider hyperutil.ImageMetadataProvider MetricsSet metrics.MetricsSet SREConfigHash string OperatorNamespace string // contains filtered or unexported fields }
HostedClusterReconciler reconciles a HostedCluster object
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"`
}
type Webhook ¶
type Webhook struct{}
Webhook implements a validating webhook for HostedCluster.
func (*Webhook) ValidateCreate ¶
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type.
func (*Webhook) ValidateDelete ¶
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.