Documentation
¶
Overview ¶
Package nodeupdater ...
Package nodeupdater ...
Package nodeupdater ...
Package nodeupdater ...
Index ¶
- func CheckIfRequiredLabelsPresent(labelMap map[string]string) bool
- func ErrorRetry(logger *zap.Logger, funcToRetry func() (error, bool)) error
- func GetTestLogger(t *testing.T) (logger *zap.Logger, teardown func())
- type AccessTokenResponse
- type Device
- type HReference
- type Image
- type Instance
- type InstanceList
- type MockVPCNodeLabelUpdater
- func (m *MockVPCNodeLabelUpdater) GetInstanceByIP(workerNodeName string) (*NodeInfo, error)
- func (m *MockVPCNodeLabelUpdater) GetInstanceByName(workerNodeName string) (*NodeInfo, error)
- func (m *MockVPCNodeLabelUpdater) GetInstancesFromVPC(riaasInstanceURL *url.URL) ([]*Instance, error)
- func (m *MockVPCNodeLabelUpdater) GetWorkerDetails(workerNodeName string) (*NodeInfo, error)
- func (m *MockVPCNodeLabelUpdater) UpdateNodeLabel(ctx context.Context, workerNodeName string) (done bool, err error)
- type NetworkInterface
- type NodeInfo
- type Profile
- type ResourceGroup
- type StorageSecretConfig
- type Subnet
- type Vcpu
- type Volume
- type VolumeAttachment
- type Vpc
- type VpcNodeLabelUpdater
- func (c *VpcNodeLabelUpdater) GetInstanceByIP(workerNodeName string) (*NodeInfo, error)
- func (c *VpcNodeLabelUpdater) GetInstanceByName(workerNodeName string) (*NodeInfo, error)
- func (c *VpcNodeLabelUpdater) GetInstancesFromVPC(riaasInstanceURL *url.URL) ([]*Instance, error)
- func (c *VpcNodeLabelUpdater) GetWorkerDetails(workerNodeName string) (*NodeInfo, error)
- func (c *VpcNodeLabelUpdater) UpdateNodeLabel(ctx context.Context, workerNodeName string) (done bool, err error)
- type Zone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIfRequiredLabelsPresent ¶
CheckIfRequiredLabelsPresent checks if nodes are already labeled with the required labels
func ErrorRetry ¶
ErrorRetry ...
Types ¶
type AccessTokenResponse ¶
type AccessTokenResponse struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token,omitempty"` TokenType string `json:"token_type,omitempty"` ExpiresIn int64 `json:"expires_in,omitempty"` Expiration int64 `json:"expiration,omitempty"` }
AccessTokenResponse ...
type Image ¶
type Image struct { ID string `json:"id,omitempty"` Href string `json:"href,omitempty"` Name string `json:"name,omitempty"` CRN string `json:"crn,omitempty"` }
Image ...
type Instance ¶
type Instance struct { Href string `json:"href,omitempty"` ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Memory int64 `json:"memory,omitempty"` ResourceGroup *ResourceGroup `json:"resource_group,omitempty"` Vcpu *Vcpu `json:"vcpu,omitempty"` Vpc *Vpc `json:"vpc,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` Status string `json:"status,omitempty"` VolumeAttachments *[]VolumeAttachment `json:"volume_attachments,omitempty"` NetworkInterfaces *[]NetworkInterface `json:"network_interfaces,omitempty"` PrimaryNetworkInterface *NetworkInterface `json:"primary_network_interface,omitempty"` BootVolumeAttachment *VolumeAttachment `json:"boot_volume_attachment,omitempty"` Zone *Zone `json:"zone,omitempty"` CRN string `json:"crn,omitempty"` Image *Image `json:"image,omitempty"` Profile *Profile `json:"profile,omitempty"` }
Instance ...
type InstanceList ¶
type InstanceList struct { First *HReference `json:"first,omitempty"` Next *HReference `json:"next,omitempty"` Instances []*Instance `json:"instances"` Limit int `json:"limit,omitempty"` TotalCount int `json:"total_count,omitempty"` }
InstanceList ...
type MockVPCNodeLabelUpdater ¶
type MockVPCNodeLabelUpdater struct { Node *v1.Node K8sClient *kubernetes.Clientset Logger *zap.Logger StorageSecretConfig *StorageSecretConfig }
MockVPCNodeLabelUpdater ...
func (*MockVPCNodeLabelUpdater) GetInstanceByIP ¶
func (m *MockVPCNodeLabelUpdater) GetInstanceByIP(workerNodeName string) (*NodeInfo, error)
GetInstanceByIP ...
func (*MockVPCNodeLabelUpdater) GetInstanceByName ¶
func (m *MockVPCNodeLabelUpdater) GetInstanceByName(workerNodeName string) (*NodeInfo, error)
GetInstanceByName ...
func (*MockVPCNodeLabelUpdater) GetInstancesFromVPC ¶
func (m *MockVPCNodeLabelUpdater) GetInstancesFromVPC(riaasInstanceURL *url.URL) ([]*Instance, error)
GetInstancesFromVPC ...
func (*MockVPCNodeLabelUpdater) GetWorkerDetails ¶
func (m *MockVPCNodeLabelUpdater) GetWorkerDetails(workerNodeName string) (*NodeInfo, error)
GetWorkerDetails ...
func (*MockVPCNodeLabelUpdater) UpdateNodeLabel ¶
func (m *MockVPCNodeLabelUpdater) UpdateNodeLabel(ctx context.Context, workerNodeName string) (done bool, err error)
UpdateNodeLabel ...
type NetworkInterface ¶
type NetworkInterface struct { ID string `json:"id,omitempty"` Href string `json:"href,omitempty"` Name string `json:"name,omitempty"` PrimaryIpv4Address string `json:"primary_ipv4_address,omitempty"` ResourceTyoe string `json:"resource_type,omitempty"` Subnet *Subnet `json:"subnet,omitempty"` }
NetworkInterface ...
type ResourceGroup ¶
type ResourceGroup struct { Href string `json:"href,omitempty"` ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` }
ResourceGroup ...
type StorageSecretConfig ¶
StorageSecretConfig ...
func ReadSecretConfiguration ¶
func ReadSecretConfiguration(k8sClient *k8s_utils.KubernetesClient, ctxLogger *zap.Logger) (*StorageSecretConfig, error)
ReadSecretConfiguration ...
type Subnet ¶
type Subnet struct { ID string `json:"id,omitempty"` Href string `json:"href,omitempty"` Name string `json:"name,omitempty"` CRN string `json:"crn,omitempty"` ResourceType string `json:"resource_type,omitempty"` }
Subnet ...
type Vcpu ¶
type Vcpu struct { Architecture string `json:"architecture,omitempty"` Count int64 `json:"count,omitempty"` }
Vcpu ...
type Volume ¶
type Volume struct { ID string `json:"id,omitempty"` Href string `json:"href,omitempty"` Name string `json:"name,omitempty"` CRN string `json:"crn,omitempty"` }
Volume ...
type VolumeAttachment ¶
type VolumeAttachment struct { ID string `json:"id,omitempty"` Href string `json:"href,omitempty"` Name string `json:"name,omitempty"` Volume *Volume `json:"volume,omitempty"` Device *Device `json:"device,omitempty"` }
VolumeAttachment ...
type Vpc ¶
type Vpc struct { ID string `json:"id,omitempty"` Href string `json:"href,omitempty"` Name string `json:"name,omitempty"` CRN string `json:"crn,omitempty"` ResourceType string `json:"resource_type,omitempty"` }
Vpc ...
type VpcNodeLabelUpdater ¶
type VpcNodeLabelUpdater struct { Node *v1.Node K8sClient kubernetes.Interface Logger *zap.Logger StorageSecretConfig *StorageSecretConfig }
VpcNodeLabelUpdater ...
func (*VpcNodeLabelUpdater) GetInstanceByIP ¶
func (c *VpcNodeLabelUpdater) GetInstanceByIP(workerNodeName string) (*NodeInfo, error)
GetInstanceByIP ...
func (*VpcNodeLabelUpdater) GetInstanceByName ¶
func (c *VpcNodeLabelUpdater) GetInstanceByName(workerNodeName string) (*NodeInfo, error)
GetInstanceByName ...
func (*VpcNodeLabelUpdater) GetInstancesFromVPC ¶
func (c *VpcNodeLabelUpdater) GetInstancesFromVPC(riaasInstanceURL *url.URL) ([]*Instance, error)
GetInstancesFromVPC ...
func (*VpcNodeLabelUpdater) GetWorkerDetails ¶
func (c *VpcNodeLabelUpdater) GetWorkerDetails(workerNodeName string) (*NodeInfo, error)
GetWorkerDetails ...
func (*VpcNodeLabelUpdater) UpdateNodeLabel ¶
func (c *VpcNodeLabelUpdater) UpdateNodeLabel(ctx context.Context, workerNodeName string) (done bool, err error)
UpdateNodeLabel gets the details of the newly added node from riaas and updates the labels. Returns false and err as nil if labels not updated. else returns true