Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

feat: add UltraSSD support #2905

Merged
merged 2 commits into from
Mar 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/topics/clusterdefinitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ The reason for the unsightly base64-encoded input type is to optimize delivery p
| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| kube-controller-manager | true | 1 per master node | The Kubernetes controller manager is a daemon that embeds the core control loops shipped with Kubernetes. Official docs [here](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/). |
| cloud-controller-manager | false | 1 per master node | The Cloud controller manager is a daemon that embeds the cloud specific control loops shipped with Kubernetes. Official docs [here](https://kubernetes.io/docs/reference/command-line-tools-reference/cloud-controller-manager/). |
| kube-apiserver | true | 1 per master node | The Kubernetes API server validates and configures data for the api objects which include pods, services, replicationcontrollers, and others. The API Server services REST operations and provides the frontend to the clusters shared state through which all other components interact. Official docs [here](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/). |
| kube-apiserver | true | 1 per master node | The Kubernetes API server validates and configures data for the api objects which include pods, services, replicationcontrollers, and others. The API Server services REST operations and provides the frontend to the cluster's shared state through which all other components interact. Official docs [here](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/). |
| kube-scheduler | true | 1 per master node | The Kubernetes scheduler is a policy-rich, topology-aware, workload-specific function that significantly impacts availability, performance, and capacity. The scheduler needs to take into account individual and collective resource requirements, quality of service requirements, hardware/software/policy constraints, affinity and anti-affinity specifications, data locality, inter-workload interference, deadlines, and so on. Official docs [here](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/). |
| kube-addon-manager | true | 1 per master node | Addon manager provides a standard way to deliver additional Kubernetes componentry. The addons supported by AKS Engine (documented [above](#addons)) are installed into the cluster using Addon manager. Official docs [here](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/addon-manager). |

Expand Down Expand Up @@ -689,6 +689,7 @@ Below is a list of sysctl configuration that aks-engine will configure by defaul
| [availabilityZones](../../examples/kubernetes-zones/README.md) | no | To protect your cluster from datacenter-level failures, you can enable the Availability Zones feature for your cluster by configuring `"availabilityZones"` for the master profile and all of the agentPool profiles in the cluster definition. Check out [Availability Zones README](../../examples/kubernetes-zones/README.md) for more details. |
| cosmosEtcd | no | True: uses cosmos etcd endpoint instead of installing etcd on masters |
| auditDEnabled | no | Enable auditd enforcement at the OS layer for each node VM. This configuration is only valid on an agent pool with an Ubuntu-backed distro, i.e., the default "aks-ubuntu-16.04" distro, or the "aks-ubuntu-18.04", "ubuntu", "ubuntu-18.04", "ubuntu-18.04-gen2", or "acc-16.04" distro values. Defaults to `false` |
| ultraSSDEnabled | no | Enable UltraSSD feature for each node VM. More details about [Ultra disk](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/disks-types#ultra-ssd-preview). |
| customVMTags | no | Specifies a list of custom tags to be added to the master VMs or Scale Sets. Each tag is a key/value pair (ie: `"myTagKey": "myTagValue"`). |
| sysctldConfig | no | Configure Linux kernel parameters via /etc/sysctl.d/. See `sysctldConfig` [below](#feat-sysctld-config) |

Expand Down Expand Up @@ -725,6 +726,7 @@ A cluster can have 0 to 12 agent pool profiles. Agent Pool Profiles are used for
| auditDEnabled | no | Enable auditd enforcement at the OS layer for each node VM. This configuration is only valid on an agent pool with an Ubuntu-backed distro, i.e., the default "aks-ubuntu-16.04" distro, or the "aks-ubuntu-18.04", "ubuntu", "ubuntu-18.04", or "acc-16.04" distro values. Defaults to `false` |
| customVMTags | no | Specifies a list of custom tags to be added to the agent VMs or Scale Sets. Each tag is a key/value pair (ie: `"myTagKey": "myTagValue"`). |
| diskEncryptionSetID | no | Specifies ResourceId of the disk encryption set to use for enabling encryption at rest (ie: `"/subscriptions/{subs-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSet-name}"`). More details about [Server side encryption of Azure managed disks](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disk-encryption). |
| ultraSSDEnabled | no | Enable UltraSSD feature for each node VM. More details about [Ultra disk](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/disks-types#ultra-ssd-preview). |
| extensions | no | Specifies list of extensions to enable for the agent profile. More details about [agentPoolProfiles extensions](extensions.md#agentpoolprofiles) |
| preProvisionExtension | no | Specifies an extension to be run before the cluster is brought up. More details about [agentPoolProfiles extensions](extensions.md#agentpoolprofiles) |
| sysctldConfig | no | Configure Linux kernel parameters via /etc/sysctl.d/. See `sysctldConfig` [below](#feat-sysctld-config) |
Expand Down
2 changes: 2 additions & 0 deletions pkg/api/converterfromapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ func convertMasterProfileToVLabs(api *MasterProfile, vlabsProfile *vlabs.MasterP
vlabsProfile.SinglePlacementGroup = api.SinglePlacementGroup
vlabsProfile.CosmosEtcd = api.CosmosEtcd
vlabsProfile.AuditDEnabled = api.AuditDEnabled
vlabsProfile.UltraSSDEnabled = api.UltraSSDEnabled
convertCustomFilesToVlabs(api, vlabsProfile)
vlabsProfile.SysctlDConfig = map[string]string{}
for key, val := range api.SysctlDConfig {
Expand Down Expand Up @@ -569,6 +570,7 @@ func convertAgentPoolProfileToVLabs(api *AgentPoolProfile, p *vlabs.AgentPoolPro
p.EnableVMSSNodePublicIP = api.EnableVMSSNodePublicIP
p.LoadBalancerBackendAddressPoolIDs = api.LoadBalancerBackendAddressPoolIDs
p.AuditDEnabled = api.AuditDEnabled
p.UltraSSDEnabled = api.UltraSSDEnabled
p.DiskEncryptionSetID = api.DiskEncryptionSetID

for k, v := range api.CustomNodeLabels {
Expand Down
2 changes: 2 additions & 0 deletions pkg/api/convertertoapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ func convertVLabsMasterProfile(vlabs *vlabs.MasterProfile, api *MasterProfile) {
api.PlatformUpdateDomainCount = vlabs.PlatformUpdateDomainCount
api.SinglePlacementGroup = vlabs.SinglePlacementGroup
api.CosmosEtcd = vlabs.CosmosEtcd
api.UltraSSDEnabled = vlabs.UltraSSDEnabled
api.AuditDEnabled = vlabs.AuditDEnabled
convertCustomFilesToAPI(vlabs, api)
api.SysctlDConfig = map[string]string{}
Expand Down Expand Up @@ -616,6 +617,7 @@ func convertVLabsAgentPoolProfile(vlabs *vlabs.AgentPoolProfile, api *AgentPoolP
api.LoadBalancerBackendAddressPoolIDs = vlabs.LoadBalancerBackendAddressPoolIDs
api.AuditDEnabled = vlabs.AuditDEnabled
api.DiskEncryptionSetID = vlabs.DiskEncryptionSetID
api.UltraSSDEnabled = vlabs.UltraSSDEnabled

api.CustomNodeLabels = map[string]string{}
for k, v := range vlabs.CustomNodeLabels {
Expand Down
2 changes: 2 additions & 0 deletions pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ type MasterProfile struct {
AvailabilityZones []string `json:"availabilityZones,omitempty"`
SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
AuditDEnabled *bool `json:"auditDEnabled,omitempty"`
UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"`
CustomVMTags map[string]string `json:"customVMTags,omitempty"`
// Master LB public endpoint/FQDN with port
// The format will be FQDN:2376
Expand Down Expand Up @@ -654,6 +655,7 @@ type AgentPoolProfile struct {
CustomVMTags map[string]string `json:"customVMTags,omitempty"`
DiskEncryptionSetID string `json:"diskEncryptionSetID,omitempty"`
SysctlDConfig map[string]string `json:"sysctldConfig,omitempty"`
UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"`
}

// AgentPoolProfileRole represents an agent role
Expand Down
56 changes: 46 additions & 10 deletions pkg/api/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -771,16 +771,17 @@ func TestMasterProfileGetCosmosEndPointURI(t *testing.T) {

func TestHasStorageProfile(t *testing.T) {
cases := []struct {
name string
p Properties
expectedHasMD bool
expectedHasSA bool
expectedMasterMD bool
expectedAgent0E bool
expectedAgent0MD bool
expectedPrivateJB bool
expectedHasDisks bool
expectedDesID string
name string
p Properties
expectedHasMD bool
expectedHasSA bool
expectedMasterMD bool
expectedAgent0E bool
expectedAgent0MD bool
expectedPrivateJB bool
expectedHasDisks bool
expectedDesID string
expectedUltraSSDEnabled bool
}{
{
name: "Storage Account",
Expand Down Expand Up @@ -982,6 +983,35 @@ func TestHasStorageProfile(t *testing.T) {
expectedPrivateJB: false,
expectedDesID: "DiskEncryptionSetID",
},
{
name: "UltraSSDEnabled setting",
p: Properties{
OrchestratorProfile: &OrchestratorProfile{
OrchestratorType: Kubernetes,
},
MasterProfile: &MasterProfile{
StorageProfile: ManagedDisks,
UltraSSDEnabled: to.BoolPtr(true),
},
AgentPoolProfiles: []*AgentPoolProfile{
{
StorageProfile: ManagedDisks,
UltraSSDEnabled: to.BoolPtr(true),
},
{
StorageProfile: ManagedDisks,
UltraSSDEnabled: to.BoolPtr(true),
},
},
},
expectedHasMD: true,
expectedHasSA: false,
expectedMasterMD: true,
expectedAgent0MD: true,
expectedAgent0E: false,
expectedPrivateJB: false,
expectedUltraSSDEnabled: true,
},
}

for _, c := range cases {
Expand All @@ -1000,6 +1030,9 @@ func TestHasStorageProfile(t *testing.T) {
if c.p.MasterProfile.IsStorageAccount() == c.expectedMasterMD {
t.Fatalf("expected IsStorageAccount() to return %t but instead returned %t", !c.expectedMasterMD, c.p.MasterProfile.IsStorageAccount())
}
if to.Bool(c.p.MasterProfile.UltraSSDEnabled) != c.expectedUltraSSDEnabled {
t.Fatalf("expected UltraSSDEnabled to return %v but instead returned %v", c.expectedUltraSSDEnabled, to.Bool(c.p.MasterProfile.UltraSSDEnabled))
}
if c.p.AgentPoolProfiles[0].IsManagedDisks() != c.expectedAgent0MD {
t.Fatalf("expected IsManagedDisks() to return %t but instead returned %t", c.expectedAgent0MD, c.p.AgentPoolProfiles[0].IsManagedDisks())
}
Expand All @@ -1019,6 +1052,9 @@ func TestHasStorageProfile(t *testing.T) {
if c.p.AgentPoolProfiles[0].DiskEncryptionSetID != c.expectedDesID {
t.Fatalf("expected DiskEncryptionSetID to return %s but instead returned %s", c.expectedDesID, c.p.AgentPoolProfiles[0].DiskEncryptionSetID)
}
if to.Bool(c.p.AgentPoolProfiles[0].UltraSSDEnabled) != c.expectedUltraSSDEnabled {
t.Fatalf("expected UltraSSDEnabled to return %v but instead returned %v", c.expectedUltraSSDEnabled, to.Bool(c.p.AgentPoolProfiles[0].UltraSSDEnabled))
}
})
}
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/api/vlabs/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ type MasterProfile struct {
AuditDEnabled *bool `json:"auditDEnabled,omitempty"`
CustomVMTags map[string]string `json:"customVMTags,omitempty"`
SysctlDConfig map[string]string `json:"sysctldConfig,omitempty"`
UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"`

// subnet is internal
subnet string
Expand Down Expand Up @@ -505,7 +506,7 @@ type AgentPoolProfile struct {
AuditDEnabled *bool `json:"auditDEnabled,omitempty"`
CustomVMTags map[string]string `json:"customVMTags,omitempty"`
DiskEncryptionSetID string `json:"diskEncryptionSetID,omitempty"`

UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"`
// subnet is internal
subnet string

Expand Down
Loading