Documentation ¶
Index ¶
- func GetPreferredMachinePoolAddress(machinePool *computev1alpha1.MachinePool, ...) (string, error)
- func MakeInsecureTransport(config *MachinePoolletClientConfig) (http.RoundTripper, error)
- func MakeTransport(config *MachinePoolletClientConfig) (http.RoundTripper, error)
- type ConnectionInfo
- type ConnectionInfoGetter
- type MachinePoolConnectionInfoGetter
- type MachinePoolGetter
- type MachinePoolGetterFunc
- type MachinePoolletClientConfig
- type NoMatchError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPreferredMachinePoolAddress ¶
func GetPreferredMachinePoolAddress(machinePool *computev1alpha1.MachinePool, preferredAddressTypes []computev1alpha1.MachinePoolAddressType) (string, error)
GetPreferredMachinePoolAddress returns the address of the provided node, using the provided preference order. If none of the preferred address types are found, an error is returned.
func MakeInsecureTransport ¶
func MakeInsecureTransport(config *MachinePoolletClientConfig) (http.RoundTripper, error)
MakeInsecureTransport creates an insecure RoundTripper for HTTP Transport.
func MakeTransport ¶
func MakeTransport(config *MachinePoolletClientConfig) (http.RoundTripper, error)
MakeTransport creates a secure RoundTripper for HTTP Transport.
Types ¶
type ConnectionInfo ¶
type ConnectionInfo struct { Scheme string Hostname string Port string Transport http.RoundTripper InsecureSkipTLSVerifyTransport http.RoundTripper }
ConnectionInfo provides the information needed to connect to a machine poollet.
type ConnectionInfoGetter ¶
type ConnectionInfoGetter interface {
GetConnectionInfo(ctx context.Context, machinePoolName string) (*ConnectionInfo, error)
}
func NewMachinePoolConnectionInfoGetter ¶
func NewMachinePoolConnectionInfoGetter(machinePools MachinePoolGetter, config MachinePoolletClientConfig) (ConnectionInfoGetter, error)
type MachinePoolConnectionInfoGetter ¶
type MachinePoolConnectionInfoGetter struct {
// contains filtered or unexported fields
}
MachinePoolConnectionInfoGetter obtains connection info from the status of a MachinePool API object
func (*MachinePoolConnectionInfoGetter) GetConnectionInfo ¶
func (k *MachinePoolConnectionInfoGetter) GetConnectionInfo(ctx context.Context, machinePoolName string) (*ConnectionInfo, error)
GetConnectionInfo retrieves connection info from the status of a Node API object.
type MachinePoolGetter ¶
type MachinePoolGetter interface {
Get(ctx context.Context, name string, options metav1.GetOptions) (*computev1alpha1.MachinePool, error)
}
MachinePoolGetter defines an interface for looking up a node by name
type MachinePoolGetterFunc ¶
type MachinePoolGetterFunc func(ctx context.Context, name string, options metav1.GetOptions) (*computev1alpha1.MachinePool, error)
MachinePoolGetterFunc allows implementing MachinePoolGetter with a function
func (MachinePoolGetterFunc) Get ¶
func (f MachinePoolGetterFunc) Get(ctx context.Context, name string, options metav1.GetOptions) (*computev1alpha1.MachinePool, error)
Get fetches information via MachinePoolGetterFunc.
type MachinePoolletClientConfig ¶
type MachinePoolletClientConfig struct { // Port specifies the default port - used if no information about Machinepoollet port can be found in Node.NodeStatus.DaemonEndpoints. Port uint // ReadOnlyPort specifies the Port for ReadOnly communications. ReadOnlyPort uint // PreferredAddressTypes - used to select an address from Node.NodeStatus.Addresses PreferredAddressTypes []string // TLSClientConfig contains settings to enable transport layer security rest.TLSClientConfig // Server requires Bearer authentication BearerToken string `datapolicy:"token"` // HTTPTimeout is used by the client to timeout http requests to MachinePoollet. HTTPTimeout time.Duration // Dial is a custom dialer used for the client Dial utilnet.DialFunc // Lookup will give us a dialer if the egress selector is configured for it Lookup egressselector.Lookup }
type NoMatchError ¶
type NoMatchError struct {
// contains filtered or unexported fields
}
NoMatchError is a typed implementation of the error interface. It indicates a failure to get a matching Node.
func (*NoMatchError) Error ¶
func (e *NoMatchError) Error() string
Error is the implementation of the conventional interface for representing an error condition, with the nil value representing no error.