datamodel

package
v0.20200806.4-teleport Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: MIT Imports: 20 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AADProfile

type AADProfile struct {
	// The client AAD application ID.
	ClientAppID string `json:"clientAppID,omitempty"`
	// The server AAD application ID.
	ServerAppID string `json:"serverAppID,omitempty"`
	// The server AAD application secret
	ServerAppSecret string `json:"serverAppSecret,omitempty" conform:"redact"`
	// The AAD tenant ID to use for authentication.
	// If not specified, will use the tenant of the deployment subscription.
	// Optional
	TenantID string `json:"tenantID,omitempty"`
	// The Azure Active Directory Group Object ID that will be assigned the
	// cluster-admin RBAC role.
	// Optional
	AdminGroupID string `json:"adminGroupID,omitempty"`
	// The authenticator to use, either "oidc" or "webhook".
	Authenticator api.AuthenticatorType `json:"authenticator"`
}

AADProfile specifies attributes for AAD integration

type AddonProfile

type AddonProfile struct {
	Enabled bool              `json:"enabled"`
	Config  map[string]string `json:"config"`
	// Identity contains information of the identity associated with this addon.
	// This property will only appear in an MSI-enabled cluster.
	Identity *api.UserAssignedIdentity `json:"identity,omitempty"`
}

AddonProfile represents an addon for managed cluster

type AgentPoolProfile

type AgentPoolProfile struct {
	Name                                string                   `json:"name"`
	Count                               int                      `json:"count"`
	VMSize                              string                   `json:"vmSize"`
	OSDiskSizeGB                        int                      `json:"osDiskSizeGB,omitempty"`
	DNSPrefix                           string                   `json:"dnsPrefix,omitempty"`
	OSType                              api.OSType               `json:"osType,omitempty"`
	Ports                               []int                    `json:"ports,omitempty"`
	ProvisioningState                   ProvisioningState        `json:"provisioningState,omitempty"`
	AvailabilityProfile                 string                   `json:"availabilityProfile"`
	ScaleSetPriority                    string                   `json:"scaleSetPriority,omitempty"`
	ScaleSetEvictionPolicy              string                   `json:"scaleSetEvictionPolicy,omitempty"`
	SpotMaxPrice                        *float64                 `json:"spotMaxPrice,omitempty"`
	StorageProfile                      string                   `json:"storageProfile,omitempty"`
	DiskSizesGB                         []int                    `json:"diskSizesGB,omitempty"`
	VnetSubnetID                        string                   `json:"vnetSubnetID,omitempty"`
	Subnet                              string                   `json:"subnet"`
	IPAddressCount                      int                      `json:"ipAddressCount,omitempty"`
	Distro                              api.Distro               `json:"distro,omitempty"`
	Role                                api.AgentPoolProfileRole `json:"role,omitempty"`
	AcceleratedNetworkingEnabled        *bool                    `json:"acceleratedNetworkingEnabled,omitempty"`
	AcceleratedNetworkingEnabledWindows *bool                    `json:"acceleratedNetworkingEnabledWindows,omitempty"`
	VMSSOverProvisioningEnabled         *bool                    `json:"vmssOverProvisioningEnabled,omitempty"`
	FQDN                                string                   `json:"fqdn,omitempty"`
	CustomNodeLabels                    map[string]string        `json:"customNodeLabels,omitempty"`
	PreprovisionExtension               *api.Extension           `json:"preProvisionExtension"`
	Extensions                          []api.Extension          `json:"extensions"`
	KubernetesConfig                    *api.KubernetesConfig    `json:"kubernetesConfig,omitempty"`
	OrchestratorVersion                 string                   `json:"orchestratorVersion"`
	ImageRef                            *api.ImageReference      `json:"imageReference,omitempty"`
	MaxCount                            *int                     `json:"maxCount,omitempty"`
	MinCount                            *int                     `json:"minCount,omitempty"`
	EnableAutoScaling                   *bool                    `json:"enableAutoScaling,omitempty"`
	AvailabilityZones                   []string                 `json:"availabilityZones,omitempty"`
	PlatformFaultDomainCount            *int                     `json:"platformFaultDomainCount"`
	PlatformUpdateDomainCount           *int                     `json:"platformUpdateDomainCount"`
	SinglePlacementGroup                *bool                    `json:"singlePlacementGroup,omitempty"`
	VnetCidrs                           []string                 `json:"vnetCidrs,omitempty"`
	PreserveNodesProperties             *bool                    `json:"preserveNodesProperties,omitempty"`
	WindowsNameVersion                  string                   `json:"windowsNameVersion,omitempty"`
	EnableVMSSNodePublicIP              *bool                    `json:"enableVMSSNodePublicIP,omitempty"`
	LoadBalancerBackendAddressPoolIDs   []string                 `json:"loadBalancerBackendAddressPoolIDs,omitempty"`
	AuditDEnabled                       *bool                    `json:"auditDEnabled,omitempty"`
	CustomVMTags                        map[string]string        `json:"customVMTags,omitempty"`
	DiskEncryptionSetID                 string                   `json:"diskEncryptionSetID,omitempty"`
	UltraSSDEnabled                     *bool                    `json:"ultraSSDEnabled,omitempty"`
	EncryptionAtHost                    *bool                    `json:"encryptionAtHost,omitempty"`
	ProximityPlacementGroupID           string                   `json:"proximityPlacementGroupID,omitempty"`
	EnableTeleport                      *bool                    `json:"enableTeleport,omitempty"`
}

