openstack

package
v1.25.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderName            = "openstack"
	ClusterAutoHealingLabel = "auto_healing_enabled"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudProvider added in v1.25.0

type CloudProvider struct {
	KubeClient           kubernetes.Interface
	Nova                 *gophercloud.ServiceClient
	Heat                 *gophercloud.ServiceClient
	Magnum               *gophercloud.ServiceClient
	Cinder               *gophercloud.ServiceClient
	Config               config.Config
	ResourceStackMapping map[string]ResourceStackRelationship
}

OpenStack is an implementation of cloud provider Interface for OpenStack.

func (CloudProvider) Enabled added in v1.25.0

func (provider CloudProvider) Enabled() bool

Enabled decides if the repair should be triggered. There are two conditions that we disable the repair: - The cluster admin disables the auto healing via OpenStack API. - The Magnum cluster is not in stable status.

func (CloudProvider) GetName added in v1.25.0

func (provider CloudProvider) GetName() string

func (CloudProvider) Repair added in v1.25.0

func (provider CloudProvider) Repair(nodes []healthcheck.NodeInfo) error

Repair For master nodes: detach etcd and docker volumes, find the root

        volume, then shutdown the VM, marks the both the VM and the root
        volume (heat resource) as "unhealthy" then trigger Heat stack update
        in order to rebuild the node. The information this function needs:
        - Nova VM ID
        - Root volume ID
	       - Heat stack ID and resource ID.

For worker nodes: Call Magnum resize API directly.

func (CloudProvider) UpdateHealthStatus added in v1.25.0

func (provider CloudProvider) UpdateHealthStatus(masters []healthcheck.NodeInfo, workers []healthcheck.NodeInfo) error

UpdateHealthStatus can update the cluster health status to reflect the real-time health status of the k8s cluster.

type OpenStackCloudProvider

type OpenStackCloudProvider = CloudProvider

revive:disable:exported Deprecated: use CloudProvider instead

type ResourceStackRelationship

type ResourceStackRelationship struct {
	ResourceID   string
	ResourceName string
	StackID      string
	StackName    string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL