openstack

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoints added in v0.3.0

type Endpoints struct {
	// contains filtered or unexported fields
}

Endpoints represents a v1.Endpoints + upstream name to facilicate metrics

type IdentityV3Client

type IdentityV3Client struct {
	// contains filtered or unexported fields
}

IdentityV3Client is a client of the OpenStack Keystone v3 API

func NewIdentityV3

func NewIdentityV3(provider *gophercloud.ProviderClient) (*IdentityV3Client, error)

NewIdentityV3 returns a client of the Keystone v3 API

func (*IdentityV3Client) ListProjects

func (c *IdentityV3Client) ListProjects() ([]projects.Project, error)

ListProjects returns the list of projects that are available to the user

type LoadBalancerLister

type LoadBalancerLister interface {
	ListLoadBalancers(projectID string) ([]loadbalancers.LoadBalancer, error)
	ListPools(projectID string) ([]pools.Pool, error)
}

type LoadBalancerV2Client

type LoadBalancerV2Client struct {
	// contains filtered or unexported fields
}

LoadBalancerV2Client is a client of the OpenStack LBaaS v2 API

func NewLoadBalancerV2

func NewLoadBalancerV2(provider *gophercloud.ProviderClient) (*LoadBalancerV2Client, error)

NewLoadBalancerV2 returns a client of the Load Balancer as a Service v2 API

func (LoadBalancerV2Client) ListLoadBalancers

func (c LoadBalancerV2Client) ListLoadBalancers(projectID string) ([]loadbalancers.LoadBalancer, error)

ListLoadBalancers returns the load balancers that exist in the given project

func (LoadBalancerV2Client) ListPools

func (c LoadBalancerV2Client) ListPools(projectID string) ([]pools.Pool, error)

ListPools returns all load balancer pools that exist in the given project

type LogRoundTripper added in v0.2.0

type LogRoundTripper struct {
	RoundTripper http.RoundTripper

	Log         *logrus.Logger
	Metrics     *localmetrics.DiscovererMetrics
	BackendName string
	// contains filtered or unexported fields
}

LogRoundTripper satisfies the http.RoundTripper interface and is used to customize the default Gophercloud RoundTripper to allow for logging.

func (*LogRoundTripper) RoundTrip added in v0.2.0

func (lrt *LogRoundTripper) RoundTrip(request *http.Request) (*http.Response, error)

RoundTrip performs a round-trip HTTP request and logs relevant information about it.

type ProjectLister

type ProjectLister interface {
	ListProjects() ([]projects.Project, error)
}

type Reconciler

type Reconciler struct {
	LoadBalancerLister
	ProjectLister

	// BackendName is the name of the OpenStack cluster
	BackendName string
	ClusterType string
	// GimbalKubeClient is the client of the Kubernetes cluster where Gimbal is running
	GimbalKubeClient kubernetes.Interface
	// Interval between reconciliation loops
	SyncPeriod time.Duration
	Logger     *logrus.Logger

	Metrics localmetrics.DiscovererMetrics
	// contains filtered or unexported fields
}

The Reconciler connects to an OpenStack cluster and makes sure that the Load Balancers defined in the cluster are reflected in the Gimbal Kubernetes cluster as Services and Endpoints. The Reconciler runs on a configurable interval.

func NewReconciler

func NewReconciler(backendName, clusterType string, gimbalKubeClient kubernetes.Interface, syncPeriod time.Duration, lbLister LoadBalancerLister,
	projectLister ProjectLister, log *logrus.Logger, queueWorkers int, metrics localmetrics.DiscovererMetrics) Reconciler

NewReconciler returns an OpenStack reconciler

func (*Reconciler) Run

func (r *Reconciler) Run(stop <-chan struct{})

Run starts the reconciler

Jump to

Keyboard shortcuts

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