api

package
v2.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package api defines the external API for the plugin.

Index

Constants

View Source
const (
	// APIVersion is the version of this API
	APIVersion = "internal"
)

Variables

This section is empty.

Functions

func ConvertToV20180930preview

ConvertToV20180930preview converts from an OpenShiftManagedCluster to a v20180930preview.OpenShiftManagedCluster.

Types

type AADIdentityProvider

type AADIdentityProvider struct {
	Kind     string `json:"kind,omitempty"`
	ClientID string `json:"clientId,omitempty"`
	Secret   string `json:"secret,omitempty"`
	TenantID string `json:"tenantId,omitempty"`
	// CustomerAdminGroupID group memberships will get synced into the OpenShift group "osa-customer-admins"
	CustomerAdminGroupID *string `json:"customerAdminGroupId,omitempty"`
}

AADIdentityProvider defines Identity provider for MS AAD. It is based on OpenID IdentityProvider.

type AgentPoolProfile

type AgentPoolProfile struct {
	Name       string `json:"name,omitempty"`
	Count      int64  `json:"count,omitempty"`
	VMSize     VMSize `json:"vmSize,omitempty"`
	SubnetCIDR string `json:"subnetCidr,omitempty"`
	OSType     OSType `json:"osType,omitempty"`

	Role AgentPoolProfileRole `json:"role,omitempty"`
}

AgentPoolProfile represents configuration of OpenShift cluster VMs.

type AgentPoolProfileRole

type AgentPoolProfileRole string

AgentPoolProfileRole represents the role of the AgentPoolProfile.

const (
	// AgentPoolProfileRoleCompute is the compute role.
	AgentPoolProfileRoleCompute AgentPoolProfileRole = "compute"
	// AgentPoolProfileRoleInfra is the infra role.
	AgentPoolProfileRoleInfra AgentPoolProfileRole = "infra"
	// AgentPoolProfileRoleMaster is the master role.
	AgentPoolProfileRoleMaster AgentPoolProfileRole = "master"
)

type AuthProfile

type AuthProfile struct {
	IdentityProviders []IdentityProvider `json:"identityProviders,omitempty"`
}

AuthProfile defines all possible authentication profiles for the OpenShift cluster.

type AzProfile

type AzProfile struct {
	TenantID       string `json:"tenantId,omitempty"`
	SubscriptionID string `json:"subscriptionId,omitempty"`
	ResourceGroup  string `json:"resourceGroup,omitempty"`
}

AzProfile holds the azure context for where the cluster resides

type CertKeyPair

type CertKeyPair struct {
	Key  *rsa.PrivateKey   `json:"key,omitempty"`
	Cert *x509.Certificate `json:"cert,omitempty"`
}

CertKeyPair is an rsa private key and x509 certificate pair.

func (CertKeyPair) MarshalJSON

func (c CertKeyPair) MarshalJSON() ([]byte, error)

func (*CertKeyPair) UnmarshalJSON

func (c *CertKeyPair) UnmarshalJSON(b []byte) error

type CertificateConfig