AgentPoolProfile represents an agent pool definition

func (*AgentPoolProfile) GetKubernetesLabels

func (a *AgentPoolProfile) GetKubernetesLabels(rg string, deprecated bool) string

GetKubernetesLabels returns a k8s API-compliant labels string for nodes in this profile

func (*AgentPoolProfile) HasAvailabilityZones added in v0.20200813.1

func (a *AgentPoolProfile) HasAvailabilityZones() bool

HasAvailabilityZones returns true if the agent pool has availability zones

func (*AgentPoolProfile) HasDisks added in v0.20200813.1

func (a *AgentPoolProfile) HasDisks() bool

HasDisks returns true if the customer specified disks

func (*AgentPoolProfile) IsAuditDEnabled added in v0.20200813.1

func (a *AgentPoolProfile) IsAuditDEnabled() bool

IsAuditDEnabled returns true if the master profile is configured for auditd

func (*AgentPoolProfile) IsAvailabilitySets

func (a *AgentPoolProfile) IsAvailabilitySets() bool

IsAvailabilitySets returns true if the customer specified disks

func (*AgentPoolProfile) IsCoreOS added in v0.20200813.1

func (a *AgentPoolProfile) IsCoreOS() bool

IsCoreOS returns true if the agent specified a CoreOS distro

func (*AgentPoolProfile) IsCustomVNET

func (a *AgentPoolProfile) IsCustomVNET() bool

IsCustomVNET returns true if the customer brought their own VNET

func (*AgentPoolProfile) IsLinux added in v0.20200813.1

func (a *AgentPoolProfile) IsLinux() bool

IsLinux returns true if the agent pool is linux

func (*AgentPoolProfile) IsSpotScaleSet added in v0.20200813.1

func (a *AgentPoolProfile) IsSpotScaleSet() bool

IsSpotScaleSet returns true if the VMSS is Spot Scale Set

func (*AgentPoolProfile) IsUbuntu1804 added in v0.20200813.1

func (a *AgentPoolProfile) IsUbuntu1804() bool

IsUbuntu1804 returns true if the agent pool profile distro is based on Ubuntu 16.04

func (*AgentPoolProfile) IsVHDDistro

func (a *AgentPoolProfile) IsVHDDistro() bool

IsVHDDistro returns true if the distro uses VHD SKUs

func (*AgentPoolProfile) IsVirtualMachineScaleSets

func (a *AgentPoolProfile) IsVirtualMachineScaleSets() bool

IsVirtualMachineScaleSets returns true if the agent pool availability profile is VMSS

func (*AgentPoolProfile) IsWindows

func (a *AgentPoolProfile) IsWindows() bool

IsWindows returns true if the agent pool is windows

type CertificateProfile

