azure

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImageReferenceFromImage

func ImageReferenceFromImage(img string) *armcomputev2.ImageReference

ImageReferenceFromImage sets the `ID` or `CommunityGalleryImageID` field of `ImageReference` depending on the provided `img`.

Types

type CloudControllerManager

type CloudControllerManager struct {
	// contains filtered or unexported fields
}

CloudControllerManager holds the Azure cloud-controller-manager configuration.

func NewCloudControllerManager

func NewCloudControllerManager(metadata ccmMetadata) *CloudControllerManager

func (*CloudControllerManager) ConfigMaps

ConfigMaps returns a list of ConfigMaps to deploy together with the k8s cloud-controller-manager Reference: https://kubernetes.io/docs/concepts/configuration/configmap/ .

func (*CloudControllerManager) Env

func (c *CloudControllerManager) Env() []k8s.EnvVar

Env returns a list of k8s environment key-value pairs to deploy together with the k8s cloud-controller-manager.

func (*CloudControllerManager) ExtraArgs

func (c *CloudControllerManager) ExtraArgs() []string

ExtraArgs returns a list of arguments to append to the cloud-controller-manager command.

func (*CloudControllerManager) Image

Image returns the container image used to provide cloud-controller-manager for the cloud-provider.

func (*CloudControllerManager) Name

func (c *CloudControllerManager) Name() string

Name returns the cloud-provider name as used by k8s cloud-controller-manager (k8s.gcr.io/cloud-controller-manager).

func (*CloudControllerManager) Path

func (c *CloudControllerManager) Path() string

Path returns the path used by cloud-controller-manager executable within the container image.

func (*CloudControllerManager) Secrets

func (c *CloudControllerManager) Secrets(ctx context.Context, providerID string, cloudServiceAccountURI string) (kubernetes.Secrets, error)

Secrets returns a list of secrets to deploy together with the k8s cloud-controller-manager. Reference: https://kubernetes.io/docs/concepts/configuration/secret/ .

func (*CloudControllerManager) Supported

func (c *CloudControllerManager) Supported() bool

Supported is used to determine if cloud controller manager is implemented for this cloud provider.

func (*CloudControllerManager) VolumeMounts

func (c *CloudControllerManager) VolumeMounts() []k8s.VolumeMount

VolumeMounts a list of of volume mounts to deploy together with the k8s cloud-controller-manager.

func (*CloudControllerManager) Volumes

func (c *CloudControllerManager) Volumes() []k8s.Volume

Volumes returns a list of volumes to deploy together with the k8s cloud-controller-manager. Reference: https://kubernetes.io/docs/concepts/storage/volumes/ .

type CloudNodeManager

type CloudNodeManager struct{}

CloudNodeManager holds the Azure cloud-node-manager configuration. reference: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/examples/out-of-tree/cloud-node-manager.yaml .

func (*CloudNodeManager) ExtraArgs

func (c *CloudNodeManager) ExtraArgs() []string

ExtraArgs returns a list of arguments to append to the cloud-node-manager command.

func (*CloudNodeManager) Image

func (c *CloudNodeManager) Image(k8sVersion versions.ValidK8sVersion) (string, error)

Image returns the container image used to provide cloud-node-manager for the cloud-provider.

func (*CloudNodeManager) Path

func (c *CloudNodeManager) Path() string

Path returns the path used by cloud-node-manager executable within the container image.

func (*CloudNodeManager) Supported

func (c *CloudNodeManager) Supported() bool

Supported is used to determine if cloud node manager is implemented for this cloud provider.

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(ctx context.Context, metadata *Metadata) (*Logger, error)

NewLogger creates a new client to store information in Azure Application Insights https://github.com/Microsoft/ApplicationInsights-go

func (*Logger) Close

func (l *Logger) Close() error

Close blocks until all information are written to cloud API.

func (*Logger) Disclose

func (l *Logger) Disclose(msg string)

Disclose stores log information in Azure Application Insights! Do **NOT** log sensitive information!

type Metadata

type Metadata struct {
	// contains filtered or unexported fields
}

Metadata implements azure metadata APIs.

func NewMetadata

func NewMetadata(ctx context.Context) (*Metadata, error)

NewMetadata creates a new Metadata.

func (*Metadata) GetInstance

func (m *Metadata) GetInstance(ctx context.Context, providerID string) (metadata.InstanceMetadata, error)

GetInstance retrieves an instance using its providerID.

func (*Metadata) GetLoadBalancerEndpoint

func (m *Metadata) GetLoadBalancerEndpoint(ctx context.Context) (string, error)

GetLoadBalancerEndpoint retrieves the first load balancer IP from cloud provider metadata.

The returned string is an IP address without a port, but the method name needs to satisfy the metadata interface.

func (*Metadata) GetLoadBalancerName

func (m *Metadata) GetLoadBalancerName(ctx context.Context) (string, error)

GetLoadBalancerName returns the load balancer name of the resource group.

func (*Metadata) GetNetworkSecurityGroupName

func (m *Metadata) GetNetworkSecurityGroupName(ctx context.Context) (string, error)

GetNetworkSecurityGroupName returns the security group name of the resource group.

func (*Metadata) List

List retrieves all instances belonging to the current constellation.

func (*Metadata) Self

Self retrieves the current instance.

func (*Metadata) Supported

func (m *Metadata) Supported() bool

Supported is used to determine if metadata API is implemented for this cloud provider.

func (*Metadata) SupportsLoadBalancer

func (m *Metadata) SupportsLoadBalancer() bool

SupportsLoadBalancer returns true if the cloud provider supports load balancers.

func (*Metadata) UID

func (m *Metadata) UID(ctx context.Context) (string, error)

UID retrieves the UID of the constellation.

Jump to

Keyboard shortcuts

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