type CertificateConfig struct {
	// CAs
	EtcdCa           CertKeyPair `json:"etcdCa,omitempty"`
	Ca               CertKeyPair `json:"ca,omitempty"`
	FrontProxyCa     CertKeyPair `json:"frontProxyCa,omitempty"`
	ServiceSigningCa CertKeyPair `json:"serviceSigningCa,omitempty"`
	ServiceCatalogCa CertKeyPair `json:"serviceCatalogCa,omitempty"`

	// etcd certificates
	EtcdServer CertKeyPair `json:"etcdServer,omitempty"`
	EtcdPeer   CertKeyPair `json:"etcdPeer,omitempty"`
	EtcdClient CertKeyPair `json:"etcdClient,omitempty"`

	// control plane certificates
	MasterServer         CertKeyPair `json:"masterServer,omitempty"`
	OpenShiftConsole     CertKeyPair `json:"openShiftConsole,omitempty"`
	Admin                CertKeyPair `json:"admin,omitempty"`
	AggregatorFrontProxy CertKeyPair `json:"aggregatorFrontProxy,omitempty"`
	MasterKubeletClient  CertKeyPair `json:"masterKubeletClient,omitempty"`
	MasterProxyClient    CertKeyPair `json:"masterProxyClient,omitempty"`
	OpenShiftMaster      CertKeyPair `json:"openShiftMaster,omitempty"`
	NodeBootstrap        CertKeyPair `json:"nodeBootstrap,omitempty"`

	// infra certificates
	Registry                CertKeyPair `json:"registry,omitempty"`
	Router                  CertKeyPair `json:"router,omitempty"`
	ServiceCatalogServer    CertKeyPair `json:"serviceCatalogServer,omitempty"`
	ServiceCatalogAPIClient CertKeyPair `json:"serviceCatalogAPIClient,omitempty"`

	// misc certificates
	AzureClusterReader CertKeyPair `json:"azureClusterReader,omitempty"`

	// geneva integration certificates
	GenevaLogging CertKeyPair `json:"genevaLogging,omitempty"`
	GenevaMetrics CertKeyPair `json:"genevaMetrics,omitempty"`
}

CertificateConfig contains all certificate configuration for the cluster.

type Config

type Config struct {
	// ClusterVersion defines release version of the plugin used to build the cluster
	ClusterVersion string `json:"clusterVersion,omitempty"`
	// configuration of VMs in ARM template
	ImageOffer     string `json:"imageOffer,omitempty"`
	ImagePublisher string `json:"imagePublisher,omitempty"`
	ImageSKU       string `json:"imageSku,omitempty"`
	ImageVersion   string `json:"imageVersion,omitempty"`

	SSHKey *rsa.PrivateKey `json:"sshKey,omitempty"`

	// configuration of other ARM resources
	ConfigStorageAccount   string `json:"configStorageAccount,omitempty"`
	RegistryStorageAccount string `json:"registryStorageAccount,omitempty"`

	Certificates CertificateConfig `json:"certificates,omitempty"`
	Images       ImageConfig       `json:"images,omitempty"`

	// kubeconfigs
	AdminKubeconfig              *v1.Config `json:"adminKubeconfig,omitempty"`
	MasterKubeconfig             *v1.Config `json:"masterKubeconfig,omitempty"`
	NodeBootstrapKubeconfig      *v1.Config `json:"nodeBootstrapKubeconfig,omitempty"`
	AzureClusterReaderKubeconfig *v1.Config `json:"azureClusterReaderKubeconfig,omitempty"`

	// misc control plane configurables
	ServiceAccountKey *rsa.PrivateKey `json:"serviceAccountKey,omitempty"`
	SessionSecretAuth []byte          `json:"sessionSecretAuth,omitempty"`
	SessionSecretEnc  []byte          `json:"sessionSecretEnc,omitempty"`

	RunningUnderTest bool `json:"runningUnderTest,omitempty"`

	// misc infra configurables
	RegistryHTTPSecret             []byte    `json:"registryHttpSecret,omitempty"`
	PrometheusProxySessionSecret   []byte    `json:"prometheusProxySessionSecret,omitempty"`
	AlertManagerProxySessionSecret []byte    `json:"alertManagerProxySessionSecret,omitempty"`
	AlertsProxySessionSecret       []byte    `json:"alertsProxySessionSecret,omitempty"`
	RegistryConsoleOAuthSecret     string    `json:"registryConsoleOAuthSecret,omitempty"`
	ConsoleOAuthSecret             string    `json:"consoleOAuthSecret,omitempty"`
	RouterStatsPassword            string    `json:"routerStatsPassword,omitempty"`
	ServiceCatalogClusterID        uuid.UUID `json:"serviceCatalogClusterId,omitempty"`

	// Geneva Metrics System (MDM) sector used for logging
	GenevaLoggingSector string `json:"genevaLoggingSector,omitempty"`
	// Geneva Metrics System (MDM) logging account
	GenevaLoggingAccount string `json:"genevaLoggingAccount,omitempty"`
	// Geneva Metrics System (MDM) logging namespace
	GenevaLoggingNamespace string `json:"genevaLoggingNamespace,omitempty"`
	// Geneva Metrics System (MDM) logging control plane parameters
	GenevaLoggingControlPlaneAccount     string `json:"genevaLoggingControlPlaneAccount,omitempty"`
	GenevaLoggingControlPlaneEnvironment string `json:"genevaLoggingControlPlaneEnvironment,omitempty"`
	GenevaLoggingControlPlaneRegion      string `json:"genevaLoggingControlPlaneRegion,omitempty"`
	// Geneva Metrics System (MDM) account name for metrics
	GenevaMetricsAccount string `json:"genevaMetricsAccount,omitempty"`
	// Geneva Metrics System (MDM) endpoint for metrics
	GenevaMetricsEndpoint string `json:"genevaMetricsEndpoint,omitempty"`
}