type CertificateProfile struct {
	// CaCertificate is the certificate authority certificate.
	CaCertificate string `json:"caCertificate,omitempty" conform:"redact"`
	// CaPrivateKey is the certificate authority key.
	CaPrivateKey string `json:"caPrivateKey,omitempty" conform:"redact"`
	// ApiServerCertificate is the rest api server certificate, and signed by the CA
	APIServerCertificate string `json:"apiServerCertificate,omitempty" conform:"redact"`
	// ApiServerPrivateKey is the rest api server private key, and signed by the CA
	APIServerPrivateKey string `json:"apiServerPrivateKey,omitempty" conform:"redact"`
	// ClientCertificate is the certificate used by the client kubelet services and signed by the CA
	ClientCertificate string `json:"clientCertificate,omitempty" conform:"redact"`
	// ClientPrivateKey is the private key used by the client kubelet services and signed by the CA
	ClientPrivateKey string `json:"clientPrivateKey,omitempty" conform:"redact"`
	// KubeConfigCertificate is the client certificate used for kubectl cli and signed by the CA
	KubeConfigCertificate string `json:"kubeConfigCertificate,omitempty" conform:"redact"`
	// KubeConfigPrivateKey is the client private key used for kubectl cli and signed by the CA
	KubeConfigPrivateKey string `json:"kubeConfigPrivateKey,omitempty" conform:"redact"`
	// EtcdServerCertificate is the server certificate for etcd, and signed by the CA
	EtcdServerCertificate string `json:"etcdServerCertificate,omitempty" conform:"redact"`
	// EtcdServerPrivateKey is the server private key for etcd, and signed by the CA
	EtcdServerPrivateKey string `json:"etcdServerPrivateKey,omitempty" conform:"redact"`
	// EtcdClientCertificate is etcd client certificate, and signed by the CA
	EtcdClientCertificate string `json:"etcdClientCertificate,omitempty" conform:"redact"`
	// EtcdClientPrivateKey is the etcd client private key, and signed by the CA
	EtcdClientPrivateKey string `json:"etcdClientPrivateKey,omitempty" conform:"redact"`
	// EtcdPeerCertificates is list of etcd peer certificates, and signed by the CA
	EtcdPeerCertificates []string `json:"etcdPeerCertificates,omitempty" conform:"redact"`
	// EtcdPeerPrivateKeys is list of etcd peer private keys, and signed by the CA
	EtcdPeerPrivateKeys []string `json:"etcdPeerPrivateKeys,omitempty" conform:"redact"`
}

CertificateProfile represents the definition of the master cluster

type ContainerService

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

	Properties *Properties `json:"properties,omitempty"`
}

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

func CreateMockContainerService

func CreateMockContainerService(containerServiceName, orchestratorVersion string, masterCount, agentCount int, certs bool) *ContainerService

CreateMockContainerService returns a mock container service for testing purposes

func (*ContainerService) GetCloudSpecConfig added in v0.20200806.1

func (cs *ContainerService) GetCloudSpecConfig() api.AzureEnvironmentSpecConfig

GetCloudSpecConfig returns the Kubernetes container images URL configurations based on the deploy target environment. for example: if the target is the public azure, then the default container image url should be k8s.gcr.io/... if the target is azure china, then the default container image should be mirror.azure.cn:5000/google_container/...

func (*ContainerService) GetLocations

func (cs *ContainerService) GetLocations() []string

GetLocations returns all supported regions. If AzurePublicCloud, AzureChinaCloud,AzureGermanCloud or AzureUSGovernmentCloud, GetLocations provides all azure regions in prod.

func (*ContainerService) IsAKSCustomCloud

func (cs *ContainerService) IsAKSCustomCloud() bool

IsAKSCustomCloud checks if it's in AKS custom cloud

func (*ContainerService) SetDefaultCerts added in v0.20200806.1

func (cs *ContainerService) SetDefaultCerts(params api.DefaultCertParams) (bool, []net.IP, error)

SetDefaultCerts generates and sets defaults for the container certificateProfile, returns true if certs are generated

func (*ContainerService) SetPropertiesDefaults added in v0.20200806.1

func (cs *ContainerService) SetPropertiesDefaults(params api.PropertiesDefaultsParams) (bool, error)

SetPropertiesDefaults for the container Properties, returns true if certs are generated

type CustomCloudEnv

type CustomCloudEnv struct {
	Name                         string                  `json:"Name,omitempty"`
	McrURL                       string                  `json:"mcrURL,omitempty"`
	RepoDepotEndpoint            string                  `json:"repoDepotEndpoint,omitempty"`
	ManagementPortalURL          string                  `json:"managementPortalURL,omitempty"`
	PublishSettingsURL           string                  `json:"publishSettingsURL,omitempty"`
	ServiceManagementEndpoint    string                  `json:"serviceManagementEndpoint,omitempty"`
	ResourceManagerEndpoint      string                  `json:"resourceManagerEndpoint,omitempty"`
	ActiveDirectoryEndpoint      string                  `json:"activeDirectoryEndpoint,omitempty"`
	GalleryEndpoint              string                  `json:"galleryEndpoint,omitempty"`
	KeyVaultEndpoint             string                  `json:"keyVaultEndpoint,omitempty"`
	GraphEndpoint                string                  `json:"graphEndpoint,omitempty"`
	ServiceBusEndpoint           string                  `json:"serviceBusEndpoint,omitempty"`
	BatchManagementEndpoint      string                  `json:"batchManagementEndpoint,omitempty"`
	StorageEndpointSuffix        string                  `json:"storageEndpointSuffix,omitempty"`
	SQLDatabaseDNSSuffix         string                  `json:"sqlDatabaseDNSSuffix,omitempty"`
	TrafficManagerDNSSuffix      string                  `json:"trafficManagerDNSSuffix,omitempty"`
	KeyVaultDNSSuffix            string                  `json:"keyVaultDNSSuffix,omitempty"`
	ServiceBusEndpointSuffix     string                  `json:"serviceBusEndpointSuffix,omitempty"`
	ServiceManagementVMDNSSuffix string                  `json:"serviceManagementVMDNSSuffix,omitempty"`
	ResourceManagerVMDNSSuffix   string                  `json:"resourceManagerVMDNSSuffix,omitempty"`
	ContainerRegistryDNSSuffix   string                  `json:"containerRegistryDNSSuffix,omitempty"`
	CosmosDBDNSSuffix            string                  `json:"cosmosDBDNSSuffix,omitempty"`
	TokenAudience                string                  `json:"tokenAudience,omitempty"`
	ResourceIdentifiers          api.ResourceIdentifiers `json:"resourceIdentifiers,omitempty"`
}

