compute

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AgentPoolProfileName is a format string for the name of the automatically
	// created cluster agent pool profile
	AgentPoolProfileName = "agentpool"
)

Variables

This section is empty.

Functions

func SanitizeClusterName

func SanitizeClusterName(name string) string

SanitizeClusterName sanitizes the given AKS cluster name

Types

type AKSClusterAPI

type AKSClusterAPI interface {
	Get(ctx context.Context, instance computev1alpha2.AKSCluster) (containerservice.ManagedCluster, error)
	CreateOrUpdateBegin(ctx context.Context, instance computev1alpha2.AKSCluster, clusterName, appID, spSecret string) ([]byte, error)
	CreateOrUpdateEnd(op []byte) (bool, error)
	Delete(ctx context.Context, instance computev1alpha2.AKSCluster) (containerservice.ManagedClustersDeleteFuture, error)
	ListClusterAdminCredentials(ctx context.Context, instance computev1alpha2.AKSCluster) (containerservice.CredentialResults, error)
}

AKSClusterAPI represents the API interface for a AKS Cluster client

type AKSClusterClient

type AKSClusterClient struct {
	containerservice.ManagedClustersClient
}

AKSClusterClient is the concreate implementation of the AKSClusterAPI interface that calls Azure API.

func NewAKSClusterClient

func NewAKSClusterClient(provider *v1alpha2.Provider, clientset kubernetes.Interface) (*AKSClusterClient, error)

NewAKSClusterClient creates and initializes a AKSClusterClient instance.

func (*AKSClusterClient) CreateOrUpdateBegin

func (c *AKSClusterClient) CreateOrUpdateBegin(ctx context.Context, instance computev1alpha2.AKSCluster, clusterName, appID, spSecret string) ([]byte, error)

CreateOrUpdateBegin begins the create/update operation for a AKS Cluster with the given properties

func (*AKSClusterClient) CreateOrUpdateEnd

func (c *AKSClusterClient) CreateOrUpdateEnd(op []byte) (done bool, err error)

CreateOrUpdateEnd checks to see if the given create/update operation is completed and if any error has occurred.

func (*AKSClusterClient) Delete

Delete begins the deletion operator for the given AKS cluster instance

func (*AKSClusterClient) Get

Get returns the AKS cluster details for the given instance

func (*AKSClusterClient) ListClusterAdminCredentials

func (c *AKSClusterClient) ListClusterAdminCredentials(ctx context.Context, instance computev1alpha2.AKSCluster) (containerservice.CredentialResults, error)

ListClusterAdminCredentials will return the admin credentials used to connect to the given AKS cluster

type AKSSetupAPIFactory

type AKSSetupAPIFactory interface {
	CreateSetupClient(*v1alpha2.Provider, kubernetes.Interface) (*AKSSetupClient, error)
}

AKSSetupAPIFactory is an interface that can create instances of the AKSSetupClient

type AKSSetupClient

AKSSetupClient is a type that implements all of the AKS setup interface

type AKSSetupClientFactory

type AKSSetupClientFactory struct {
}

AKSSetupClientFactory implements the AKSSetupAPIFactory interface by returning real clients that talk to Azure APIs

func (*AKSSetupClientFactory) CreateSetupClient

func (f *AKSSetupClientFactory) CreateSetupClient(provider *v1alpha2.Provider, clientset kubernetes.Interface) (*AKSSetupClient, error)

CreateSetupClient creates and returns an AKS setup client that is ready to talk to Azure APIs

Jump to

Keyboard shortcuts

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