aks

package
v1.9.6-rc.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool added in v1.9.0

func Bool(b *bool) bool

Bool returns a bool value for the passed bool pointer. It returns false if the pointer is nil.

func CheckLogAnalyticsWorkspaceForMonitoring

func CheckLogAnalyticsWorkspaceForMonitoring(ctx context.Context, client services.WorkplacesClientInterface,
	location string, group string, wsg string, wsn string) (workspaceID string, err error)

func CreateCluster added in v1.0.6

func CreateCluster(ctx context.Context, cred *Credentials, clusterClient services.ManagedClustersClientInterface, workplaceClient services.WorkplacesClientInterface,
	spec *aksv1.AKSClusterConfigSpec, phase string) error

CreateCluster creates a new managed Kubernetes cluster. In this case, there will be no existing upstream cluster. We are provisioning a brand new one.

func CreateOrUpdateAgentPool

func CreateOrUpdateAgentPool(ctx context.Context, agentPoolClient services.AgentPoolsClientInterface, spec *aksv1.AKSClusterConfigSpec, np *aksv1.AKSNodePool) error

CreateOrUpdateAgentPool creates a new pool(s) in AKS. If one already exists it updates the upstream node pool with any provided updates.

func ExistsCluster

func ExistsCluster(ctx context.Context, clusterClient services.ManagedClustersClientInterface, spec *aksv1.AKSClusterConfigSpec) (bool, error)

ExistsCluster Check if AKS managed Kubernetes cluster exist

func ExistsResourceGroup

func ExistsResourceGroup(ctx context.Context, groupsClient services.ResourceGroupsClientInterface, resourceGroup string) (bool, error)

func FindTenantID added in v1.1.4

func FindTenantID(ctx context.Context, env azure.Environment, subscriptionID string) (string, error)

This function is used to find the tenant ID for the subscription ID. It will send an unauthenticated request to the Azure Resource Manager endpoint to get the tenant ID from the WWW-Authenticate header. Example header:

  Bearer authorization_uri="https://login.windows.net/996fe9d1-6171-40aa-945b-4c64b63bf655",
		error="invalid_token", error_description="The authentication failed because of missing 'Authorization' header."

func GetCachedTenantID

func GetCachedTenantID(secretClient secretClient, subscriptionID string, secret *corev1.Secret) (string, error)

func GetClusterAccessProfile added in v1.1.0

func GetClusterAccessProfile(ctx context.Context, clusterClient services.ManagedClustersClientInterface, resourceGroupName string, resourceName string, roleName string) (armcontainerservice.ManagedClustersClientGetAccessProfileResponse, error)

func GetEnvironment added in v1.1.1

func GetEnvironment(env string) (cloud.Configuration, azure.Environment)

func Int32 added in v1.9.0

func Int32(i *int32) int32

Int32 returns an int value for the passed int pointer. It returns 0 if the pointer is nil.

func NewClientSecretCredential added in v1.9.0

func NewClientSecretCredential(cred *Credentials) (*azidentity.ClientSecretCredential, error)

func NewSubscriptionsClient added in v1.1.4

func NewSubscriptionsClient(baseURI string) subscriptions.Client

This function is used to create a new SubscriptionsClient with the given base URI. It is used to make unauthenticated requests to the Azure Resource Manager endpoint.

func RemoveAgentPool

func RemoveAgentPool(ctx context.Context, agentPoolClient services.AgentPoolsClientInterface, spec *aksv1.AKSClusterConfigSpec, np *aksv1.AKSNodePool) error

RemoveAgentPool Delete AKS Agent Pool

func RemoveCluster

RemoveCluster Delete AKS managed Kubernetes cluster

func String added in v1.9.0

func String(s *string) string

String returns a string value for the passed string pointer. It returns the empty string if the pointer is nil.

func StringMap added in v1.9.0

func StringMap(msp map[string]*string) map[string]string

StringMap returns a map of strings built from the map of string pointers. The empty string is used for nil pointers.

func StringMapPtr added in v1.9.0

func StringMapPtr(ms map[string]string) map[string]*string

StringMapPtr returns a map of string pointers built from the passed map of strings.

func StringSlice added in v1.9.0

func StringSlice(s *[]string) []string

StringSlice returns a string slice value for the passed string slice pointer. It returns a nil slice if the pointer is nil.

func UpdateCluster added in v1.0.6

func UpdateCluster(ctx context.Context, cred *Credentials, clusterClient services.ManagedClustersClientInterface, workplaceClient services.WorkplacesClientInterface,
	spec *aksv1.AKSClusterConfigSpec, phase string) error

UpdateCluster updates an existing managed Kubernetes cluster. Before updating, it pulls any existing configuration and then only updates managed fields.

func UpdateClusterTags added in v1.1.0

func UpdateClusterTags(ctx context.Context, clusterClient services.ManagedClustersClientInterface, resourceGroupName string, resourceName string, parameters armcontainerservice.TagsObject) (armcontainerservice.ManagedClustersClientUpdateTagsResponse, error)

Types

type Credentials

type Credentials struct {
	AuthBaseURL    *string
	BaseURL        *string
	SubscriptionID string
	TenantID       string
	ClientID       string
	ClientSecret   string
	Cloud          cloud.Configuration
}

Directories

Path Synopsis
mock_services
Package mock_services is a generated GoMock package.
Package mock_services is a generated GoMock package.

Jump to

Keyboard shortcuts

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