CustomCloudEnv represents the custom cloud env info of the AKS cluster.

type CustomProfile

type CustomProfile struct {
	Orchestrator string `json:"orchestrator,omitempty"`
}

CustomProfile specifies custom properties that are used for cluster instantiation. Should not be used by most users.

type DiagnosticsProfile

type DiagnosticsProfile struct {
	VMDiagnostics *api.VMDiagnostics `json:"vmDiagnostics"`
}

DiagnosticsProfile setting to enable/disable capturing diagnostics for VMs hosting container cluster.

type ExtensionProfile

type ExtensionProfile struct {
	Name                           string                 `json:"name"`
	Version                        string                 `json:"version"`
	ExtensionParameters            string                 `json:"extensionParameters,omitempty"`
	ExtensionParametersKeyVaultRef *api.KeyvaultSecretRef `json:"parametersKeyvaultSecretRef,omitempty"`
	RootURL                        string                 `json:"rootURL,omitempty"`
	// This is only needed for preprovision extensions and it needs to be a bash script
	Script   string `json:"script,omitempty"`
	URLQuery string `json:"urlQuery,omitempty"`
}

ExtensionProfile represents an extension definition

type FeatureFlags

type FeatureFlags struct {
	EnableCSERunInBackground bool `json:"enableCSERunInBackground,omitempty"`
	BlockOutboundInternet    bool `json:"blockOutboundInternet,omitempty"`
	EnableIPv6DualStack      bool `json:"enableIPv6DualStack,omitempty"`
	EnableTelemetry          bool `json:"enableTelemetry,omitempty"`
	EnableIPv6Only           bool `json:"enableIPv6Only,omitempty"`
}

FeatureFlags defines feature-flag restricted functionality

func (*FeatureFlags) IsFeatureEnabled

func (f *FeatureFlags) IsFeatureEnabled(feature string) bool

IsFeatureEnabled returns true if a feature flag is on for the provided feature

type HostedMasterProfile

type HostedMasterProfile struct {
	// Master public endpoint/FQDN with port
	// The format will be FQDN:2376
	// Not used during PUT, returned as part of GETFQDN
	FQDN      string `json:"fqdn,omitempty"`
	DNSPrefix string `json:"dnsPrefix"`
	// Subnet holds the CIDR which defines the Azure Subnet in which
	// Agents will be provisioned. This is stored on the HostedMasterProfile
	// and will become `masterSubnet` in the compiled template.
	Subnet string `json:"subnet"`
	// ApiServerWhiteListRange is a comma delimited CIDR which is whitelisted to AKS
	APIServerWhiteListRange *string `json:"apiServerWhiteListRange"`
	IPMasqAgent             bool    `json:"ipMasqAgent"`
}

HostedMasterProfile defines properties for a hosted master

type JumpboxProfile

type JumpboxProfile struct {
	OSType    api.OSType `json:"osType"`
	DNSPrefix string     `json:"dnsPrefix"`

	// Jumpbox public endpoint/FQDN with port
	// The format will be FQDN:2376
	// Not used during PUT, returned as part of GET
	FQDN string `json:"fqdn,omitempty"`
}

JumpboxProfile describes properties of the jumpbox setup in the AKS container cluster.

type LinuxProfile

type LinuxProfile struct {
	AdminUsername string `json:"adminUsername"`
	SSH           struct {
		PublicKeys []api.PublicKey `json:"publicKeys"`
	} `json:"ssh"`
	Secrets               []api.KeyVaultSecrets   `json:"secrets,omitempty"`
	Distro                api.Distro              `json:"distro,omitempty"`
	ScriptRootURL         string                  `json:"scriptroot,omitempty"`
	CustomSearchDomain    *api.CustomSearchDomain `json:"customSearchDomain,omitempty"`
	CustomNodesDNS        *api.CustomNodesDNS     `json:"CustomNodesDNS,omitempty"`
	IsSSHKeyAutoGenerated *bool                   `json:"isSSHKeyAutoGenerated,omitempty"`
}

