cloudprovider

package
v0.1.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: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AWS   = "AWS"
	Local = "local"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressLoadBalancer

type AddressLoadBalancer interface {
	ServiceAddressLoadBalancerNeedsUpdate(
		latticeID v1.LatticeID,
		address *latticev1.Address,
		service *latticev1.Service,
		serviceMeshPorts map[int32]int32,
	) (bool, error)
	EnsureServiceAddressLoadBalancer(
		latticeID v1.LatticeID,
		address *latticev1.Address,
		service *latticev1.Service,
		serviceMeshPorts map[int32]int32,
	) error
	DestroyServiceAddressLoadBalancer(v1.LatticeID, *latticev1.Address) error
	ServiceAddressLoadBalancerAddAnnotations(
		latticeID v1.LatticeID,
		address *latticev1.Address,
		service *latticev1.Service,
		serviceMeshPorts map[int32]int32,
		annotations map[string]string,
	) error
	ServiceAddressLoadBalancerPorts(
		latticeID v1.LatticeID,
		address *latticev1.Address,
		service *latticev1.Service,
		serviceMeshPorts map[int32]int32,
	) (map[int32]string, error)
}

type Interface

type Interface interface {
	systembootstrapper.Interface
	dnsprovider.Interface
	AddressLoadBalancer
	NodePool

	// TransformComponentBuildJobSpec takes in the JobSpec generated for a Definition, and applies any cloud provider
	// related transforms necessary to a copy of the JobSpec, and returns it.
	TransformComponentBuildJobSpec(*batchv1.JobSpec) *batchv1.JobSpec

	ComponentBuildWorkDirectoryVolumeSource(jobName string) corev1.VolumeSource

	// TransformServicePodTemplateSpec takes in the DeploymentSpec generated for a Service, and applies any cloud provider
	// related transforms necessary to a copy of the DeploymentSpec, and returns it.
	TransformPodTemplateSpec(*corev1.PodTemplateSpec) *corev1.PodTemplateSpec

	// IsDeploymentSpecCurrent checks to see if any part of the current DeploymentSpec that the service mesh is responsible
	// for is out of date compared to the desired deployment spec. If the current DeploymentSpec is current, it also returns
	// a copy of the desired DeploymentSpec with the negation of TransformServicePodTemplateSpec applied.
	// That is, if the aspects of the DeploymentSpec that were transformed by TransformServicePodTemplateSpec are all still
	// current, this method should return true, along with a copy of the DeploymentSpec that should be identical to the
	// DeploymentSpec that was passed in to TransformServicePodTemplateSpec.
	IsDeploymentSpecUpdated(service *latticev1.Service, current, desired, untransformed *appsv1.DeploymentSpec) (bool, string, *appsv1.DeploymentSpec)
}

func NewCloudProvider

func NewCloudProvider(
	namespacePrefix string,
	kubeClient kubeclientset.Interface,
	kubeInformerFactory kubeinformers.SharedInformerFactory,
	latticeInformerFactory latticeinformers.SharedInformerFactory,
	options *Options,
) (Interface, error)

type NodePool

type NodePool interface {
	NodePoolNeedsNewEpoch(*latticev1.NodePool) (bool, error)
	EnsureNodePoolEpoch(v1.LatticeID, *latticev1.NodePool, latticev1.NodePoolEpoch) error
	DestroyNodePoolEpoch(v1.LatticeID, *latticev1.NodePool, latticev1.NodePoolEpoch) error
	NodePoolEpochStatus(
		latticeID v1.LatticeID,
		nodePool *latticev1.NodePool,
		epoch latticev1.NodePoolEpoch,
		epochSpec *latticev1.NodePoolSpec,
	) (*latticev1.NodePoolStatusEpochStatus, error)
	NodePoolAddAnnotations(v1.LatticeID, *latticev1.NodePool, map[string]string, latticev1.NodePoolEpoch) error
}

type Options

type Options struct {
	AWS   *aws.Options
	Local *local.Options
}

func Flag

func Flag(cloudProvider *string) (cli.Flag, *Options)

func OverlayConfigOptions

func OverlayConfigOptions(staticOptions *Options, dynamicConfig *latticev1.ConfigCloudProvider) (*Options, error)

Directories

Path Synopsis
aws

Jump to

Keyboard shortcuts

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