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
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func EnabledFeatures(ctx context.Context, osClient osclientset.Interface) (v1alpha1.EnabledFeatures, error)
- func IsEnabled(enabledFeatures v1alpha1.EnabledFeatures) bool
- func Manifests0000_31_clusterBaremetalOperator_07_clusteroperatorCrYaml() (*asset, error)
- func Manifests0000_31_clusterBaremetalOperator_07_clusteroperatorCrYamlBytes() ([]byte, error)
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type FeatureGateWatcher
- type FeatureGates
- type InstallConfigData
- type ProvisioningReconciler
- type StatusReason
Constants ¶
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 ¶
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 ¶
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 ¶
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 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 MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
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 ¶
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" )