LinuxProfile represents the linux parameters passed to the cluster

func (*LinuxProfile) HasCustomNodesDNS added in v0.20200819.0

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 added in v0.20200819.0

type MasterProfile struct {
	Count                     int                   `json:"count"`
	DNSPrefix                 string                `json:"dnsPrefix"`
	SubjectAltNames           []string              `json:"subjectAltNames"`
	VMSize                    string                `json:"vmSize"`
	OSDiskSizeGB              int                   `json:"osDiskSizeGB,omitempty"`
	VnetSubnetID              string                `json:"vnetSubnetID,omitempty"`
	VnetCidr                  string                `json:"vnetCidr,omitempty"`
	AgentVnetSubnetID         string                `json:"agentVnetSubnetID,omitempty"`
	FirstConsecutiveStaticIP  string                `json:"firstConsecutiveStaticIP,omitempty"`
	Subnet                    string                `json:"subnet"`
	SubnetIPv6                string                `json:"subnetIPv6"`
	IPAddressCount            int                   `json:"ipAddressCount,omitempty"`
	StorageProfile            string                `json:"storageProfile,omitempty"`
	HTTPSourceAddressPrefix   string                `json:"HTTPSourceAddressPrefix,omitempty"`
	OAuthEnabled              bool                  `json:"oauthEnabled"`
	PreprovisionExtension     *api.Extension        `json:"preProvisionExtension"`
	Extensions                []api.Extension       `json:"extensions"`
	Distro                    api.Distro            `json:"distro,omitempty"`
	KubernetesConfig          *api.KubernetesConfig `json:"kubernetesConfig,omitempty"`
	ImageRef                  *api.ImageReference   `json:"imageReference,omitempty"`
	CustomFiles               *[]api.CustomFile     `json:"customFiles,omitempty"`
	AvailabilityProfile       string                `json:"availabilityProfile"`
	PlatformFaultDomainCount  *int                  `json:"platformFaultDomainCount"`
	PlatformUpdateDomainCount *int                  `json:"platformUpdateDomainCount"`
	AgentSubnet               string                `json:"agentSubnet,omitempty"`
	AvailabilityZones         []string              `json:"availabilityZones,omitempty"`
	SinglePlacementGroup      *bool                 `json:"singlePlacementGroup,omitempty"`
	AuditDEnabled             *bool                 `json:"auditDEnabled,omitempty"`
	UltraSSDEnabled           *bool                 `json:"ultraSSDEnabled,omitempty"`
	EncryptionAtHost          *bool                 `json:"encryptionAtHost,omitempty"`
	CustomVMTags              map[string]string     `json:"customVMTags,omitempty"`
	// Master LB public endpoint/FQDN with port
	// The format will be FQDN:2376
	// Not used during PUT, returned as part of GET
	FQDN string `json:"fqdn,omitempty"`
	// True: uses cosmos etcd endpoint instead of installing etcd on masters
	CosmosEtcd                *bool  `json:"cosmosEtcd,omitempty"`
	ProximityPlacementGroupID string `json:"proximityPlacementGroupID,omitempty"`
}

MasterProfile represents the definition of the master cluster

func (*MasterProfile) GetCosmosEndPointURI added in v0.20200819.0

func (m *MasterProfile) GetCosmosEndPointURI() string

GetCosmosEndPointURI returns the URI string for the cosmos etcd endpoint

func (*MasterProfile) GetFirstConsecutiveStaticIPAddress added in v0.20200819.0

func (m *MasterProfile) GetFirstConsecutiveStaticIPAddress(subnetStr string) string

GetFirstConsecutiveStaticIPAddress returns the first static IP address of the given subnet.

func (*MasterProfile) HasAvailabilityZones added in v0.20200819.0

func (m *MasterProfile) HasAvailabilityZones() bool

HasAvailabilityZones returns true if the master profile has availability zones

func (*MasterProfile) HasCosmosEtcd added in v0.20200819.0

func (m *MasterProfile) HasCosmosEtcd() bool

HasCosmosEtcd returns true if cosmos etcd configuration is enabled

func (*MasterProfile) HasMultipleNodes added in v0.20200819.0

func (m *MasterProfile) HasMultipleNodes() bool

HasMultipleNodes returns true if there are more than one master nodes

