azureutil

package
v0.0.0-...-3f274de Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForGroup

func CheckForGroup(ctx context.Context, groupsClient resources.GroupsClient, resourceName string) bool

CheckForGroup verify group exists

func CreateGroup

func CreateGroup(ctx context.Context, groupsClient resources.GroupsClient, resourceName string, location string) (resources.Group, error)

CreateGroup will create a new group with the provided name

func DeleteGroup

func DeleteGroup(ctx context.Context, groupsClient resources.GroupsClient, resourceName string) error

DeleteGroup will delete an azure resource group

func GetGroupsClient

func GetGroupsClient(tenantID string, clientID string, clientSecret string, subscriptionID string) resources.GroupsClient

GetGroupsClient get new groups client

Types

type AKS

type AKS struct {
	Client  containerservice.ManagedClustersClient
	Context context.Context
}

func (*AKS) CreateCluster

func (a *AKS) CreateCluster(input CreateClusterInput) (CreateClusterOutput, error)

CreateCluster creates a new managed Kubernetes cluster

func (*AKS) DeleteCluster

func (a *AKS) DeleteCluster(input DeleteClusterInput) (DeleteClusterOutput, error)

DeleteCluster deletes an existing aks cluster

func (*AKS) GetCluster

func (a *AKS) GetCluster(input GetClusterInput) (GetClusterOutput, error)

GetCluster retrieves a specific aks cluster

func (*AKS) GetClusterClient

func (a *AKS) GetClusterClient(input ClusterClientInput) (ClusterClientOutput, error)

GetClusterClient creates a new aks cluster client and authorizes access

func (*AKS) GetClusterNodeCount

func (a *AKS) GetClusterNodeCount(input ClusterNodeCountInput) (ClusterNodeCountOutput, error)

GetClusterNodeCount returns the current number of nodes in the agent pool

func (*AKS) GetClusterUpgrades

func (a *AKS) GetClusterUpgrades(input GetClusterUpgradeInput) (GetClusterUpgradeOutput, error)

GetClusterUpgrades lists the kubernetes upgrades available on the cluster

func (*AKS) ListClusters

func (a *AKS) ListClusters(input ListClusterInput) (ListClusterOutput, error)

ListClusters will list all clusters in the subscription

func (*AKS) ScaleClusterNodeCount

func (a *AKS) ScaleClusterNodeCount(input ScaleClusterInput) (ScaleClusterOutput, error)

ScaleClusterNodeCount sets the total number of nodes based on the count input

func (*AKS) SetClient

func (a *AKS) SetClient(client containerservice.ManagedClustersClient) *AKS

SetClient sets the client for an AKS

func (*AKS) UpgradeCluster

func (a *AKS) UpgradeCluster(input UpgradeClusterInput) (UpgradeClusterOutput, error)

UpgradeCluster upgrades the cluster to the provided kubernetes version

type Agent

type Agent struct {
	Name    *string
	Count   *int32
	MaxPods *int32
	Type    string
}

Agent is used to define properties for each instance group

type ClusterClientInput

type ClusterClientInput struct {
	TenantID       string
	ClientID       string
	ClientSecret   string
	SubscriptionID string
}

ClusterClientInput is used to create a new cluster client

type ClusterClientOutput

type ClusterClientOutput struct {
	Client containerservice.ManagedClustersClient
}

ClusterClientOutput shows results of creating a new cluster client

type ClusterDetailItem

type ClusterDetailItem struct {
	ID                string
	Name              string
	Status            string
	Kubeconfig        string
	AgentPoolProfiles *[]containerservice.ManagedClusterAgentPoolProfile
	NodeResourceGroup *string
}

ClusterDetailItem shows the details of a specific cluster

type ClusterNodeCountInput

type ClusterNodeCountInput struct {
	Name string
}

ClusterNodeCountInput is used to retrieve the current number of worker nodes in the cluster

type ClusterNodeCountOutput

type ClusterNodeCountOutput struct {
	Agent Agent
}

ClusterNodeCountOutput shows the number of worker nodes available in the cluster

type CreateClusterInput

type CreateClusterInput struct {
	Name         string
	Location     string
	K8sVersion   string
	ClientID     string
	ClientSecret string
	AgentPools   []Agent
	Tags         map[string]*string
}

CreateClusterInput is used to create a new cluster

type CreateClusterOutput

type CreateClusterOutput struct {
	Status string
}

CreateClusterOutput shows results of creating a new cluster

type DeleteClusterInput

type DeleteClusterInput struct {
	Name string
}

DeleteClusterInput is used to delete an existing cluster

type DeleteClusterOutput

type DeleteClusterOutput struct {
	Status string
}

DeleteClusterOutput shows the results of deleting a cluster

type GetClusterInput

type GetClusterInput struct {
	Name string
}

GetClusterInput is used to retrieve a cluster

type GetClusterOutput

type GetClusterOutput struct {
	Cluster ClusterDetailItem
}

GetClusterOutput shows the results of retrieving a cluster

type GetClusterUpgradeInput

type GetClusterUpgradeInput struct {
	Name string
}

GetClusterUpgradeInput is used to retrieve the available k8s upgrades for a cluster

type GetClusterUpgradeOutput

type GetClusterUpgradeOutput struct {
	Upgrades []string
}

GetClusterUpgradeOutput shows the available upgrades of a cluster

type ListClusterInput

type ListClusterInput struct{}

ListClusterInput is used to retrieve a list of clusters

type ListClusterOutput

type ListClusterOutput struct {
	Clusters []containerservice.ManagedCluster
}

ListClusterOutput shows the list of available clusters

type ScaleClusterInput

type ScaleClusterInput struct {
	Name     string
	NodePool string
	Count    int32
}

ScaleClusterInput is used to scale the number of worker nodes in a cluster up or down

type ScaleClusterOutput

type ScaleClusterOutput struct {
	Status string
}

ScaleClusterOutput shows the results of scaling a cluster

type UpgradeClusterInput

type UpgradeClusterInput struct {
	Name       string
	K8sVersion string
}

UpgradeClusterInput is used to upgrade an existing cluster

type UpgradeClusterOutput

type UpgradeClusterOutput struct {
	Status string
}

UpgradeClusterOutput shows the results of upgrading an existing cluster

Jump to

Keyboard shortcuts

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