managedclusters

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureClient

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

AzureClient contains the Azure go-sdk Client.

func NewClient

func NewClient(auth azure.Authorizer) *AzureClient

NewClient creates a new VM client from subscription ID.

func (*AzureClient) CreateOrUpdate

func (ac *AzureClient) CreateOrUpdate(ctx context.Context, resourceGroupName, name string, cluster containerservice.ManagedCluster) error

CreateOrUpdate creates or updates a managed cluster.

func (*AzureClient) Delete

func (ac *AzureClient) Delete(ctx context.Context, resourceGroupName, name string) error

Delete deletes a managed cluster.

func (*AzureClient) Get

func (ac *AzureClient) Get(ctx context.Context, resourceGroupName, name string) (containerservice.ManagedCluster, error)

Get gets a managed cluster.

func (*AzureClient) GetCredentials

func (ac *AzureClient) GetCredentials(ctx context.Context, resourceGroupName, name string) ([]byte, error)

GetCredentials fetches the admin kubeconfig for a managed cluster.

type Client

Client wraps go-sdk.

type PoolSpec

type PoolSpec struct {
	Name         string
	SKU          string
	Replicas     int32
	OSDiskSizeGB int32
}

PoolSpec contains agent pool specification details.

type Service

type Service struct {
	Client
}

Service provides operations on Azure resources.

func NewService

func NewService(auth azure.Authorizer) *Service

NewService creates a new service.

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, spec interface{}) error

Delete deletes the virtual network with the provided name.

func (*Service) Get

func (s *Service) Get(ctx context.Context, spec interface{}) (interface{}, error)

Get fetches a managed cluster from Azure.

func (*Service) GetCredentials

func (s *Service) GetCredentials(ctx context.Context, group, name string) ([]byte, error)

GetCredentials fetches a managed cluster kubeconfig from Azure.

func (*Service) Reconcile

func (s *Service) Reconcile(ctx context.Context, spec interface{}) error

Reconcile idempotently creates or updates a managed cluster, if possible.

type Spec

type Spec struct {
	// Name is the name of this AKS Cluster.
	Name string

	// ResourceGroupName is the name of the Azure resource group for this AKS Cluster.
	ResourceGroupName string

	// NodeResourceGroupName is the name of the Azure resource group containing IaaS VMs.
	NodeResourceGroupName string

	// VnetSubnetID is the Azure Resource ID for the subnet which should contain nodes.
	VnetSubnetID string

	// Location is a string matching one of the canonical Azure region names. Examples: "westus2", "eastus".
	Location string

	// Tags is a set of tags to add to this cluster.
	Tags map[string]string

	// Version defines the desired Kubernetes version.
	Version string

	// LoadBalancerSKU for the managed cluster. Possible values include: 'Standard', 'Basic'. Defaults to Standard.
	LoadBalancerSKU string

	// NetworkPlugin used for building Kubernetes network. Possible values include: 'azure', 'kubenet'. Defaults to azure.
	NetworkPlugin string

	// NetworkPolicy used for building Kubernetes network. Possible values include: 'calico', 'azure'. Defaults to azure.
	NetworkPolicy string

	// SSHPublicKey is a string literal containing an ssh public key. Will autogenerate and discard if not provided.
	SSHPublicKey string

	// AgentPools is the list of agent pool specifications in this cluster.
	AgentPools []PoolSpec

	// PodCIDR is the CIDR block for IP addresses distributed to pods
	PodCIDR string

	// ServiceCIDR is the CIDR block for IP addresses distributed to services
	ServiceCIDR string

	// DNSServiceIP is an IP address assigned to the Kubernetes DNS service
	DNSServiceIP *string
}

Spec contains properties to create a managed cluster.

Directories

Path Synopsis
Run go generate to regenerate this mock.
Run go generate to regenerate this mock.

Jump to

Keyboard shortcuts

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