func (*MasterProfile) IsCustomVNET added in v0.20200819.0

func (m *MasterProfile) IsCustomVNET() bool

IsCustomVNET returns true if the customer brought their own VNET

func (*MasterProfile) IsUbuntu1804 added in v0.20200819.0

func (m *MasterProfile) IsUbuntu1804() bool

IsUbuntu1804 returns true if the master profile distro is based on Ubuntu 18.04

func (*MasterProfile) IsVHDDistro added in v0.20200819.0

func (m *MasterProfile) IsVHDDistro() bool

IsVHDDistro returns true if the distro uses VHD SKUs

func (*MasterProfile) IsVirtualMachineScaleSets added in v0.20200819.0

func (m *MasterProfile) IsVirtualMachineScaleSets() bool

IsVirtualMachineScaleSets returns true if the master availability profile is VMSS

type OrchestratorProfile

type OrchestratorProfile struct {
	OrchestratorType    string                `json:"orchestratorType"`
	OrchestratorVersion string                `json:"orchestratorVersion"`
	KubernetesConfig    *api.KubernetesConfig `json:"kubernetesConfig,omitempty"`
	DcosConfig          *api.DcosConfig       `json:"dcosConfig,omitempty"`
}

OrchestratorProfile contains Orchestrator properties

func (*OrchestratorProfile) GetAPIServerEtcdAPIVersion added in v0.20200819.0

func (o *OrchestratorProfile) GetAPIServerEtcdAPIVersion() string

GetAPIServerEtcdAPIVersion Used to set apiserver's etcdapi version

func (*OrchestratorProfile) GetPodInfraContainerSpec added in v0.20200819.0

func (o *OrchestratorProfile) GetPodInfraContainerSpec() string

GetPodInfraContainerSpec returns the sandbox image as a string (ex: k8s.gcr.io/pause-amd64:3.1)

func (*OrchestratorProfile) IsAzureCNI

func (o *OrchestratorProfile) IsAzureCNI() bool

IsAzureCNI returns true if Azure CNI network plugin is enabled

func (*OrchestratorProfile) IsKubernetes

func (o *OrchestratorProfile) IsKubernetes() bool

IsKubernetes returns true if this template is for Kubernetes orchestrator

func (*OrchestratorProfile) IsPrivateCluster added in v0.20200819.0

func (o *OrchestratorProfile) IsPrivateCluster() bool

IsPrivateCluster returns true if this deployment is a private cluster

func (*OrchestratorProfile) IsSwarmMode added in v0.20200819.0

func (o *OrchestratorProfile) IsSwarmMode() bool

IsSwarmMode returns true if this template is for Swarm Mode orchestrator

type Properties

type Properties struct {
	ClusterID               string
	ProvisioningState       ProvisioningState        `json:"provisioningState,omitempty"`
	OrchestratorProfile     *OrchestratorProfile     `json:"orchestratorProfile,omitempty"`
	MasterProfile           *MasterProfile           `json:"masterProfile,omitempty"`
	AgentPoolProfiles       []*AgentPoolProfile      `json:"agentPoolProfiles,omitempty"`
	LinuxProfile            *LinuxProfile            `json:"linuxProfile,omitempty"`
	WindowsProfile          *WindowsProfile          `json:"windowsProfile,omitempty"`
	ExtensionProfiles       []*ExtensionProfile      `json:"extensionProfiles"`
	DiagnosticsProfile      *DiagnosticsProfile      `json:"diagnosticsProfile,omitempty"`
	JumpboxProfile          *JumpboxProfile          `json:"jumpboxProfile,omitempty"`
	ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
	CertificateProfile      *CertificateProfile      `json:"certificateProfile,omitempty"`
	AADProfile              *AADProfile              `json:"aadProfile,omitempty"`
	CustomProfile           *CustomProfile           `json:"customProfile,omitempty"`
	HostedMasterProfile     *HostedMasterProfile     `json:"hostedMasterProfile,omitempty"`
	AddonProfiles           map[string]AddonProfile  `json:"addonProfiles,omitempty"`
	FeatureFlags            *FeatureFlags            `json:"featureFlags,omitempty"`
	TelemetryProfile        *TelemetryProfile        `json:"telemetryProfile,omitempty"`
	CustomCloudEnv          *CustomCloudEnv          `json:"customCloudEnv,omitempty"`
}

Properties represents the AKS cluster definition

func GetK8sDefaultProperties

func GetK8sDefaultProperties(hasWindows bool) *Properties

GetK8sDefaultProperties returns a struct of type Properties for testing purposes.

func (*Properties) AnyAgentIsLinux added in v0.20200813.1