func ConvertFromPlugin

func ConvertFromPlugin(in *plugin.Config, old *Config) *Config

ConvertFromPlugin converts external plugin API config type into internal API Config type

func (*Config) DeepCopy

func (in *Config) DeepCopy() (out *Config)

func (Config) MarshalJSON

func (c Config) MarshalJSON() ([]byte, error)

func (*Config) UnmarshalJSON

func (c *Config) UnmarshalJSON(b []byte) error

type ContextKey

type ContextKey string

ContextKey is a type for context property bag payload keys

const (
	ContextKeyClientAuthorizer ContextKey = "ClientAuthorizer"
	ContextAcceptLanguages     ContextKey = "AcceptLanguages"
)

type DeployFn

type DeployFn func(context.Context, map[string]interface{}) error

DeployFn makes it possible to plug in different logic to the deploy. The implementor must initiate a deployment of the given template using mode resources.Incremental and wait for it to complete.

type GenevaActions

type GenevaActions interface {
	// RecoverEtcdCluster recovers the cluster's etcd using the backup specified in the pluginConfig
	RecoverEtcdCluster(ctx context.Context, cs *OpenShiftManagedCluster, deployer DeployFn, backupBlob string) *PluginError

	// RotateClusterSecrets rotates the secrets in a cluster's config blob and then updates the cluster
	RotateClusterSecrets(ctx context.Context, cs *OpenShiftManagedCluster, deployer DeployFn, template *plugin.Config) *PluginError

	// GetControlPlanePods fetches a consolidated list of the control plane pods in the cluster
	GetControlPlanePods(ctx context.Context, oc *OpenShiftManagedCluster) ([]byte, error)
}

GenevaActions is the interface for all geneva actions

type IdentityProvider

type IdentityProvider struct {
	Name     string      `json:"name,omitempty"`
	Provider interface{} `json:"provider,omitempty"`
}

IdentityProvider is heavily cut down equivalent to IdentityProvider in the upstream.

func (*IdentityProvider) UnmarshalJSON

func (ip *IdentityProvider) UnmarshalJSON(b []byte) error

type ImageConfig

