controllers

package
v0.0.0-...-06682fd Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 57 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Code generated for package controllers by go-bindata DO NOT EDIT. (@generated) sources: ../manifests/0000_31_cluster-baremetal-operator_07_clusteroperator.cr.yaml

Index

Constants

View Source
const (
	// ComponentNamespace is namespace where CBO resides
	ComponentNamespace = "openshift-machine-api"
	// ComponentName is the full name of CBO
	ComponentName = "cluster-baremetal-operator"

	// Annotation linking a machine to a host
	HostAnnotation = "metal3.io/BareMetalHost"
)

Variables

This section is empty.

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func EnabledFeatures

func EnabledFeatures(ctx context.Context, osClient osclientset.Interface) (v1alpha1.EnabledFeatures, error)

EnabledFeatures returns the features that are enabled on the current platform.

func IsEnabled

func IsEnabled(enabledFeatures v1alpha1.EnabledFeatures) bool

IsEnabled returns true if there is at least one feature enabled.

func Manifests0000_31_clusterBaremetalOperator_07_clusteroperatorCrYaml

func Manifests0000_31_clusterBaremetalOperator_07_clusteroperatorCrYaml() (*asset, error)

func Manifests0000_31_clusterBaremetalOperator_07_clusteroperatorCrYamlBytes

func Manifests0000_31_clusterBaremetalOperator_07_clusteroperatorCrYamlBytes() ([]byte, error)

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

Types

type FeatureGateWatcher

type FeatureGateWatcher struct {
	client.Client

	// ReleaseVersion is OpenShift release version that CBO is tracking
	ReleaseVersion string

	// Current is the current feature gate status
	Current FeatureGates

	// OnChange is called when the active feature set changes. The typical use is
	// to cancel the operator's root context, triggering a graceful shutdown.
	OnChange func(ctx context.Context)
}

FeatureGateWatcher watches the cluster FeatureGate CR for changes and triggers a graceful shutdown when the active feature set changes so the operator restarts and picks up the new configuration.

func (*FeatureGateWatcher) Reconcile

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

Reconcile detects changes to the FeatureGate spec and invokes OnChange when the active feature set differs from the one observed at operator startup.

func (*FeatureGateWatcher) SetupWithManager

func (r *FeatureGateWatcher) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager registers the FeatureGateWatcher controller with the manager.

type FeatureGates

type FeatureGates struct {
	Enabled    map[osconfigv1.FeatureGateName]bool
	FeatureSet osconfigv1.FeatureSet
	// contains filtered or unexported fields
}

FeatureGates provides access to enabled/disabled OpenShift feature gates for the current release.

func ReadFeatureGates

func ReadFeatureGates(ctx context.Context, osClient osclientset.Interface, releaseVersion string) (FeatureGates, error)

ReadFeatureGates reads the cluster FeatureGate CR and returns the feature gates applicable to the given release version. If releaseVersion is empty or does not match any entry in the status, an empty FeatureGates is returned.

type InstallConfigData

type InstallConfigData struct {
	SSHKey string
}

type ProvisioningReconciler

type ProvisioningReconciler struct {
	// This client, initialized using mgr.Client() above, is a split client
	// that reads objects from the cache and writes to the apiserver
	Client          client.Client
	DynamicClient   dynamic.Interface
	Scheme          *runtime.Scheme
	OSClient        osclientset.Interface
	KubeClient      kubernetes.Interface
	ReleaseVersion  string
	ImagesFilename  string
	WebHookEnabled  bool
	NetworkStack    provisioning.NetworkStackType
	EnabledFeatures metal3iov1alpha1.EnabledFeatures
	FeatureGates    FeatureGates
	ResourceCache   resourceapply.ResourceCache
	EventRecorder   record.EventRecorder
}

ProvisioningReconciler reconciles a Provisioning object

func (*ProvisioningReconciler) Reconcile

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

Reconcile updates the cluster settings when the Provisioning resource changes

func (*ProvisioningReconciler) SetupWithManager

func (r *ProvisioningReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager configures the manager to run the controller

type StatusReason

type StatusReason string

StatusReason is a MixedCaps string representing the reason for a status condition change.

const (

	// OperatorDisabled represents a Disabled ClusterStatusConditionTypes
	OperatorDisabled osconfigv1.ClusterStatusConditionType = "Disabled"

	// ReasonEmpty is an empty StatusReason
	ReasonEmpty StatusReason = ""

	// ReasonExpected indicates that the operator is behaving as expected
	ReasonExpected StatusReason = "AsExpected"

	// ReasonComplete the deployment of required resources is complete
	ReasonComplete StatusReason = "DeployComplete"

	// ReasonSyncing means that resources are deploying
	ReasonSyncing StatusReason = "SyncingResources"

	// ReasonInvalidConfiguration indicates that the configuration is invalid
	ReasonInvalidConfiguration StatusReason = "InvalidConfiguration"

	// ReasonDeployTimedOut indicates that the deployment timedOut
	ReasonDeployTimedOut StatusReason = "DeployTimedOut"

	// ReasonDeploymentCrashLooping indicates that the deployment is crashlooping
	ReasonDeploymentCrashLooping StatusReason = "DeploymentCrashLooping"

	// ReasonResourceNotFound indicates that the deployment is not found
	ReasonResourceNotFound StatusReason = "ResourceNotFound"

	// ReasonProvisioningCRNotFound indicates that the provsioning CR is not found
	ReasonProvisioningCRNotFound StatusReason = "WaitingForProvisioningCR"

	// ReasonUnsupported is an unsupported StatusReason
	ReasonUnsupported StatusReason = "UnsupportedPlatform"
)

Jump to

Keyboard shortcuts

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