func (p *Properties) AnyAgentIsLinux() bool

AnyAgentIsLinux checks whether any of the agents in the AgentPools are linux

func (*Properties) AreAgentProfilesCustomVNET

func (p *Properties) AreAgentProfilesCustomVNET() bool

AreAgentProfilesCustomVNET returns true if all of the agent profiles in the clusters are configured with VNET.

func (*Properties) GetAgentVMPrefix added in v0.20200813.1

func (p *Properties) GetAgentVMPrefix(a *AgentPoolProfile, index int) string

GetAgentVMPrefix returns the VM prefix for an agentpool.

func (*Properties) GetClusterID

func (p *Properties) GetClusterID() string

GetClusterID creates a unique 8 string cluster ID.

func (*Properties) GetCustomCloudName

func (p *Properties) GetCustomCloudName() string

GetCustomCloudName returns name of environment if customCloudProfile is provided, returns empty string if customCloudProfile is empty. Because customCloudProfile is empty for deployment is AzurePublicCloud, AzureChinaCloud,AzureGermanCloud,AzureUSGovernmentCloud, the return value will be empty string for those clouds

func (*Properties) GetCustomEnvironmentJSON

func (p *Properties) GetCustomEnvironmentJSON(escape bool) (string, error)

GetCustomEnvironmentJSON return the JSON format string for custom environment

func (*Properties) GetNSGName

func (p *Properties) GetNSGName() string

GetNSGName returns the name of the network security group of the cluster.

func (*Properties) GetPrimaryAvailabilitySetName

func (p *Properties) GetPrimaryAvailabilitySetName() string

GetPrimaryAvailabilitySetName returns the name of the primary availability set of the cluster

func (*Properties) GetPrimaryScaleSetName added in v0.20200813.1

func (p *Properties) GetPrimaryScaleSetName() string

GetPrimaryScaleSetName returns the name of the primary scale set node of the cluster

func (*Properties) GetResourcePrefix

func (p *Properties) GetResourcePrefix() string

GetResourcePrefix returns the prefix to use for naming cluster resources

func (*Properties) GetRouteTableName

func (p *Properties) GetRouteTableName() string

GetRouteTableName returns the route table name of the cluster.

func (*Properties) GetSubnetName

func (p *Properties) GetSubnetName() string

GetSubnetName returns the subnet name of the cluster based on its current configuration.

func (*Properties) GetVMType

func (p *Properties) GetVMType() string

GetVMType returns the type of VM "vmss" or "standard" to be passed to the cloud provider

func (*Properties) GetVNetResourceGroupName

func (p *Properties) GetVNetResourceGroupName() string

GetVNetResourceGroupName returns the virtual network resource group name of the cluster

func (*Properties) GetVirtualNetworkName

func (p *Properties) GetVirtualNetworkName() string

GetVirtualNetworkName returns the virtual network name of the cluster

func (*Properties) HasAadProfile

func (p *Properties) HasAadProfile() bool

HasAadProfile returns true if the has aad profile

func (*Properties) HasAvailabilityZones added in v0.20200813.1

func (p *Properties) HasAvailabilityZones() bool

HasAvailabilityZones returns true if the cluster contains a profile with zones

func (*Properties) HasCoreOS added in v0.20200813.1

func (p *Properties) HasCoreOS() bool

HasCoreOS returns true if the cluster contains coreos nodes

func (*Properties) HasDCSeriesSKU

func (p *Properties) HasDCSeriesSKU() bool

HasDCSeriesSKU returns whether or not there is an DC series SKU agent pool

func (*Properties) HasNSeriesSKU added in v0.20200813.1

func (p *Properties) HasNSeriesSKU() bool

HasNSeriesSKU returns whether or not there is an N series SKU agent pool

func (*Properties) HasVMSSAgentPool

func (p *Properties) HasVMSSAgentPool() bool

HasVMSSAgentPool returns true if the cluster contains Virtual Machine Scale Sets agent pools

func (*Properties) HasWindows

func (p *Properties) HasWindows() bool

HasWindows returns true if the cluster contains windows

func (*Properties) IsAKSCustomCloud

func (p *Properties) IsAKSCustomCloud() bool

IsAKSCustomCloud checks if it's in AKS custom cloud

func (*Properties) IsHostedMasterProfile added in v0.20200813.1

func (p *Properties) IsHostedMasterProfile() bool

IsHostedMasterProfile returns true if the cluster has a hosted master

func (*Properties) IsIPMasqAgentDisabled

func (p *Properties) IsIPMasqAgentDisabled() bool

IsIPMasqAgentDisabled returns true if the ip-masq-agent functionality is disabled

