Documentation ¶
Index ¶
- Constants
- Variables
- func Confirmation() bool
- func MergeConfig(config []byte, path string) error
- type AKSClient
- func (aksClient AKSClient) CreateOrUpdate(ctx context.Context, name string, cluster ValidAKSCluster) error
- func (aksClient AKSClient) GetCredentials(name string) ([]byte, error)
- func (aksClient AKSClient) GetUpgrades(name string) ([]string, string, error)
- func (aksClient AKSClient) ListAKS() (map[string]AksCluster, error)
- func (aksClient AKSClient) ScaleAKS(ctx context.Context, name string, count int32) error
- func (aksClient AKSClient) UpgradeAKS(ctx context.Context, name string, k8sVersion string) error
- type AksCluster
- type ValidAKSCluster
Constants ¶
const (
DefaultPermission = 0664
)
DefaultPermission of the Kubernetes config file
const (
DefaultPollingDuration = 1 * time.Hour
)
DefaultPollingDuration for CreateUpdate Call to AKS Cluster
Variables ¶
var (
DefaultKubeConfig = clientcmd.RecommendedHomeFile
)
DefaultKubeConfig is the location of Default Kubernetes config file
Functions ¶
func MergeConfig ¶
MergeConfig is use to merge kubernetes configuration with default kube config ~/.kube/config
Types ¶
type AKSClient ¶
type AKSClient struct { SubscriptionID string Authorizer autorest.Authorizer ContainerService containerservice.ManagedClustersClient }
AKSClient is an object representing session for subscription
func NewAKSClient ¶
NewAKSClient returns Azure Session Object
func (AKSClient) CreateOrUpdate ¶
func (aksClient AKSClient) CreateOrUpdate(ctx context.Context, name string, cluster ValidAKSCluster) error
CreateOrUpdate creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. Parameters: resourceGroupName - the name of the resource group. name - the name of AKS Cluster. object of ValidAKSCluster.
func (AKSClient) GetCredentials ¶
GetCredentials returns list of AKS clusters in resource group
func (AKSClient) GetUpgrades ¶
GetUpgrades get the available upgrade version and current version
func (AKSClient) ListAKS ¶
func (aksClient AKSClient) ListAKS() (map[string]AksCluster, error)
ListAKS returns list of AKS clusters in resource group
type AksCluster ¶
AksCluster is an object representing details for AKS cluster
type ValidAKSCluster ¶
type ValidAKSCluster struct { ResourceGroup string K8sVersion string Nodes int32 AKSInstance containerservice.ManagedCluster }
ValidAKSCluster is an object representing validated AKS Cluster