-
Notifications
You must be signed in to change notification settings - Fork 519
feat: add "get-versions" command to replace "orchestrators" #448
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like get-versions
lgtm
any relevant documentation that should be updated? I know there's at least one reference to the orchestrators command in |
Codecov Report
@@ Coverage Diff @@
## master #448 +/- ##
==========================================
+ Coverage 53.43% 53.46% +0.02%
==========================================
Files 95 96 +1
Lines 14391 14406 +15
==========================================
+ Hits 7690 7702 +12
- Misses 6038 6040 +2
- Partials 663 664 +1 |
I'll fix Edit: docs are updated. |
aac7037
to
c4bf1d4
Compare
Here's what the help looks like after this PR: $ ./bin/aks-engine help
AKS Engine deploys and manages Kubernetes clusters in Azure
Usage:
aks-engine [flags]
aks-engine [command]
Available Commands:
completion Generates bash completion scripts
deploy Deploy an Azure Resource Manager template
generate Generate an Azure Resource Manager template
get-versions Display info about supported Kubernetes versions
help Help about any command
scale Scale an existing Kubernetes cluster
upgrade Upgrade an existing Kubernetes cluster
version Print the version of AKS Engine
Flags:
--debug enable verbose debug logs
-h, --help help for aks-engine
--show-default-model Dump the default API model to stdout
Use "aks-engine [command] --help" for more information about a command.
$ ./bin/aks-engine get-versions --help
Display supported Kubernetes versions and upgrade versions
Usage:
aks-engine get-versions [flags]
Flags:
-h, --help help for get-versions
--version string Kubernetes version (optional)
--windows Kubernetes cluster with Windows nodes (optional)
Global Flags:
--debug enable verbose debug logs |
Output of the command is identical to $ ./bin/aks-engine get-versions
{
"orchestrators": [
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.6.9",
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.7.15"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.7.16"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.7.15",
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.7.16"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.8.14"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.8.15"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.7.16",
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.8.14"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.8.15"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.8.14",
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.8.15"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.9.10"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.9.11"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.8.15",
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.9.10"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.9.11"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.9.10",
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.9.11"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.10.9"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.10.12"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.9.11",
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.10.9"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.10.12"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.10.9",
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.10.12"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.11.6"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.11.7"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.10.12",
"default": true,
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.11.6"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.11.7"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.11.6",
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.11.7"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.12.4"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.12.5"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.11.7",
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.12.4"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.12.5"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.12.4",
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.12.5"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.13.2"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.13.3"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.12.5",
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.13.2"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.13.3"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.13.2",
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.13.3"
},
{
"orchestratorType": "",
"orchestratorVersion": "1.14.0-alpha.1"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.13.3",
"upgrades": [
{
"orchestratorType": "",
"orchestratorVersion": "1.14.0-alpha.1"
}
]
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.14.0-alpha.1"
}
]
} |
/lgtm |
As a follow-up PR, we should clean up the output. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jackfrancis, mboersma The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* feat: "get-versions" command to replace "orchestrators" * docs: replace mentions of "aks-engine orchestrators" command
* feat: "get-versions" command to replace "orchestrators" * docs: replace mentions of "aks-engine orchestrators" command
Reason for Change:
The
aks-engine orchestrators
command is still generic and returns DCOS versions, for example, although aks-engine is Kubernetes-only.This hides the
orchestrators
command and adds aget-versions
command that calls the same code with the orchestrator argument hard-coded asKubernetes
.There wasn't a consensus in #339 as to the name of the new command, so this is just my proposal, but I'm happy to change it based on your feedback.
Issue Fixed:
Fixes #339
Requirements:
Notes:
I tried to use Cobra's "alias" feature to avoid writing any code, but it didn't quite fit since the commands don't expose the same arguments. Hiding the
orchestrators
command but otherwise leaving it intact seems like the most polite way to replace it with a new command.