client

package
v1.6.2 Latest Latest
Warning

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

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

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the Apache 2.0 license.

Copyright (c) Microsoft Corporation. Licensed under the Apache 2.0 license.

Copyright (c) Microsoft Corporation. Licensed under the Apache 2.0 license.

Index

Constants

This section is empty.

Variables

View Source
var (
	ExtensionTypeKubeProxy       = "kube-proxy"
	ExtensionTypeRealtimeMetrics = "realtime-metrics"

	// ExtensionVersion_1 Supported extension version.
	ExtensionVersion_1 = "1.0"

	// Supported kube-proxy extension constants
	KubeProxyExtensionSettingClusterCIDR = "clusterCidr"
	KubeProxyExtensionSettingKubeVersion = "kubeVersion"
	KubeProxyExtensionSettingKubeConfig  = "kubeConfig"
	KubeProxyExtensionKubeVersion        = "v1.9.10"
)

Functions

func GetKubeProxyExtension

func GetKubeProxyExtension(secretPath, masterURI, clusterCIDR string) (*azaciv2.DeploymentExtensionSpec, error)

GetKubeProxyExtension gets the kubeProxy extension

func GetRealtimeMetricsExtension

func GetRealtimeMetricsExtension() *azaciv2.DeploymentExtensionSpec

GetRealtimeMetricsExtension gets the realtime extension

Types

type AzClientsAPIs

type AzClientsAPIs struct {
	ContainersClient     *azaciv2.ContainersClient
	ContainerGroupClient *azaciv2.ContainerGroupsClient
	LocationClient       *azaciv2.LocationClient
}

func NewAzClientsAPIs

func NewAzClientsAPIs(ctx context.Context, azConfig auth.Config) (*AzClientsAPIs, error)

func (*AzClientsAPIs) CreateContainerGroup

func (a *AzClientsAPIs) CreateContainerGroup(ctx context.Context, resourceGroup, podNS, podName string, cg *azaciv2.ContainerGroup) error

func (*AzClientsAPIs) DeleteContainerGroup

func (a *AzClientsAPIs) DeleteContainerGroup(ctx context.Context, resourceGroup, cgName string) error

func (*AzClientsAPIs) ExecuteContainerCommand

func (a *AzClientsAPIs) ExecuteContainerCommand(ctx context.Context, resourceGroup, cgName, containerName string, containerReq azaciv2.ContainerExecRequest) (*azaciv2.ContainerExecResponse, error)

func (*AzClientsAPIs) GetContainerGroup

func (a *AzClientsAPIs) GetContainerGroup(ctx context.Context, resourceGroup, containerGroupName string) (*azaciv2.ContainerGroup, error)

func (*AzClientsAPIs) GetContainerGroupInfo

func (a *AzClientsAPIs) GetContainerGroupInfo(ctx context.Context, resourceGroup, namespace, name, nodeName string) (*azaciv2.ContainerGroup, error)

GetContainerGroupInfo returns a container group from ACI.

func (*AzClientsAPIs) GetContainerGroupListResult

func (a *AzClientsAPIs) GetContainerGroupListResult(ctx context.Context, resourceGroup string) ([]*azaciv2.ContainerGroup, error)

func (*AzClientsAPIs) ListCapabilities

func (a *AzClientsAPIs) ListCapabilities(ctx context.Context, region string) ([]*azaciv2.Capabilities, error)

func (*AzClientsAPIs) ListLogs

func (a *AzClientsAPIs) ListLogs(ctx context.Context, resourceGroup, cgName, containerName string, opts api.ContainerLogOpts) (*string, error)

type AzClientsInterface

type AzClientsInterface interface {
	ContainerGroupGetter
	CreateContainerGroup(ctx context.Context, resourceGroup, podNS, podName string, cg *azaciv2.ContainerGroup) error
	GetContainerGroupInfo(ctx context.Context, resourceGroup, namespace, name, nodeName string) (*azaciv2.ContainerGroup, error)
	GetContainerGroupListResult(ctx context.Context, resourceGroup string) ([]*azaciv2.ContainerGroup, error)
	ListCapabilities(ctx context.Context, region string) ([]*azaciv2.Capabilities, error)
	DeleteContainerGroup(ctx context.Context, resourceGroup, cgName string) error
	ListLogs(ctx context.Context, resourceGroup, cgName, containerName string, opts api.ContainerLogOpts) (*string, error)
	ExecuteContainerCommand(ctx context.Context, resourceGroup, cgName, containerName string, containerReq azaciv2.ContainerExecRequest) (*azaciv2.ContainerExecResponse, error)
}

type ContainerGroupGetter

type ContainerGroupGetter interface {
	GetContainerGroup(ctx context.Context, resourceGroup, containerGroupName string) (*azaciv2.ContainerGroup, error)
}

ContainerGroupGetter package dependency: query the Container Group information

type PodGetter

type PodGetter interface {
	GetPods() []*v1.Pod
}

PodGetter package dependency: query the Pods in current virtual nodes. it usually is ResourceManager

type PodStatsGetter

type PodStatsGetter interface {
	GetPodStats(ctx context.Context, pod *v1.Pod) (*stats.PodStats, error)
}

there are difference implementation of query Pod's statistics. this interface is for mocking in unit test

Jump to

Keyboard shortcuts

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