Documentation
¶
Overview ¶
Package apis provides BareMetalHost utilities: status checks, provisioning state monitoring, and Metal3 operations.
Package apis provides Kubernetes API utilities: CSR approval, BareMetalHost status checks, and Metal3 operations.
Index ¶
- Constants
- func ApproveCSRs(oc *exutil.CLI, timeout time.Duration, pollInterval time.Duration, ...) int
- func FindBMCSecretByNodeName(oc *exutil.CLI, namespace, nodeName string) (string, error)
- func FindBMHByNodeName(oc *exutil.CLI, namespace, nodeName string) (string, error)
- func GetBMH(oc *exutil.CLI, bmhName, namespace string) (*metal3v1alpha1.BareMetalHost, error)
- func GetBMHErrorMessage(oc *exutil.CLI, bmhName, namespace string) (string, error)
- func GetBMHProvisioningState(oc *exutil.CLI, bmhName, namespace string) (metal3v1alpha1.ProvisioningState, error)
- func RestoreBMCPassword(oc *exutil.CLI, namespace, name string, originalPassword []byte) error
- func RotateNodeBMCPassword(oc *exutil.CLI, node *corev1.Node) (string, string, []byte, error)
Constants ¶
const (
BMCSecretNamespace = "openshift-machine-api"
)
Variables ¶
This section is empty.
Functions ¶
func ApproveCSRs ¶
func ApproveCSRs(oc *exutil.CLI, timeout time.Duration, pollInterval time.Duration, expectedCSRCount int) int
ApproveCSRs monitors and approves pending CSRs until timeout or expected count reached.
approvedCount := ApproveCSRs(oc, 10*time.Minute, 1*time.Minute, 0)
func FindBMCSecretByNodeName ¶
FindBMCSecretByNodeName finds a BMC secret name matching the pattern *-{shortName}-bmc-secret. Handles both simple names (master-0) and FQDNs (master-0.ostest.test.metalkube.org).
func FindBMHByNodeName ¶
FindBMHByNodeName finds a BareMetalHost name matching the pattern *-{shortName} for a given node. Handles both simple names (master-0) and FQDNs (master-0.ostest.test.metalkube.org).
func GetBMH ¶
func GetBMH(oc *exutil.CLI, bmhName, namespace string) (*metal3v1alpha1.BareMetalHost, error)
GetBMH retrieves and parses a BareMetalHost resource.
bmh, err := GetBMH(oc, "master-0", "openshift-machine-api")
func GetBMHErrorMessage ¶
GetBMHErrorMessage retrieves the error message from a BareMetalHost's status.
errorMsg, err := GetBMHErrorMessage(oc, "master-0", "openshift-machine-api")
func GetBMHProvisioningState ¶
func GetBMHProvisioningState(oc *exutil.CLI, bmhName, namespace string) (metal3v1alpha1.ProvisioningState, error)
GetBMHProvisioningState retrieves the current provisioning state of a BareMetalHost.
state, err := GetBMHProvisioningState(oc, "master-0", "openshift-machine-api")
func RestoreBMCPassword ¶
RestoreBMCPassword restores the password key on the given BMC Secret.
Types ¶
This section is empty.