client

package
v0.0.0-...-ddd6cb9 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: Apache-2.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

View Source
const (
	StorageAccountContributor = "Storage Account Contributor"
)

Storage Account Contributor role constant

Variables

This section is empty.

Functions

func AssignStorageAccountContributorRole

func AssignStorageAccountContributorRole(manager ClusterManager, resourceGroup, clusterName, location string) error

AssignStorageAccountContributorRole assign 'Storage Account Contributor' role for all VM in the given resource group

func CreateNetworkInterface

func CreateNetworkInterface(manager ClusterManager, rg, location, vnetName, subnetName, nsgName, ipName, nicName string) (*network.Interface, error)

CreateNetworkInterface create a network interface

func CreateOrUpdateResourceGroup

func CreateOrUpdateResourceGroup(manager ClusterManager, resourceGroup, location string) (*resources.Group, error)

CreateOrUpdateResourceGroup creates/updates a resource group

func CreateRoleAssignment

func CreateRoleAssignment(manager ClusterManager, scope, roleDefinitionId, principalId string) (*authorization.RoleAssignment, error)

CreateRoleAssignment creates role assignment

func CreateUpdateCluster

func CreateUpdateCluster(manager ClusterManager, request *cluster.CreateClusterRequest) (*azure.ResponseWithValue, error)

CreateUpdateCluster creates or updates a managed cluster with the specified configuration for agents and Kubernetes version.

func CreateVirtualMachine

func CreateVirtualMachine(manager ClusterManager, rg, location, vnetName, subnetName, nsgName, ipName, vmName, nicName string, sshPubkey string) (*compute.VirtualMachine, error)

CreateVirtualMachine creates a VM

func DeleteCluster

func DeleteCluster(manager ClusterManager, name string, resourceGroup string) error

DeleteCluster deletes the managed cluster with a specified resource group and name.

func DeleteResourceGroup

func DeleteResourceGroup(manager ClusterManager, resourceGroup string) error

DeleteResourceGroup creates a new resource group

func DeleteRoleAssignment

func DeleteRoleAssignment(manager ClusterManager, scope, assignmentName string) (*authorization.RoleAssignment, error)

DeleteRoleAssignment deletes role assignment

func DeleteStorageAccountContributorRole

func DeleteStorageAccountContributorRole(manager ClusterManager, resourceGroup, clusterName, location string) error

DeleteStorageAccountContributorRole deletes 'Storage Account Contributor' role for all VM in the given resource group

func DisableManagedServiceIdentity

func DisableManagedServiceIdentity(manager ClusterManager, resourceGroup, clusterName, location string) error

DisableManagedServiceIdentity disables MSI

func EnableManagedServiceIdentity

func EnableManagedServiceIdentity(manager ClusterManager, resourceGroup, clusterName, location string) error

EnableManagedServiceIdentity enables MSI

func FindInfrastructureResourceGroup

func FindInfrastructureResourceGroup(manager ClusterManager, resourceGroup, clusterName, location string) (*resources.Group, error)

FindInfrastructureResourceGroup returns with the infrastructure resource group of the resource group

func FindRoleDefinitionByName

func FindRoleDefinitionByName(manager ClusterManager, scope, roleName string) (*authorization.RoleDefinition, error)

FindRoleDefinitionByName filters all role definition by role name and scope

func GetCluster

func GetCluster(manager ClusterManager, name string, resourceGroup string) (*azure.ResponseWithValue, error)

GetCluster gets the details of the managed cluster with a specified resource group and name.

func GetClusterConfig

func GetClusterConfig(manager ClusterManager, name, resourceGroup, roleName string) (*azure.Config, error)

GetClusterConfig gets the given cluster kubeconfig

func GetKubernetesVersions

func GetKubernetesVersions(manager ClusterManager, location string) ([]string, error)

GetKubernetesVersions returns a list of supported kubernetes version in the specified subscription

func GetLocations

func GetLocations(manager ClusterManager) ([]string, error)

GetLocations returns all the locations that are available for resource providers

func GetVirtualMachine

func GetVirtualMachine(manager ClusterManager, resourceGroup, clusterName, location, vmName string) (*compute.VirtualMachine, error)

GetVirtualMachine retrieves information about a virtual machine

func GetVmSizes

func GetVmSizes(manager ClusterManager, location string) ([]string, error)

GetVmSizes lists all available virtual machine sizes for a subscription in a location.

func ListClusters

func ListClusters(manager ClusterManager) (*azure.ListResponse, error)

ListClusters gets a list of managed clusters in the specified subscription. The operation returns properties of each managed cluster.

func ListGroups

func ListGroups(manager ClusterManager) ([]resources.Group, error)

ListGroups returns all resource group

func ListResourceGroups

func ListResourceGroups(manager ClusterManager) ([]resources.Group, error)

ListResourceGroups lists resource groups

func ListRoleAssignments

func ListRoleAssignments(manager ClusterManager) ([]authorization.RoleAssignment, error)

ListRoleAssignments returns all role assignment

func ListRoleDefinitions

func ListRoleDefinitions(manager ClusterManager, scope string) ([]authorization.RoleDefinition, error)

ListRoleDefinitions returns all role definition

func ListVirtualMachines

func ListVirtualMachines(manager ClusterManager, resourceGroup, clusterName, location string) ([]compute.VirtualMachine, error)

ListVirtualMachines returns all VM

func PollingCluster

func PollingCluster(manager ClusterManager, name string, resourceGroup string) (*azure.ResponseWithValue, error)

PollingCluster polls until the cluster ready or an error occurs

func ValidateCredentials

func ValidateCredentials(manager ClusterManager) error

ValidateCredentials validates client credentials

Types

type ClusterManager

type ClusterManager interface {
	With(i interface{})

	LogDebug(args ...interface{})
	LogInfo(args ...interface{})
	LogWarn(args ...interface{})
	LogError(args ...interface{})
	LogFatal(args ...interface{})
	LogPanic(args ...interface{})
	LogDebugf(format string, args ...interface{})
	LogInfof(format string, args ...interface{})
	LogWarnf(format string, args ...interface{})
	LogErrorf(format string, args ...interface{})
	LogFatalf(format string, args ...interface{})
	LogPanicf(format string, args ...interface{})
	// contains filtered or unexported methods
}

ClusterManager responsible for all cluster process

func GetAKSClient

func GetAKSClient(credentials *cluster.AKSCredential) (ClusterManager, error)

GetAKSClient creates an *aksClient instance with the passed credentials and default logger

Jump to

Keyboard shortcuts

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