Documentation
¶
Index ¶
- Constants
- func BaremetalWebhookDependenciesReady(client osclientset.Interface) bool
- func DeleteAllSecrets(info *ProvisioningInfo) error
- func DeleteBaremetalOperatorDeployment(info *ProvisioningInfo) error
- func DeleteImageCache(info *ProvisioningInfo) error
- func DeleteImageCustomizationDeployment(info *ProvisioningInfo) error
- func DeleteImageCustomizationService(info *ProvisioningInfo) error
- func DeleteIronicPrometheusRule(info *ProvisioningInfo) error
- func DeleteIronicProxy(info *ProvisioningInfo) error
- func DeleteIronicServiceMonitor(info *ProvisioningInfo) error
- func DeleteMetal3Deployment(info *ProvisioningInfo) error
- func DeleteMetal3StateService(info *ProvisioningInfo) error
- func DeleteValidatingWebhook(info *ProvisioningInfo) error
- func EnableValidatingWebhook(info *ProvisioningInfo, mgr manager.Manager, ...) error
- func EnsureAllSecrets(info *ProvisioningInfo) (bool, error)
- func EnsureBaremetalOperatorDeployment(info *ProvisioningInfo) (updated bool, err error)
- func EnsureBaremetalOperatorWebhook(info *ProvisioningInfo) (bool, error)
- func EnsureImageCache(info *ProvisioningInfo) (updated bool, err error)
- func EnsureImageCustomizationDeployment(info *ProvisioningInfo) (updated bool, err error)
- func EnsureImageCustomizationService(info *ProvisioningInfo) (updated bool, err error)
- func EnsureIronicPrometheusRule(info *ProvisioningInfo) (bool, error)
- func EnsureIronicProxy(info *ProvisioningInfo) (updated bool, err error)
- func EnsureIronicServiceMonitor(info *ProvisioningInfo) (bool, error)
- func EnsureMetal3Deployment(info *ProvisioningInfo) (updated bool, err error)
- func EnsureMetal3StateService(info *ProvisioningInfo) (updated bool, err error)
- func GetBaremetalOperatorDeploymentState(client appsclientv1.DeploymentsGetter, targetNamespace string, ...) (appsv1.DeploymentConditionType, error)
- func GetContainerImages(containerImages *Images, imagesFilePath string) error
- func GetDeploymentState(client appsclientv1.DeploymentsGetter, targetNamespace string, ...) (appsv1.DeploymentConditionType, error)
- func GetImageCacheState(client appsclientv1.DaemonSetsGetter, targetNamespace string, ...) (appsv1.DaemonSetConditionType, error)
- func GetImageServerIPs(info *ProvisioningInfo) (imageServerIPs []string, err error)
- func GetIronicIPs(info *ProvisioningInfo) (ironicIPs []string, err error)
- func GetIronicProxyState(client appsclientv1.DaemonSetsGetter, targetNamespace string, ...) (appsv1.DaemonSetConditionType, error)
- func GetRealIronicIPs(info *ProvisioningInfo) ([]string, error)
- func IpOptionForProvisioning(config *metal3iov1alpha1.ProvisioningSpec, networkStack NetworkStackType) string
- func NewIronicPrometheusRule(namespace string) *unstructured.Unstructured
- func NewIronicServiceMonitor(namespace string) *unstructured.Unstructured
- func UseIronicProxy(info *ProvisioningInfo) bool
- func WebhookDependenciesReady(client osclientset.Interface) bool
- type Images
- type NetworkStackType
- type ProvisioningInfo
- type TlsCertificate
Constants ¶
const ( // OpenshiftConfigNamespace holds the name of the openshift-config namespace. OpenshiftConfigNamespace = "openshift-config" // PullSecretName holds the name of the pull-secret in openshift-config and openshift-machine-config. PullSecretName = "pull-secret" )
const ( DaemonSetProgressing appsv1.DaemonSetConditionType = "Progressing" DaemonSetReplicaFailure appsv1.DaemonSetConditionType = "ReplicaFailure" DaemonSetAvailable appsv1.DaemonSetConditionType = "Available" DaemonSetDisabled appsv1.DaemonSetConditionType = "Disabled" )
Variables ¶
This section is empty.
Functions ¶
func BaremetalWebhookDependenciesReady ¶
func BaremetalWebhookDependenciesReady(client osclientset.Interface) bool
BaremetalWebhookDependenciesReady checks dependencies to enable Baremetal Operator ValidatingWebhook.
func DeleteAllSecrets ¶
func DeleteAllSecrets(info *ProvisioningInfo) error
func DeleteBaremetalOperatorDeployment ¶
func DeleteBaremetalOperatorDeployment(info *ProvisioningInfo) error
func DeleteImageCache ¶
func DeleteImageCache(info *ProvisioningInfo) error
func DeleteImageCustomizationDeployment ¶
func DeleteImageCustomizationDeployment(info *ProvisioningInfo) error
func DeleteImageCustomizationService ¶
func DeleteImageCustomizationService(info *ProvisioningInfo) error
func DeleteIronicPrometheusRule ¶
func DeleteIronicPrometheusRule(info *ProvisioningInfo) error
DeleteIronicPrometheusRule deletes the PrometheusRule
func DeleteIronicProxy ¶
func DeleteIronicProxy(info *ProvisioningInfo) error
func DeleteIronicServiceMonitor ¶
func DeleteIronicServiceMonitor(info *ProvisioningInfo) error
DeleteIronicServiceMonitor deletes the ServiceMonitor
func DeleteMetal3Deployment ¶
func DeleteMetal3Deployment(info *ProvisioningInfo) error
func DeleteMetal3StateService ¶
func DeleteMetal3StateService(info *ProvisioningInfo) error
func DeleteValidatingWebhook ¶
func DeleteValidatingWebhook(info *ProvisioningInfo) error
DeleteValidatingWebhook deletes ValidatingWebhookConfiguration and service resources.
func EnableValidatingWebhook ¶
func EnableValidatingWebhook(info *ProvisioningInfo, mgr manager.Manager, enabledFeatures metal3iov1alpha1.EnabledFeatures) error
func EnsureAllSecrets ¶
func EnsureAllSecrets(info *ProvisioningInfo) (bool, error)
func EnsureBaremetalOperatorDeployment ¶
func EnsureBaremetalOperatorDeployment(info *ProvisioningInfo) (updated bool, err error)
func EnsureBaremetalOperatorWebhook ¶
func EnsureBaremetalOperatorWebhook(info *ProvisioningInfo) (bool, error)
EnsureBaremetalOperatorWebhook ensures ValidatingWebhook resources are ready to serve.
func EnsureImageCache ¶
func EnsureImageCache(info *ProvisioningInfo) (updated bool, err error)
func EnsureImageCustomizationDeployment ¶
func EnsureImageCustomizationDeployment(info *ProvisioningInfo) (updated bool, err error)
func EnsureImageCustomizationService ¶
func EnsureImageCustomizationService(info *ProvisioningInfo) (updated bool, err error)
func EnsureIronicPrometheusRule ¶
func EnsureIronicPrometheusRule(info *ProvisioningInfo) (bool, error)
EnsureIronicPrometheusRule ensures the PrometheusRule exists when sensor metrics and default rules are enabled
func EnsureIronicProxy ¶
func EnsureIronicProxy(info *ProvisioningInfo) (updated bool, err error)
func EnsureIronicServiceMonitor ¶
func EnsureIronicServiceMonitor(info *ProvisioningInfo) (bool, error)
EnsureIronicServiceMonitor ensures the ServiceMonitor exists when sensor metrics are enabled
func EnsureMetal3Deployment ¶
func EnsureMetal3Deployment(info *ProvisioningInfo) (updated bool, err error)
func EnsureMetal3StateService ¶
func EnsureMetal3StateService(info *ProvisioningInfo) (updated bool, err error)
func GetBaremetalOperatorDeploymentState ¶
func GetBaremetalOperatorDeploymentState(client appsclientv1.DeploymentsGetter, targetNamespace string, config *metal3iov1alpha1.Provisioning) (appsv1.DeploymentConditionType, error)
func GetContainerImages ¶
func GetDeploymentState ¶
func GetDeploymentState(client appsclientv1.DeploymentsGetter, targetNamespace string, config *metal3iov1alpha1.Provisioning) (appsv1.DeploymentConditionType, error)
Provide the current state of metal3 deployment
func GetImageCacheState ¶
func GetImageCacheState(client appsclientv1.DaemonSetsGetter, targetNamespace string, config *metal3iov1alpha1.Provisioning) (appsv1.DaemonSetConditionType, error)
Provide the current state of metal3 image-cache daemonset
func GetImageServerIPs ¶
func GetImageServerIPs(info *ProvisioningInfo) (imageServerIPs []string, err error)
func GetIronicIPs ¶
func GetIronicIPs(info *ProvisioningInfo) (ironicIPs []string, err error)
GetIronicIPs returns Ironic IPs for external consumption, potentially behind an HA proxy. Without a proxy, the provisioning IP is used when present and not disallowed for virtual media via configuration.
func GetIronicProxyState ¶
func GetIronicProxyState(client appsclientv1.DaemonSetsGetter, targetNamespace string, info *ProvisioningInfo) (appsv1.DaemonSetConditionType, error)
Provide the current state of ironic-proxy daemonset
func GetRealIronicIPs ¶
func GetRealIronicIPs(info *ProvisioningInfo) ([]string, error)
GetRealIronicIPs returns the actual IPs on which Ironic is accessible without a proxy. The provisioning IP is used when present and not disallowed for virtual media via configuration.
func IpOptionForProvisioning ¶
func IpOptionForProvisioning(config *metal3iov1alpha1.ProvisioningSpec, networkStack NetworkStackType) string
func NewIronicPrometheusRule ¶
func NewIronicPrometheusRule(namespace string) *unstructured.Unstructured
NewIronicPrometheusRule creates a PrometheusRule for hardware health alerts Note: Group-level labels require Prometheus >= 3.0.0 (OCP 4.19+)
func NewIronicServiceMonitor ¶
func NewIronicServiceMonitor(namespace string) *unstructured.Unstructured
NewIronicServiceMonitor creates a ServiceMonitor for Ironic metrics
func UseIronicProxy ¶
func UseIronicProxy(info *ProvisioningInfo) bool
func WebhookDependenciesReady ¶
func WebhookDependenciesReady(client osclientset.Interface) bool
Types ¶
type Images ¶
type Images struct {
BaremetalOperator string `json:"baremetalOperator"`
Ironic string `json:"baremetalIronic"`
MachineOsDownloader string `json:"baremetalMachineOsDownloader"`
StaticIpManager string `json:"baremetalStaticIpManager"`
IronicAgent string `json:"baremetalIronicAgent"`
ImageCustomizationController string `json:"imageCustomizationController"`
MachineOSImages string `json:"machineOSImages"`
}
type NetworkStackType ¶
type NetworkStackType int
const ( NetworkStackV4 NetworkStackType = 1 << iota NetworkStackV6 NetworkStackType = 1 << iota NetworkStackDual NetworkStackType = (NetworkStackV4 | NetworkStackV6) )
func (NetworkStackType) IpOption ¶
func (ns NetworkStackType) IpOption() string
type ProvisioningInfo ¶
type ProvisioningInfo struct {
Client kubernetes.Interface
DynamicClient dynamic.Interface
EventRecorder events.Recorder
ProvConfig *metal3iov1alpha1.Provisioning
Scheme *runtime.Scheme
Namespace string
Images *Images
Proxy *configv1.Proxy
NetworkStack NetworkStackType
MasterMacAddresses []string
SSHKey string
BaremetalWebhookEnabled bool
OSClient osclientset.Interface
ResourceCache resourceapply.ResourceCache
IsHyperShift bool
}
type TlsCertificate ¶
type TlsCertificate struct {
// contains filtered or unexported fields
}