type ImageConfig struct {
	// Format of the pull spec that is going to be
	// used in the cluster.
	Format string `json:"format,omitempty"`

	ClusterMonitoringOperator    string `json:"clusterMonitoringOperator,omitempty"`
	AzureControllers             string `json:"azureControllers,omitempty"`
	PrometheusOperatorBase       string `json:"prometheusOperatorBase,omitempty"`
	PrometheusBase               string `json:"prometheusBase,omitempty"`
	PrometheusConfigReloaderBase string `json:"prometheusConfigReloaderBase,omitempty"`
	ConfigReloaderBase           string `json:"configReloaderBase,omitempty"`
	AlertManagerBase             string `json:"alertManagerBase,omitempty"`
	NodeExporterBase             string `json:"nodeExporterBase,omitempty"`
	GrafanaBase                  string `json:"grafanaBase,omitempty"`
	KubeStateMetricsBase         string `json:"kubeStateMetricsBase,omitempty"`
	KubeRbacProxyBase            string `json:"kubeRbacProxyBase,omitempty"`
	OAuthProxyBase               string `json:"oAuthProxyBase,omitempty"`

	MasterEtcd            string `json:"masterEtcd,omitempty"`
	ControlPlane          string `json:"controlPlane,omitempty"`
	Node                  string `json:"node,omitempty"`
	ServiceCatalog        string `json:"serviceCatalog,omitempty"`
	Sync                  string `json:"sync,omitempty"`
	TemplateServiceBroker string `json:"templateServiceBroker,omitempty"`
	Registry              string `json:"registry,omitempty"`
	Router                string `json:"router,omitempty"`
	RegistryConsole       string `json:"registryConsole,omitempty"`
	AnsibleServiceBroker  string `json:"ansibleServiceBroker,omitempty"`
	WebConsole            string `json:"webConsole,omitempty"`
	Console               string `json:"console,omitempty"`
	EtcdBackup            string `json:"etcdBackup,omitempty"`

	// GenevaImagePullSecret defines secret used to pull private Azure images
	GenevaImagePullSecret []byte `json:"genevaImagePullSecret,omitempty"`
	// Geneva integration images
	GenevaLogging string `json:"genevaLogging,omitempty"`
	GenevaTDAgent string `json:"genevaTDAgent,omitempty"`
	GenevaStatsd  string `json:"genevaStatsd,omitempty"`
	MetricsBridge string `json:"metricsBridge,omitempty"`

	// ImagePullSecret defines the secret used to pull from the private registries, used system-wide
	ImagePullSecret []byte `json:"imagePullSecret,omitempty"`
}

ImageConfig contains all images for the pods

type NetworkProfile

type NetworkProfile struct {
	// VnetCIDR (in): the CIDR with which the OSA cluster's Vnet is configured
	VnetCIDR string `json:"vnetCidr,omitempty"`

	// VnetID (out): the ID of the Vnet created for the OSA cluster
	VnetID string `json:"vnetId,omitempty"`

	// PeerVnetID (in, optional): ID of a Vnet with which the OSA cluster Vnet should be peered.
	// If specified, this should match
	// `^/subscriptions/[^/]+
	//   /resourceGroups/[^/]+
	//   /providers/Microsoft.Network
	//   /virtualNetworks/[^/]+$`
	PeerVnetID *string `json:"peerVnetId,omitempty"`
}

NetworkProfile contains configuration for OpenShift networking.

type OSType

type OSType string

OSType represents the OS type of VMs in an AgentPool.

const (
	// OSTypeLinux is Linux.
	OSTypeLinux OSType = "Linux"
	// OSTypeWindows is Windows.
	OSTypeWindows OSType = "Windows"
)

type OpenShiftManagedCluster

type OpenShiftManagedCluster struct {
	Plan       *ResourcePurchasePlan `json:"plan,omitempty"`
	Properties Properties            `json:"properties,omitempty"`
	ID         string                `json:"id,omitempty"`
	Name       string                `json:"name,omitempty"`
	Type       string                `json:"type,omitempty"`
	Location   string                `json:"location,omitempty"`
	Tags       map[string]string     `json:"tags"`

	Config Config `json:"config,omitempty"`
}

OpenShiftManagedCluster complies with the ARM model of resource definition in a JSON template.

func ConvertFromV20180930preview

ConvertFromV20180930preview converts from a v20180930preview.OpenShiftManagedCluster to an OpenShiftManagedCluster. If old is non-nil, it is going to be used as the base for the internal output where the external request is merged on top of.

func (*OpenShiftManagedCluster) DeepCopy

func (in *OpenShiftManagedCluster) DeepCopy() (out *OpenShiftManagedCluster)

type Plugin

