Documentation ¶
Index ¶
- type ClusterNodeSshKeys
- func (c *ClusterNodeSshKeys) FetchPersistedKeysFromSecret() error
- func (c *ClusterNodeSshKeys) GenerateNewKeys() error
- func (c *ClusterNodeSshKeys) GetKeysDataSecret() (*corev1.Secret, error)
- func (c *ClusterNodeSshKeys) IsPersistedToSecret() bool
- func (c *ClusterNodeSshKeys) PersistKeysToSecret() (*corev1.Secret, error)
- type VMCommandExecutor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterNodeSshKeys ¶
type ClusterNodeSshKeys struct { ClusterContext *clustercontext.ClusterContext Client runtimeclient.Client PublicKey []byte // in the format "ssh-rsa ...", base64 encoded PrivateKey []byte // in PEM format }
ClusterNodeSshKeys is a struct containing nodes ssh keys.
func NewClusterNodeSshKeys ¶
func NewClusterNodeSshKeys(clusterContext *clustercontext.ClusterContext, client runtimeclient.Client) *ClusterNodeSshKeys
NewClusterNodeSshKeys creates a new struct for cluster nodes ssh keys
func (*ClusterNodeSshKeys) FetchPersistedKeysFromSecret ¶
func (c *ClusterNodeSshKeys) FetchPersistedKeysFromSecret() error
FetchPersistedKeysFromSecret fetches public and private keys from secret note, the public key is base64 encoded "ssh-rsa ..." string note, the private key is in PEM format
func (*ClusterNodeSshKeys) GenerateNewKeys ¶
func (c *ClusterNodeSshKeys) GenerateNewKeys() error
GenerateNewKeys generates a new pair of ssh keys
func (*ClusterNodeSshKeys) GetKeysDataSecret ¶
func (c *ClusterNodeSshKeys) GetKeysDataSecret() (*corev1.Secret, error)
GetKeysDataSecret retrieves a pointer to the ssh keys secret.
func (*ClusterNodeSshKeys) IsPersistedToSecret ¶
func (c *ClusterNodeSshKeys) IsPersistedToSecret() bool
IsPersistedToSecret checks if a secret with ssh keys already exists, and contains key values
func (*ClusterNodeSshKeys) PersistKeysToSecret ¶
func (c *ClusterNodeSshKeys) PersistKeysToSecret() (*corev1.Secret, error)
PersistKeysToSecret persists public and private keys to secret
type VMCommandExecutor ¶
func NewVMCommandExecutor ¶
func NewVMCommandExecutor(address string, keys *ClusterNodeSshKeys) VMCommandExecutor
Click to show internal directories.
Click to hide internal directories.