Documentation
¶
Index ¶
- Constants
- Variables
- func GetAllowedLocations() string
- func GetAllowedVMSizes() string
- func GetOsDiskTypes() string
- type Apiloader
- func (a *Apiloader) DeserializeOpenEnclave(contents []byte, validate, isUpdate bool, sshPubKeys []string) (*OpenEnclave, error)
- func (a *Apiloader) LoadOpenEnclave(contents []byte, validate, isUpdate bool, sshPubKeys []string) (*OpenEnclave, error)
- func (a *Apiloader) LoadOpenEnclaveFromFile(jsonFile string, validate, isUpdate bool, sshPubKeys []string) (*OpenEnclave, error)
- func (a *Apiloader) SerializeOpenEnclave(oe *OpenEnclave) ([]byte, error)
- type DiagnosticsProfile
- type LinuxProfile
- type OSImage
- type OSType
- type OpenEnclave
- type Properties
- type PublicKey
- type VMProfile
- type VnetProfile
- type WindowsProfile
Constants ¶
const ( // DefaultVMName is default VM pool name DefaultVMName = "accVM" // DefaultGeneratorCode specifies the source generator of the cluster template. DefaultGeneratorCode = "oe-engine" // DefaultVnet specifies default vnet address space DefaultVnet = "10.0.0.0/16" // DefaultSubnet specifies default subnet DefaultSubnet = "10.0.0.0/24" // DefaultOsDiskType specifies default OS disk type DefaultOsDiskType = "Premium_LRS" )
Variables ¶
var AllowedLocations = []string{
"eastus",
"westeurope",
"uksouth",
}
AllowedLocations provides supported azure regions
var AllowedOsDiskTypes = []string{
"Premium_LRS",
"StandardSSD_LRS",
"Standard_LRS",
}
AllowedOsDiskTypes provides supported OS disk types
var AllowedVMSizes = []string{
"Standard_DC2s",
"Standard_DC4s",
"Standard_DC1s_v2",
"Standard_DC2s_v2",
"Standard_DC4s_v2",
"Standard_DC8_v2",
"Standard_D2s_v3",
"Standard_D4s_v3",
"Standard_D8s_v3",
"Standard_D16s_v3",
"Standard_D32s_v3",
"Standard_D64s_v3",
}
AllowedVMSizes provides supported VM sizes
var DefaultLinuxImage = OSImage{
Publisher: "Canonical",
Offer: "confidential-compute-preview",
SKU: "16.04-LTS",
}
DefaultLinuxImage specifies default Linux OS image
var DefaultWindowsImage = OSImage{
Publisher: "MicrosoftWindowsServer",
Offer: "confidential-compute-preview",
SKU: "acc-windows-server-2016-datacenter",
}
DefaultWindowsImage specifies default Windows OS image
Functions ¶
func GetAllowedLocations ¶
func GetAllowedLocations() string
GetAllowedLocations returns allowed locations
func GetAllowedVMSizes ¶
func GetAllowedVMSizes() string
GetAllowedVMSizes returns allowed sizes for VM
func GetOsDiskTypes ¶
func GetOsDiskTypes() string
GetOsDiskTypes returns allowed and default OS disk types
Types ¶
type Apiloader ¶
type Apiloader struct {
}
Apiloader represents the object that loads api model
func (*Apiloader) DeserializeOpenEnclave ¶
func (a *Apiloader) DeserializeOpenEnclave(contents []byte, validate, isUpdate bool, sshPubKeys []string) (*OpenEnclave, error)
DeserializeOpenEnclave loads an ACS Cluster API Model, validates it, and returns the unversioned representation
func (*Apiloader) LoadOpenEnclave ¶
func (a *Apiloader) LoadOpenEnclave(contents []byte, validate, isUpdate bool, sshPubKeys []string) (*OpenEnclave, error)
LoadOpenEnclave loads and validates an OE API Model
func (*Apiloader) LoadOpenEnclaveFromFile ¶
func (a *Apiloader) LoadOpenEnclaveFromFile(jsonFile string, validate, isUpdate bool, sshPubKeys []string) (*OpenEnclave, error)
LoadOpenEnclaveFromFile loads an OE API Model from a JSON file
func (*Apiloader) SerializeOpenEnclave ¶
func (a *Apiloader) SerializeOpenEnclave(oe *OpenEnclave) ([]byte, error)
SerializeOpenEnclave takes an unversioned container service and returns the bytes
type DiagnosticsProfile ¶
type DiagnosticsProfile struct {
Enabled bool `json:"enabled"`
StorageAccountName string `json:"storageAccountName"`
IsNewStorageAccount bool `json:"isNewStorageAccount"`
}
DiagnosticsProfile contains settings to on/off boot diagnostics collection in RD Host
type LinuxProfile ¶
type LinuxProfile struct {
AdminUsername string `json:"adminUsername" validate:"required"`
AdminPassword string `json:"adminPassword"`
SSHPubKeys []*PublicKey `json:"sshPublicKeys"`
OSImage *OSImage `json:"osImage,omitempty"`
}
LinuxProfile represents the linux parameters passed to the cluster
func (*LinuxProfile) HasCustomImage ¶ added in v0.2.0
func (p *LinuxProfile) HasCustomImage() bool
HasCustomImage returns true if there is a custom Linux OS image url specified
type OSImage ¶
type OSImage struct {
URL string `json:"url,omitempty"`
Publisher string `json:"publisher"`
Offer string `json:"offer"`
SKU string `json:"sku"`
Version string `json:"version,omitempty"`
}
OSImage represents OS Image from Azure Image Gallery
func (*OSImage) HasAzureGalleryImage ¶ added in v0.2.0
HasAzureGalleryImage returns true if Azure Image Gallery is used
type OpenEnclave ¶
type OpenEnclave struct {
Location string `json:"location"`
Properties *Properties `json:"properties,omitempty"`
}
OpenEnclave complies with the ARM model of resource definition in a JSON template.
type Properties ¶
type Properties struct {
VnetProfile *VnetProfile `json:"vnetProfile"`
VMProfiles []*VMProfile `json:"vmProfiles"`
LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"`
WindowsProfile *WindowsProfile `json:"windowsProfile,omitempty"`
DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
}
Properties represents the ACS cluster definition
func (*Properties) Validate ¶
func (p *Properties) Validate(isUpdate bool) error
Validate implements APIObject
type PublicKey ¶
type PublicKey struct {
KeyData string `json:"keyData"`
}
PublicKey contains puvlic SSH key
type VMProfile ¶ added in v0.2.0
type VMProfile struct {
Name string `json:"name"`
OSType OSType `json:"osType"`
OSDiskType string `json:"osDiskType"`
DiskSizesGB []int `json:"diskSizesGB,omitempty"`
VMSize string `json:"vmSize"`
Ports []int `json:"ports,omitempty" validate:"dive,min=1,max=65535"`
IsVanilla bool `json:"isVanilla"`
EnableWinRM bool `json:"enableWinRM"`
HasDNSName bool `json:"hasDNSName"`
}
VMProfile represents the definition of a VM
type VnetProfile ¶ added in v0.2.0
type VnetProfile struct {
VnetResourceGroup string `json:"vnetResourceGroup,omitempty"`
VnetName string `json:"vnetName,omitempty"`
VnetAddress string `json:"vnetAddress,omitempty"`
SubnetName string `json:"subnetName,omitempty"`
SubnetAddress string `json:"subnetAddress,omitempty"`
}
VnetProfile represents the definition of a vnet
func (*VnetProfile) IsCustomVNET ¶ added in v0.2.0
func (p *VnetProfile) IsCustomVNET() bool
IsCustomVNET returns true if the customer brought their own VNET
type WindowsProfile ¶
type WindowsProfile struct {
AdminUsername string `json:"adminUsername" validate:"required"`
AdminPassword string `json:"adminPassword" validate:"required"`
SSHPubKey string `json:"sshPublicKey,omitempty"`
OSImage *OSImage `json:"osImage,omitempty"`
}
WindowsProfile represents the windows parameters passed to the cluster
func (*WindowsProfile) HasCustomImage ¶
func (p *WindowsProfile) HasCustomImage() bool
HasCustomImage returns true if there is a custom Windows OS image url specified