type Plugin interface {
	// Validate exists (a) to be able to place validation logic in a
	// single place in the event of multiple external API versions, and (b) to
	// be able to compare a new API manifest against a pre-existing API manifest
	// (for update, upgrade, etc.)
	// externalOnly indicates that fields set by the RP (FQDN and routerProfile.FQDN)
	// should be excluded.
	Validate(ctx context.Context, new, old *OpenShiftManagedCluster, externalOnly bool) []error

	// ValidateAdmin is used for validating admin API requests.
	ValidateAdmin(ctx context.Context, new, old *OpenShiftManagedCluster) []error

	// ValidatePluginTemplate validates external config request
	ValidatePluginTemplate(ctx context.Context, template *plugin.Config) []error

	// GenerateConfig ensures all the necessary in-cluster config is generated
	// for an Openshift cluster.
	GenerateConfig(ctx context.Context, cs *OpenShiftManagedCluster, template *plugin.Config) error

	// CreateOrUpdate either deploys or runs the update depending on the isUpdate argument
	// this will call the deployer.
	CreateOrUpdate(ctx context.Context, cs *OpenShiftManagedCluster, isUpdate bool, deployer DeployFn) *PluginError

	GenevaActions
}

Plugin is the main interface to openshift-azure

type PluginConfig

type PluginConfig struct {
	TestConfig TestConfig
}

PluginConfig is passed into NewPlugin

type PluginError

type PluginError struct {
	Err  error
	Step PluginStep
}

PluginError error returned by CreateOrUpdate to specify the step that failed.

func (*PluginError) Error

func (pe *PluginError) Error() string

type PluginStep

type PluginStep string
const (
	PluginStepDeploy                              PluginStep = "Deploy"
	PluginStepInitialize                          PluginStep = "Initialize"
	PluginStepInitializeUpdateBlob                PluginStep = "InitializeUpdateBlob"
	PluginStepClientCreation                      PluginStep = "ClientCreation"
	PluginStepScaleSetDelete                      PluginStep = "ScaleSetDelete"
	PluginStepGenerateARM                         PluginStep = "GenerateARM"
	PluginStepWaitForWaitForOpenShiftAPI          PluginStep = "WaitForOpenShiftAPI"
	PluginStepWaitForNodes                        PluginStep = "WaitForNodes"
	PluginStepWaitForConsoleHealth                PluginStep = "WaitForConsoleHealth"
	PluginStepWaitForInfraDaemonSets              PluginStep = "WaitForInfraDaemonSets"
	PluginStepWaitForInfraStatefulSets            PluginStep = "WaitForInfraStatefulSets"
	PluginStepWaitForInfraDeployments             PluginStep = "WaitForInfraDeployments"
	PluginStepUpdateMasterAgentPoolHashScaleSet   PluginStep = "UpdateMasterAgentPoolHashScaleSet"
	PluginStepUpdateMasterAgentPoolListVMs        PluginStep = "UpdateMasterAgentPoolListVMs"
	PluginStepUpdateMasterAgentPoolReadBlob       PluginStep = "UpdateMasterAgentPoolReadBlob"
	PluginStepUpdateMasterAgentPoolDrain          PluginStep = "UpdateMasterAgentPoolDrain"
	PluginStepUpdateMasterAgentPoolDeallocate     PluginStep = "UpdateMasterAgentPoolDeallocate"
	PluginStepUpdateMasterAgentPoolUpdateVMs      PluginStep = "UpdateMasterAgentPoolUpdateVMs"
	PluginStepUpdateMasterAgentPoolReimage        PluginStep = "UpdateMasterAgentPoolReimage"
	PluginStepUpdateMasterAgentPoolStart          PluginStep = "UpdateMasterAgentPoolStart"
	PluginStepUpdateMasterAgentPoolWaitForReady   PluginStep = "UpdateMasterAgentPoolWaitForReady"
	PluginStepUpdateMasterAgentPoolUpdateBlob     PluginStep = "UpdateMasterAgentPoolUpdateBlob"
	PluginStepUpdateWorkerAgentPoolHashScaleSet   PluginStep = "UpdateWorkerAgentPoolHashScaleSet"
	PluginStepUpdateWorkerAgentPoolListVMs        PluginStep = "UpdateWorkerAgentPoolListVMs"
	PluginStepUpdateWorkerAgentPoolListScaleSets  PluginStep = "UpdateWorkerAgentPoolListScaleSets"
	PluginStepUpdateWorkerAgentPoolReadBlob       PluginStep = "UpdateWorkerAgentPoolReadBlob"
	PluginStepUpdateWorkerAgentPoolDrain          PluginStep = "UpdateWorkerAgentPoolDrain"
	PluginStepUpdateWorkerAgentPoolCreateScaleSet PluginStep = "UpdateWorkerAgentPoolCreateScaleSet"
	PluginStepUpdateWorkerAgentPoolUpdateScaleSet PluginStep = "UpdateWorkerAgentPoolUpdateScaleSet"
	PluginStepUpdateWorkerAgentPoolDeleteScaleSet PluginStep = "UpdateWorkerAgentPoolDeleteScaleSet"
	PluginStepUpdateWorkerAgentPoolWaitForReady   PluginStep = "UpdateWorkerAgentPoolWaitForReady"
	PluginStepUpdateWorkerAgentPoolUpdateBlob     PluginStep = "UpdateWorkerAgentPoolUpdateBlob"
	PluginStepUpdateWorkerAgentPoolDeleteVM       PluginStep = "UpdateWorkerAgentPoolDeleteVM"
	PluginStepInvalidateClusterSecrets            PluginStep = "InvalidateClusterSecrets"
	PluginStepRegenerateClusterSecrets            PluginStep = "RegenerateClusterSecrets"
)

