starbops / kubevirtbmc

Power management for KubeVirt virtual machines through IPMI
Apache License 2.0
15 stars 2 forks source link

[FEATURE] Leverage Secret resources for BMC credentials #4

Open starbops opened 5 months ago

starbops commented 5 months ago

Is your feature request related to a problem? Please describe.

The username and password of the BMC are currently stored in the KubeBMC object:

// KubeBMCSpec defines the desired state of KubeBMC
type KubeBMCSpec struct {
    // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
    // Important: Run "make" to regenerate code after modifying this file

    // To authenticate who the user is.
    // +optional
    Username string `json:"username,omitempty"`

    // The credential part of the IPMI service
    // +optional
    Password string `json:"password,omitempty"`

    // The namespace where the virtual machine is in
    VirtualMachineNamespace string `json:"vmNamespace"`

    // The actual virtual machine that this BMC controls
    VirtualMachineName string `json:"vmName"`
}

It would be great if we dropped the credential part from KubeBMC CRD and made it associated with a Secret object.

Describe the solution you'd like

Put the credential part into Secret objects and associate KubeBMC objects with them.

Describe alternatives you've considered

N/A

Additional context

N/A