clusterdeployer

package
v0.0.0-...-86ffc8e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Copyright 2018 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	ApiServerPort              = 443
	RetryIntervalKubectlApply  = 5 * time.Second
	RetryIntervalResourceReady = 5 * time.Second
	TimeoutKubectlApply        = 2 * time.Minute
	TimeoutResourceReady       = 2 * time.Minute
	TimeoutMachineReady        = 5 * time.Minute
)
View Source
const ClusterAPIAPIServerConfigTemplate = `` /* 5175-byte string literal not displayed */

Variables

This section is empty.

Functions

func NewClusterClient

func NewClusterClient(kubeconfig string) (*clusterClient, error)

func NewClusterClientFromFile

func NewClusterClientFromFile(kubeconfigFile string) (*clusterClient, error)

Types

type ClusterClient

type ClusterClient interface {
	Apply(string) error
	WaitForClusterV1alpha1Ready() error
	GetClusterObjects() ([]*clusterv1.Cluster, error)
	GetMachineObjects() ([]*clusterv1.Machine, error)
	CreateClusterObject(*clusterv1.Cluster) error
	CreateMachineObjects([]*clusterv1.Machine) error
	UpdateClusterObjectEndpoint(string) error
	Close() error
}

Provides interaction with a cluster

type ClusterClientFactory

type ClusterClientFactory interface {
	ClusterClient(string) (ClusterClient, error)
}

Can create cluster clients

func NewClusterClientFactory

func NewClusterClientFactory() ClusterClientFactory

type ClusterDeployer

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

func New

func New(
	externalProvisioner ClusterProvisioner,
	clientFactory ClusterClientFactory,
	provider ProviderDeployer,
	providerComponents string,
	kubeconfigOutput string,
	cleanupExternalCluster bool) *ClusterDeployer

func (*ClusterDeployer) Create

func (d *ClusterDeployer) Create(cluster *clusterv1.Cluster, machines []*clusterv1.Machine) error

Creates the a cluster from the provided cluster definition and machine list.

type ClusterProvisioner

type ClusterProvisioner interface {
	Create() error
	Delete() error
	GetKubeconfig() (string, error)
}

Can provision a kubernetes cluster

type ProviderDeployer

type ProviderDeployer interface {
	// TODO: This requirement can be removed once after: https://github.com/kubernetes-sigs/cluster-api/issues/158
	GetIP(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (string, error)
	// TODO: This requirement can be removed after: https://github.com/kubernetes-sigs/cluster-api/issues/160
	GetKubeConfig(cluster *clusterv1.Cluster, master *clusterv1.Machine) (string, error)
}

Provider specific logic. Logic here should eventually be optional & additive.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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