type Properties

type Properties struct {
	// ProvisioningState (out): current state of the OSA resource.
	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`

	// OpenShiftVersion (in): OpenShift version to be created/updated, e.g.
	// `v3.11`.
	OpenShiftVersion string `json:"openShiftVersion,omitempty"`

	// PublicHostname (in,optional): Optional user-specified FQDN for OpenShift
	// API server.  If specified, after OSA cluster creation, user must create a
	// PublicHostname CNAME record forwarding to the returned FQDN value.
	PublicHostname string `json:"publicHostname,omitempty"`

	// FQDN (in): FQDN for OpenShift API server.  User-specified FQDN for
	// OpenShift API server loadbalancer internal hostname.
	FQDN string `json:"fqdn,omitempty"`

	// NetworkProfile (in): Configuration for OpenShift networking.
	NetworkProfile NetworkProfile `json:"networkProfile,omitempty"`

	// RouterProfiles (in,optional/out): Configuration for OpenShift router(s).
	RouterProfiles []RouterProfile `json:"routerProfiles,omitempty"`

	// AgentPoolProfiles (in): configuration of OpenShift cluster VMs.
	AgentPoolProfiles []AgentPoolProfile `json:"agentPoolProfiles,omitempty"`

	// AuthProfile (in): configures OpenShift authentication
	AuthProfile AuthProfile `json:"authProfile,omitempty"`

	ServicePrincipalProfile ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`

	AzProfile AzProfile `json:"azProfile,omitempty"`
}

Properties represents the cluster definition.

type ProvisioningState

type ProvisioningState string

ProvisioningState represents the current state of the OSA resource.

const (
	// Creating means the OSA resource is being created.
	Creating ProvisioningState = "Creating"
	// Updating means the existing OSA resource is being updated.
	Updating ProvisioningState = "Updating"
	// AdminUpdating means the existing OSA resource is being updated with admin privileges.
	AdminUpdating ProvisioningState = "AdminUpdating"
	// Failed means the OSA resource is in failed state.
	Failed ProvisioningState = "Failed"
	// Succeeded means the last create/update succeeded.
	Succeeded ProvisioningState = "Succeeded"
	// Deleting means the OSA resource is being deleted.
	Deleting ProvisioningState = "Deleting"
	// Migrating means the OSA resource is being migrated from one subscription
	// or resource group to another.
	Migrating ProvisioningState = "Migrating"
	// Upgrading means the existing OSA resource is being upgraded.
	Upgrading ProvisioningState = "Upgrading"
)

type ResourcePurchasePlan

