Documentation
¶
Overview ¶
Package aci contains components for deploying to Azure ACI.
Index ¶
- Variables
- type AzureFileShareVolume
- type Capacity
- type Config
- type Deployment
- func (*Deployment) Descriptor() ([]byte, []int)deprecated
- func (x *Deployment) GetContainerGroup() *Deployment_ContainerGroup
- func (x *Deployment) GetId() string
- func (x *Deployment) GetUrl() string
- func (*Deployment) ProtoMessage()
- func (x *Deployment) ProtoReflect() protoreflect.Message
- func (x *Deployment) Reset()
- func (x *Deployment) String() string
- type Deployment_ContainerGroup
- func (*Deployment_ContainerGroup) Descriptor() ([]byte, []int)deprecated
- func (x *Deployment_ContainerGroup) GetName() string
- func (x *Deployment_ContainerGroup) GetResourceGroup() string
- func (x *Deployment_ContainerGroup) GetSubscriptionId() string
- func (*Deployment_ContainerGroup) ProtoMessage()
- func (x *Deployment_ContainerGroup) ProtoReflect() protoreflect.Message
- func (x *Deployment_ContainerGroup) Reset()
- func (x *Deployment_ContainerGroup) String() string
- type GitRepoVolume
- type Platform
- func (p *Platform) Config() (interface{}, error)
- func (p *Platform) ConfigSet(config interface{}) error
- func (p *Platform) Deploy(ctx context.Context, log hclog.Logger, src *component.Source, ...) (*Deployment, error)
- func (p *Platform) DeployFunc() interface{}
- func (p *Platform) Documentation() (*docs.Documentation, error)
- type RegistryCredentials
- type Release
- type Volume
Constants ¶
This section is empty.
Variables ¶
var File_waypoint_builtin_azure_aci_plugin_proto protoreflect.FileDescriptor
var Options = []sdk.Option{
sdk.WithComponents(&Platform{}),
}
Options are the SDK options to use for instantiation for the Azure ACI plugin.
Functions ¶
This section is empty.
Types ¶
type AzureFileShareVolume ¶
type AzureFileShareVolume struct {
// Name of the FileShare in Azure storage
Name string `hcl:"name,attr"`
// Storage account name
StorageAccountName string `hcl:"storage_account_name,attr"`
// Storage account key to access the storage
StorageAccountKey string `hcl:"storage_account_key,attr"`
}
AzureFileShareVolume allows you to mount an Azure container storage fileshare into the container
type Capacity ¶
type Capacity struct {
// Memory to allocate to the container specified in MB, min 512, max 16384.
// Default value of 0 sets memory to 1536MB which is default container instance value
Memory int `hcl:"memory,attr" validate:"eq=0|gte=512,lte=16384"`
// CPUCount is the number CPUs to allocate to a container instance
CPUCount int `hcl:"cpu_count,attr" validate:"gte=0,lte=4"`
}
type Config ¶
type Config struct {
// ResourceGroup is the resource group to deploy to.
ResourceGroup string `hcl:"resource_group,attr"`
// Region to deploy the container instance to
Location string `hcl:"location,optional"`
// Azure subscription id, if not set plugin will attempt to use the environment variable
// AZURE_SUBSCRIPTION_ID
SubscriptionID string `hcl:"subscription_id,optional"`
// ManagedIdentity assigned to the container group
// use managed identity to enable containers to access other
// Azure resources
// (https://docs.microsoft.com/en-us/azure/container-instances/container-instances-managed-identity#:~:text=Enable%20a%20managed%20identity&text=Azure%20Container%20Instances%20supports%20both,or%20both%20types%20of%20identities.)
// Note: ManagedIdentity can not be used to authorize Container Instances to pull from private Container registries in Azure
ManagedIdentity string `hcl:"managed_identity,optional"`
// Port the applications is listening on.
Ports []int `hcl:"ports,optional"`
// Environment variables that are meant to configure the application in a static
// way. This might be control an image that has multiple modes of operation,
// selected via environment variable. Most configuration should use the waypoint
// config commands.
StaticEnvVars map[string]string `hcl:"static_environment,optional"`
// Capacity details for cloud run container.
Capacity *Capacity `hcl:"capacity,block"`
Volumes []Volume `hcl:"volume,block" validate:"dive"`
}
Config is the configuration structure for the Platform. In addition to HCL defined configuration the following environment variables are also valid AZURE_SUBSCRIPTION_ID = Subscription ID for your Azure account [required] REGISTRY_USERNAME = Username for container registry, required when using a private registry REGISTRY_PASSWORD = Password for container registry, required when using a private registry
type Deployment ¶
type Deployment struct {
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
ContainerGroup *Deployment_ContainerGroup `protobuf:"bytes,3,opt,name=container_group,json=containerGroup,proto3" json:"container_group,omitempty"`
// contains filtered or unexported fields
}
func (*Deployment) Descriptor
deprecated
func (*Deployment) Descriptor() ([]byte, []int)
Deprecated: Use Deployment.ProtoReflect.Descriptor instead.
func (*Deployment) GetContainerGroup ¶
func (x *Deployment) GetContainerGroup() *Deployment_ContainerGroup
func (*Deployment) ProtoMessage ¶
func (*Deployment) ProtoMessage()
func (*Deployment) ProtoReflect ¶
func (x *Deployment) ProtoReflect() protoreflect.Message
type Deployment_ContainerGroup ¶
type Deployment_ContainerGroup struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
ResourceGroup string `protobuf:"bytes,2,opt,name=resource_group,json=resourceGroup,proto3" json:"resource_group,omitempty"`
SubscriptionId string `protobuf:"bytes,3,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty"`
// contains filtered or unexported fields
}
func (*Deployment_ContainerGroup) Descriptor
deprecated
func (*Deployment_ContainerGroup) Descriptor() ([]byte, []int)
Deprecated: Use Deployment_ContainerGroup.ProtoReflect.Descriptor instead.
func (*Deployment_ContainerGroup) GetResourceGroup ¶
func (x *Deployment_ContainerGroup) GetResourceGroup() string
func (*Deployment_ContainerGroup) GetSubscriptionId ¶
func (x *Deployment_ContainerGroup) GetSubscriptionId() string
func (*Deployment_ContainerGroup) ProtoMessage ¶
func (*Deployment_ContainerGroup) ProtoMessage()
func (*Deployment_ContainerGroup) ProtoReflect ¶
func (x *Deployment_ContainerGroup) ProtoReflect() protoreflect.Message
type GitRepoVolume ¶
type GitRepoVolume struct {
// GitHub repository to mount as a volume
Repository string `hcl:"repository,attr" validate:"url"`
// Branch, Tag or Commit SHA
Revision string `hcl:"revision,optional"`
// Directory name to checkout repo to, defaults to repository name
Directory string `hcl:"directory,optional"`
}
GitRepoVolume allows the mounting of a Git repository into the container
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
Platform is the Platform implementation for Azure ACI.
func (*Platform) Config ¶
func (p *Platform) Config() (interface{}, error)
Config implements Configurable
func (*Platform) ConfigSet ¶
func (p *Platform) ConfigSet(config interface{}) error
ConfigSet is called after a configuration has been decoded we can use this to validate the config
func (*Platform) Deploy ¶
func (p *Platform) Deploy(
ctx context.Context,
log hclog.Logger,
src *component.Source,
img *docker.Image,
deployConfig *component.DeploymentConfig,
ui terminal.UI,
) (*Deployment, error)
Deploy deploys an image to ACI.
func (*Platform) DeployFunc ¶
func (p *Platform) DeployFunc() interface{}
DeployFunc implements component.Platform
func (*Platform) Documentation ¶
func (p *Platform) Documentation() (*docs.Documentation, error)
type RegistryCredentials ¶
type RegistryCredentials struct {
Username string `hcl:"username"`
Password string `hcl:"password"`
}
RegistryCredentials are the user credentials needed to authenticate with a container registry.
type Release ¶
type Release struct {
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
// contains filtered or unexported fields
}
func (*Release) Descriptor
deprecated
func (*Release) Descriptor() ([]byte, []int)
Deprecated: Use Release.ProtoReflect.Descriptor instead.
func (*Release) ProtoMessage ¶
func (*Release) ProtoMessage()
func (*Release) ProtoReflect ¶
func (x *Release) ProtoReflect() protoreflect.Message
type Volume ¶
type Volume struct {
// Name of the Volume to mount
Name string `hcl:"name,attr"`
// Filepath where the volume will be mounted in the container
Path string `hcl:"path,attr"`
// Is the volume read only?
ReadOnly bool `hcl:"read_only,attr"`
// Details for an Azure file share volume
AzureFileShare *AzureFileShareVolume `hcl:"azure_file_share,block"`
// Details for an GitHub repo volume
GitRepoVolume *GitRepoVolume `hcl:"git_repo,block"`
}
Volume defines a volume mount for the container. Supported types are Azure file share or GitHub repository Only one type can be set