helpers

package
v0.0.0-...-975d2cd Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPublicIPName

func GetPublicIPName(vmName string) string

GetPublicIPName returns the name of the Public IP resource, which is based on the Node's name

func GetResourceManagementAuthorizer

func GetResourceManagementAuthorizer() (a autorest.Authorizer, err error)

GetResourceManagementAuthorizer gets an OAuth token for managing resources using Service Principal credentials

func InitializeServicePrincipalDetails

func InitializeServicePrincipalDetails() error

InitializeServicePrincipalDetails reads the /etc/kubernetes/azure.json file on the host (mounted via hostPath on the Pod) this files contains the credentials for the AKS cluster's Service Principal

Types

type IPUpdate

type IPUpdate struct{}

func (*IPUpdate) CreateOrUpdateVMPulicIP

func (*IPUpdate) CreateOrUpdateVMPulicIP(ctx context.Context, vmName string, ipName string) error

CreateOrUpdateVMPulicIP will create a new Public IP and assign it to the Virtual Machine

func (*IPUpdate) DeletePublicIP

func (*IPUpdate) DeletePublicIP(ctx context.Context, ipName string) error

DeletePublicIP deletes the designated Public IP

func (*IPUpdate) DisassociatePublicIPForNode

func (*IPUpdate) DisassociatePublicIPForNode(ctx context.Context, nodeName string) error

DisassociatePublicIPForNode will remove the Public IP address association from the VM's NIC

type IPUpdater

type IPUpdater interface {
	CreateOrUpdateVMPulicIP(ctx context.Context, vmName string, ipName string) error
	DeletePublicIP(ctx context.Context, ipName string) error
	DisassociatePublicIPForNode(ctx context.Context, nodeName string) error
}

type ServicePrincipalDetails

type ServicePrincipalDetails struct {
	TenantID        string
	SubscriptionID  string
	AadClientID     string
	AadClientSecret string
	Location        string
	ResourceGroup   string
}

ServicePrincipalDetails contains the Service Principal credentials for the AKS cluster

Jump to

Keyboard shortcuts

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