type ResourcePurchasePlan struct {
	Name          *string `json:"name,omitempty"`
	Product       *string `json:"product,omitempty"`
	PromotionCode *string `json:"promotionCode,omitempty"`
	Publisher     *string `json:"publisher,omitempty"`
}

ResourcePurchasePlan defines the resource plan as required by ARM for billing purposes.

type RouterProfile

type RouterProfile struct {
	Name string `json:"name,omitempty"`

	// PublicSubdomain (in,optional/out): DNS subdomain for OpenShift router. If
	// specified, after OSA cluster creation, user must create a (wildcard)
	// *.PublicSubdomain CNAME record forwarding to the returned FQDN value.  If
	// not specified, OSA will auto-allocate and setup a PublicSubdomain and
	// return it.  The OpenShift master is configured with the PublicSubdomain
	// of the "default" RouterProfile.
	PublicSubdomain string `json:"publicSubdomain,omitempty"`

	// FQDN (out): Auto-allocated FQDN for the OpenShift router.
	FQDN string `json:"fqdn,omitempty"`
}

RouterProfile represents an OpenShift router.

type ServicePrincipalProfile

type ServicePrincipalProfile struct {
	ClientID string `json:"clientId,omitempty"`
	Secret   string `json:"secret,omitempty"`
}

ServicePrincipalProfile contains the client and secret used by the cluster for Azure Resource CRUD.

type TestConfig

type TestConfig struct {
	RunningUnderTest   bool
	ImageResourceGroup string
	ImageResourceName  string
}

TestConfig holds all testing variables. It should be empty in production.

type VMSize

type VMSize string

VMSize represents supported VMSizes

const (
	// General purpose VMs
	StandardD2sV3  VMSize = "Standard_D2s_v3"
	StandardD4sV3  VMSize = "Standard_D4s_v3"
	StandardD8sV3  VMSize = "Standard_D8s_v3"
	StandardD16sV3 VMSize = "Standard_D16s_v3"
	StandardD32sV3 VMSize = "Standard_D32s_v3"
	StandardD64sV3 VMSize = "Standard_D64s_v3"

	StandardDS4V2 VMSize = "Standard_DS4_v2"
	StandardDS5V2 VMSize = "Standard_DS5_v2"

	// Compute optimized VMs
	StandardF8sV2  VMSize = "Standard_F8s_v2"
	StandardF16sV2 VMSize = "Standard_F16s_v2"
	StandardF32sV2 VMSize = "Standard_F32s_v2"
	StandardF64sV2 VMSize = "Standard_F64s_v2"
	StandardF72sV2 VMSize = "Standard_F72s_v2"

	StandardF8s  VMSize = "Standard_F8s"
	StandardF16s VMSize = "Standard_F16s"

	// Memory optimized VMs
	StandardE4sV3  VMSize = "Standard_E4s_v3"
	StandardE8sV3  VMSize = "Standard_E8s_v3"
	StandardE16sV3 VMSize = "Standard_E16s_v3"
	StandardE20sV3 VMSize = "Standard_E20s_v3"
	StandardE32sV3 VMSize = "Standard_E32s_v3"
	StandardE64sV3 VMSize = "Standard_E64s_v3"

	StandardGS2 VMSize = "Standard_GS2"
	StandardGS3 VMSize = "Standard_GS3"
	StandardGS4 VMSize = "Standard_GS4"
	StandardGS5 VMSize = "Standard_GS5"

	StandardDS12V2 VMSize = "Standard_DS12_v2"
	StandardDS13V2 VMSize = "Standard_DS13_v2"
	StandardDS14V2 VMSize = "Standard_DS14_v2"
	StandardDS15V2 VMSize = "Standard_DS15_v2"

	// Storage optimized VMs
	StandardL4s  VMSize = "Standard_L4s"
	StandardL8s  VMSize = "Standard_L8s"
	StandardL16s VMSize = "Standard_L16s"
	StandardL32s VMSize = "Standard_L32s"
)

VMSizes. Keep in sync with MaxDataDisksPerVM()

Directories

Path Synopsis
2018-09-30-preview
api
admin
api
plugin
api

Jump to

Keyboard shortcuts

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