Documentation
¶
Index ¶
- Constants
- Variables
- func GetAllowedLocations() string
- func GetAllowedVMSizes() string
- func GetOSImageNames() string
- func GetOSImageReferences() string
- func GetOsDiskTypes() string
- func GetVMPlans() string
- type Apiloader
- func (a *Apiloader) DeserializeOpenEnclave(contents []byte, validate, isUpdate bool) (*OpenEnclave, error)
- func (a *Apiloader) LoadOpenEnclave(contents []byte, validate, isUpdate bool) (*OpenEnclave, error)
- func (a *Apiloader) LoadOpenEnclaveFromFile(jsonFile string, validate, isUpdate bool) (*OpenEnclave, error)
- func (a *Apiloader) SerializeOpenEnclave(oe *OpenEnclave) ([]byte, error)
- type CustomNodesDNS
- type CustomSearchDomain
- type DiagnosticsProfile
- type KeyVaultCertificate
- type KeyVaultID
- type KeyVaultSecrets
- type LinuxProfile
- type MasterProfile
- type OSImage
- type OSType
- type OpenEnclave
- type Properties
- type PublicKey
- type WindowsProfile
Constants ¶
const ( // OsUbuntu1604 image OsUbuntu1604 = "UbuntuServer_16.04" // OsWindows2016 image OsWindows2016 = "WindowsServer_2016" )
const ( // DefaultVMName is default VM 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" // DefaultPackageBaseURL specifies default package base URL DefaultPackageBaseURL = "https://oe.azureedge.net/data" // DefaultLinuxImage specifies default Linux OS image DefaultLinuxImage = OsUbuntu1604 // DefaultWindowsImage specifies default Linux OS image DefaultWindowsImage = OsWindows2016 )
Variables ¶
var AllowedLocations = []string{
"eastus",
"westeurope",
}
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",
}
AllowedVMSizes provides supported VM sizes
var OsImageMap = map[string]OSImage{ OsUbuntu1604: { Publisher: "Canonical", Offer: "confidential-compute-preview", SKU: "16.04-LTS", Version: "latest", IsWindows: false, }, OsWindows2016: { Publisher: "MicrosoftWindowsServer", Offer: "confidential-compute-preview", SKU: "acc-windows-server-2016-datacenter", Version: "latest", IsWindows: true, }, }
OsImageMap contains supported OS images
Functions ¶
func GetAllowedLocations ¶
func GetAllowedLocations() string
GetAllowedLocations returns allowed locations
func GetAllowedVMSizes ¶
func GetAllowedVMSizes() string
GetAllowedVMSizes returns allowed sizes for VM
func GetOSImageNames ¶
func GetOSImageNames() string
GetOSImageNames returns allowed and default OS image name
func GetOSImageReferences ¶
func GetOSImageReferences() string
GetOSImageReferences returns image references
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) (*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) (*OpenEnclave, error)
LoadOpenEnclave loads and validates an OE API Model
func (*Apiloader) LoadOpenEnclaveFromFile ¶
func (a *Apiloader) LoadOpenEnclaveFromFile(jsonFile string, validate, isUpdate bool) (*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 CustomNodesDNS ¶
type CustomNodesDNS struct {
DNSServer string `json:"dnsServer,omitempty"`
}
CustomNodesDNS represents the Search Domain when the custom vnet for a custom DNS as a nameserver.
type CustomSearchDomain ¶
type CustomSearchDomain struct {
Name string `json:"name,omitempty"`
RealmUser string `json:"realmUser,omitempty"`
RealmPassword string `json:"realmPassword,omitempty"`
}
CustomSearchDomain represents the Search Domain when the custom vnet has a windows server DNS as a nameserver.
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 KeyVaultCertificate ¶
type KeyVaultCertificate struct {
CertificateURL string `json:"certificateUrl,omitempty"`
CertificateStore string `json:"certificateStore,omitempty"`
}
KeyVaultCertificate specifies a certificate to install On Linux, the certificate file is placed under the /var/lib/waagent directory with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for the private key. Both of these files are .pem formatted. On windows the certificate will be saved in the specified store.
type KeyVaultID ¶
type KeyVaultID struct {
ID string `json:"id,omitempty"`
}
KeyVaultID specifies a key vault
type KeyVaultSecrets ¶
type KeyVaultSecrets struct {
SourceVault *KeyVaultID `json:"sourceVault,omitempty"`
VaultCertificates []KeyVaultCertificate `json:"vaultCertificates,omitempty"`
}
KeyVaultSecrets specifies certificates to install on the pool of machines from a given key vault the key vault specified must have been granted read permissions to CRP
type LinuxProfile ¶
type LinuxProfile struct {
AdminUsername string `json:"adminUsername"`
AdminPassword string `json:"adminPassword"`
SSH struct {
PublicKeys []PublicKey `json:"publicKeys"`
} `json:"ssh"`
Secrets []KeyVaultSecrets `json:"secrets,omitempty"`
ScriptRootURL string `json:"scriptroot,omitempty"`
CustomSearchDomain *CustomSearchDomain `json:"customSearchDomain,omitempty"`
CustomNodesDNS *CustomNodesDNS `json:"CustomNodesDNS,omitempty"`
}
LinuxProfile represents the linux parameters passed to the cluster
func (*LinuxProfile) HasCustomNodesDNS ¶
func (l *LinuxProfile) HasCustomNodesDNS() bool
HasCustomNodesDNS returns true if the customer specified a dns server
func (*LinuxProfile) HasSearchDomain ¶
func (l *LinuxProfile) HasSearchDomain() bool
HasSearchDomain returns true if the customer specified secrets to install
func (*LinuxProfile) HasSecrets ¶
func (l *LinuxProfile) HasSecrets() bool
HasSecrets returns true if the customer specified secrets to install
type MasterProfile ¶
type MasterProfile struct {
VMName string `json:"vmName"`
OSImageName string `json:"osImageName"`
OSDiskType string `json:"osDiskType"`
VMSize string `json:"vmSize"`
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"`
}
MasterProfile represents the definition of the master cluster
func (*MasterProfile) IsCustomVNET ¶
func (m *MasterProfile) IsCustomVNET() bool
IsCustomVNET returns true if the customer brought their own VNET
type OpenEnclave ¶
type OpenEnclave struct {
Location string `json:"location"`
OeSdkExcluded bool `json:"oeSdkExcluded"`
PackageBaseURL string `json:"packageBaseURL"`
Properties *Properties `json:"properties,omitempty"`
}
OpenEnclave complies with the ARM model of resource definition in a JSON template.
type Properties ¶
type Properties struct {
MasterProfile *MasterProfile `json:"masterProfile,omitempty"`
LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"`
WindowsProfile *WindowsProfile `json:"windowsProfile,omitempty"`
DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
}
Properties represents the ACS cluster definition
func (*Properties) IsWindows ¶
func (p *Properties) IsWindows() bool
IsWindows returns true for Windows VM
func (*Properties) Validate ¶
func (a *Properties) Validate(isUpdate bool) error
Validate implements APIObject
type PublicKey ¶
type PublicKey struct {
KeyData string `json:"keyData"`
}
PublicKey represents an SSH key for LinuxProfile
type WindowsProfile ¶
type WindowsProfile struct {
AdminUsername string `json:"adminUsername"`
AdminPassword string `json:"adminPassword"`
SSHPubKey string `json:"sshPublicKey"`
ImageVersion string `json:"imageVersion"`
WindowsImageSourceURL string `json:"windowsImageSourceURL"`
WindowsPublisher string `json:"windowsPublisher"`
WindowsOffer string `json:"windowsOffer"`
WindowsSku string `json:"windowsSku"`
Secrets []KeyVaultSecrets `json:"secrets,omitempty"`
}
WindowsProfile represents the windows parameters passed to the cluster
func (*WindowsProfile) HasCustomImage ¶
func (w *WindowsProfile) HasCustomImage() bool
HasCustomImage returns true if there is a custom windows os image url specified
func (*WindowsProfile) HasSecrets ¶
func (w *WindowsProfile) HasSecrets() bool
HasSecrets returns true if the customer specified secrets to install
func (*WindowsProfile) Validate ¶
func (w *WindowsProfile) Validate(orchestratorType string) error
Validate ensures that the WindowsProfile is valid