Is this a request for help?:
YES
Is this an ISSUE or FEATURE REQUEST? (choose one):
ISSUE
What version of aks-engine?:
v0.30
Kubernetes version:
1.13.3
What happened:
Adding multiple SSH keys results in validation error
FATA[0000] error loading API model in generateCmd: error parsing the api model: Namespace Properties.LinuxProfile.SSH.PublicKeys is not caught, Key: 'Properties.LinuxProfile.SSH.PublicKeys' Error:Field validation for 'PublicKeys' failed on the 'len' tag
What you expected to happen:
multiple keys added to user profile
How to reproduce it (as minimally and precisely as possible):
try to generate templates from following linuxProfile
"linuxProfile": {
"adminUsername": "tech",
"ssh": {
"publicKeys": [
{
"keyData": "ssh-rsa key1"
},
{
"keyData": "ssh-rsa key2"
}
]
}
This is definitely supported for Linux VMs configured through an ARM template https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/createorupdate#sshpublickey
In addition to the typecheck, this template parameter needs to change:
https://github.com/Azure/aks-engine/blob/master/pkg/engine/params.go#L81
and the templates that refer to it:
https://github.com/Azure/aks-engine/blob/master/parts/k8s/kubernetesmasterresources.t#L866
https://github.com/Azure/aks-engine/blob/master/parts/k8s/kubernetesagentresourcesvmss.t#L122
https://github.com/Azure/aks-engine/blob/master/parts/k8s/kubernetesagentresourcesvmas.t#L186
Most helpful comment
also
https://github.com/Azure/aks-engine/blob/master/parts/k8s/kuberneteswindowssetup.ps1#L250
https://github.com/Azure/aks-engine/blob/master/parts/k8s/windowsinstallopensshfunc.ps1#L30
to support Windows