Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUserAgentExtension ¶
func GetUserAgentExtension() string
func NewAuthorizer ¶
func NewAuthorizer(config *Config, env *azure.Environment) (autorest.Authorizer, error)
func NewCredential ¶
func NewCredential(cfg *Config, authorizer autorest.Authorizer) (azcore.TokenCredential, error)
NewCredential provides a token credential for msi and service principal auth
Types ¶
type ClientAssertionCredential ¶
type ClientAssertionCredential struct {
// contains filtered or unexported fields
}
ClientAssertionCredential authenticates an application with assertions provided by a callback function.
func (*ClientAssertionCredential) GetToken ¶
func (c *ClientAssertionCredential) GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error)
GetToken implements the TokenCredential interface
type ClientConfig ¶
type ClientConfig struct {
CloudName string
Location string
SubscriptionID string
ResourceManagerEndpoint string
Authorizer autorest.Authorizer
UserAgent string
}
ClientConfig contains all essential information to create an Azure client.
type Config ¶
type Config struct {
Location string `json:"location" yaml:"location"`
TenantID string `json:"tenantId" yaml:"tenantId"`
SubscriptionID string `json:"subscriptionId" yaml:"subscriptionId"`
ResourceGroup string `json:"resourceGroup" yaml:"resourceGroup"`
DeploymentMode string `json:"deploymentMode" yaml:"deploymentMode"`
UserAssignedIdentityID string `json:"userAssignedIdentityID" yaml:"userAssignedIdentityID"`
//Configs only for AKS
ClusterName string `json:"clusterName" yaml:"clusterName"`
// enableDynamicSKUCache defines whether to enable dynamic instance workflow for instance information check
EnableDynamicSKUCache bool `json:"enableDynamicSKUCache,omitempty" yaml:"enableDynamicSKUCache,omitempty"`
// EnableDetailedCSEMessage defines whether to emit error messages in the CSE error body info
EnableDetailedCSEMessage bool `json:"enableDetailedCSEMessage,omitempty" yaml:"enableDetailedCSEMessage,omitempty"`
// EnableForceDelete defines whether to enable force deletion on the APIs
EnableForceDelete bool `json:"enableForceDelete,omitempty" yaml:"enableForceDelete,omitempty"`
// EnableGetVmss defines whether to enable making a call to GET VMSS to fetch fresh capacity info
// The TTL for this cache is controlled by the GetVmssSizeRefreshPeriod interval
EnableGetVmss bool `json:"enableGetVmss,omitempty" yaml:"enableGetVmss,omitempty"`
// GetVmssSizeRefreshPeriod defines how frequently to call GET VMSS API to fetch VMSS info per nodegroup instance
GetVmssSizeRefreshPeriod time.Duration `json:"getVmssSizeRefreshPeriod,omitempty" yaml:"getVmssSizeRefreshPeriod,omitempty"`
// EnablePartialScaling defines whether to enable partial scaling based on quota limits
EnablePartialScaling bool `json:"enablePartialScaling,omitempty" yaml:"enablePartialScaling,omitempty"`
}
Config holds the configuration parsed from the --cloud-config flag
func BuildAzureConfig ¶
BuildAzureConfig returns a Config object for the Azure clients nolint: gocyclo
func (*Config) GetAzureClientConfig ¶
func (cfg *Config) GetAzureClientConfig(authorizer autorest.Authorizer, env *azure.Environment) *ClientConfig
Click to show internal directories.
Click to hide internal directories.