func (*Properties) IsIPMasqAgentEnabled

func (p *Properties) IsIPMasqAgentEnabled() bool

IsIPMasqAgentEnabled returns true if the cluster has a hosted master and IpMasqAgent is disabled

func (*Properties) IsVHDDistroForAllNodes

func (p *Properties) IsVHDDistroForAllNodes() bool

IsVHDDistroForAllNodes returns true if all of the agent pools plus masters are running the VHD image

func (*Properties) K8sOrchestratorName

func (p *Properties) K8sOrchestratorName() string

K8sOrchestratorName returns the 3 character orchestrator code for kubernetes-based clusters.

func (*Properties) SetCloudProviderRateLimitDefaults added in v0.20200813.1

func (p *Properties) SetCloudProviderRateLimitDefaults()

SetCloudProviderRateLimitDefaults sets default cloudprovider rate limiter config

func (*Properties) TotalNodes added in v0.20200813.1

func (p *Properties) TotalNodes() int

TotalNodes returns the total number of nodes in the cluster configuration

type ProvisioningState

type ProvisioningState string

ProvisioningState represents the current state of container service resource.

type ResourcePurchasePlan

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

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

type ServicePrincipalProfile

type ServicePrincipalProfile struct {
	ClientID          string                 `json:"clientId"`
	Secret            string                 `json:"secret,omitempty" conform:"redact"`
	ObjectID          string                 `json:"objectId,omitempty"`
	KeyvaultSecretRef *api.KeyvaultSecretRef `json:"keyvaultSecretRef,omitempty"`
}

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

type TelemetryProfile

type TelemetryProfile struct {
	ApplicationInsightsKey string `json:"applicationInsightsKey,omitempty"`
}

TelemetryProfile contains settings for collecting telemtry. Note telemtry is currently enabled/disabled with the 'EnableTelemetry' feature flag.

type WindowsProfile

type WindowsProfile struct {
	AdminUsername                 string                `json:"adminUsername"`
	AdminPassword                 string                `json:"adminPassword" conform:"redact"`
	CSIProxyURL                   string                `json:"csiProxyURL,omitempty"`
	EnableCSIProxy                *bool                 `json:"enableCSIProxy,omitempty"`
	ImageRef                      *api.ImageReference   `json:"imageReference,omitempty"`
	ImageVersion                  string                `json:"imageVersion"`
	ProvisioningScriptsPackageURL string                `json:"provisioningScriptsPackageURL,omitempty"`
	WindowsImageSourceURL         string                `json:"windowsImageSourceURL"`
	WindowsPublisher              string                `json:"windowsPublisher"`
	WindowsOffer                  string                `json:"windowsOffer"`
	WindowsSku                    string                `json:"windowsSku"`
	WindowsDockerVersion          string                `json:"windowsDockerVersion"`
	Secrets                       []api.KeyVaultSecrets `json:"secrets,omitempty"`
	SSHEnabled                    *bool                 `json:"sshEnabled,omitempty"`
	EnableAutomaticUpdates        *bool                 `json:"enableAutomaticUpdates,omitempty"`
	IsCredentialAutoGenerated     *bool                 `json:"isCredentialAutoGenerated,omitempty"`
	EnableAHUB                    *bool                 `json:"enableAHUB,omitempty"`
	WindowsPauseImageURL          string                `json:"windowsPauseImageURL"`
	AlwaysPullWindowsPauseImage   *bool                 `json:"alwaysPullWindowsPauseImage,omitempty"`
}

WindowsProfile represents the windows parameters passed to the cluster

func (*WindowsProfile) GetSSHEnabled

func (w *WindowsProfile) GetSSHEnabled() bool

GetSSHEnabled gets it ssh should be enabled for Windows nodes

func (*WindowsProfile) GetWindowsDockerVersion

func (w *WindowsProfile) GetWindowsDockerVersion() string

GetWindowsDockerVersion gets the docker version specified or returns default value

func (*WindowsProfile) GetWindowsSku

func (w *WindowsProfile) GetWindowsSku() string

GetWindowsSku gets the marketplace sku specified (such as Datacenter-Core-1809-with-Containers-smalldisk) or returns default value

func (*WindowsProfile) HasCustomImage

func (w *WindowsProfile) HasCustomImage() bool

HasCustomImage returns true if there is a custom windows os image url specified

func (*WindowsProfile) HasImageRef

func (w *WindowsProfile) HasImageRef() bool

HasImageRef returns true if the customer brought os image

func (*WindowsProfile) HasSecrets

func (w *WindowsProfile) HasSecrets() bool

HasSecrets returns true if the customer specified secrets to install

Jump to

Keyboard shortcuts

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