Skip to content

Commit

Permalink
Add ControlPlaneOnly enum to ManagedClusterUpgradeSpec (#27491)
Browse files Browse the repository at this point in the history
* Add ControlPlaneOnly enum to ManagedClusterUpgradeSpec

* add decorator for 2-02 release and fix comments

* fix comment

* fix decorator generation

* fix version commenting

* fix commenting typo

* revise spec comments and consolidate into type comments
  • Loading branch information
frantran authored and zman-ms committed Feb 17, 2024
1 parent cc94f60 commit be0e270
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 22 deletions.
12 changes: 6 additions & 6 deletions specification/containerservice/Fleet.Management/update/run.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,7 @@ scalar KubernetesVersion extends string;

@doc("The upgrade to apply to a ManagedCluster.")
model ManagedClusterUpgradeSpec {
@doc("""
The upgrade type.
Full requires the KubernetesVersion property to be set.
NodeImageOnly requires the KubernetesVersion property not to be set.
""")
@doc("ManagedClusterUpgradeType is the type of upgrade to be applied.")
type: ManagedClusterUpgradeType;

@doc("The Kubernetes version to upgrade the member clusters to.")
Expand All @@ -138,8 +134,12 @@ union ManagedClusterUpgradeType {
@doc("Full upgrades the control plane and all agent pools of the target ManagedClusters.")
"Full",

@doc("NodeImageOnly upgrades only the node images of the target ManagedClusters.")
@doc("NodeImageOnly upgrades only the node images of the target ManagedClusters. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to NOT be set.")
"NodeImageOnly",

@doc("ControlPlaneOnly upgrades only targets the KubernetesVersion of the ManagedClusters and will not be applied to the AgentPool. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to be set.")
@added(Versions.v2024_02_02_preview)
"ControlPlaneOnly",
}

@doc("The state of the UpdateRun, UpdateStage, UpdateGroup, or MemberUpdate.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,7 @@
"properties": {
"type": {
"$ref": "#/definitions/ManagedClusterUpgradeType",
"description": "The upgrade type.\nFull requires the KubernetesVersion property to be set.\nNodeImageOnly requires the KubernetesVersion property not to be set."
"description": "ManagedClusterUpgradeType is the type of upgrade to be applied."
},
"kubernetesVersion": {
"$ref": "#/definitions/KubernetesVersion",
Expand All @@ -1716,12 +1716,12 @@
{
"name": "Full",
"value": "Full",
"description": "Full upgrades the control plane and all agent pools of the target ManagedClusters."
"description": "Full upgrades the control plane and all agent pools of the target ManagedClusters. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to be set."
},
{
"name": "NodeImageOnly",
"value": "NodeImageOnly",
"description": "NodeImageOnly upgrades only the node images of the target ManagedClusters."
"description": "NodeImageOnly upgrades only the node images of the target ManagedClusters. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to NOT be set."
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1803,7 +1803,7 @@
"properties": {
"type": {
"$ref": "#/definitions/ManagedClusterUpgradeType",
"description": "The upgrade type.\nFull requires the KubernetesVersion property to be set.\nNodeImageOnly requires the KubernetesVersion property not to be set."
"description": "ManagedClusterUpgradeType is the type of upgrade to be applied."
},
"kubernetesVersion": {
"$ref": "#/definitions/KubernetesVersion",
Expand All @@ -1828,12 +1828,12 @@
{
"name": "Full",
"value": "Full",
"description": "Full upgrades the control plane and all agent pools of the target ManagedClusters."
"description": "Full upgrades the control plane and all agent pools of the target ManagedClusters. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to be set."
},
{
"name": "NodeImageOnly",
"value": "NodeImageOnly",
"description": "NodeImageOnly upgrades only the node images of the target ManagedClusters."
"description": "NodeImageOnly upgrades only the node images of the target ManagedClusters. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to NOT be set."
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2224,7 +2224,7 @@
"properties": {
"type": {
"$ref": "#/definitions/ManagedClusterUpgradeType",
"description": "The upgrade type.\nFull requires the KubernetesVersion property to be set.\nNodeImageOnly requires the KubernetesVersion property not to be set."
"description": "ManagedClusterUpgradeType is the type of upgrade to be applied."
},
"kubernetesVersion": {
"$ref": "#/definitions/KubernetesVersion",
Expand All @@ -2249,12 +2249,12 @@
{
"name": "Full",
"value": "Full",
"description": "Full upgrades the control plane and all agent pools of the target ManagedClusters."
"description": "Full upgrades the control plane and all agent pools of the target ManagedClusters. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to be set."
},
{
"name": "NodeImageOnly",
"value": "NodeImageOnly",
"description": "NodeImageOnly upgrades only the node images of the target ManagedClusters."
"description": "NodeImageOnly upgrades only the node images of the target ManagedClusters. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to NOT be set."
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2300,7 +2300,7 @@
"properties": {
"type": {
"$ref": "#/definitions/ManagedClusterUpgradeType",
"description": "The upgrade type.\nFull requires the KubernetesVersion property to be set.\nNodeImageOnly requires the KubernetesVersion property not to be set."
"description": "ManagedClusterUpgradeType is the type of upgrade to be applied."
},
"kubernetesVersion": {
"$ref": "#/definitions/KubernetesVersion",
Expand All @@ -2316,7 +2316,8 @@
"description": "The type of upgrade to perform when targeting ManagedClusters.",
"enum": [
"Full",
"NodeImageOnly"
"NodeImageOnly",
"ControlPlaneOnly"
],
"x-ms-enum": {
"name": "ManagedClusterUpgradeType",
Expand All @@ -2325,12 +2326,17 @@
{
"name": "Full",
"value": "Full",
"description": "Full upgrades the control plane and all agent pools of the target ManagedClusters."
"description": "Full upgrades the control plane and all agent pools of the target ManagedClusters. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to be set."
},
{
"name": "NodeImageOnly",
"value": "NodeImageOnly",
"description": "NodeImageOnly upgrades only the node images of the target ManagedClusters."
"description": "NodeImageOnly upgrades only the node images of the target ManagedClusters. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to NOT be set."
},
{
"name": "ControlPlaneOnly",
"value": "ControlPlaneOnly",
"description": "ControlPlaneOnly upgrades only targets the KubernetesVersion of the ManagedClusters and will not be applied to the AgentPool. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to be set."
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2120,7 +2120,7 @@
"properties": {
"type": {
"$ref": "#/definitions/ManagedClusterUpgradeType",
"description": "The upgrade type.\nFull requires the KubernetesVersion property to be set.\nNodeImageOnly requires the KubernetesVersion property not to be set."
"description": "ManagedClusterUpgradeType is the type of upgrade to be applied."
},
"kubernetesVersion": {
"$ref": "#/definitions/KubernetesVersion",
Expand All @@ -2145,12 +2145,12 @@
{
"name": "Full",
"value": "Full",
"description": "Full upgrades the control plane and all agent pools of the target ManagedClusters."
"description": "Full upgrades the control plane and all agent pools of the target ManagedClusters. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to be set."
},
{
"name": "NodeImageOnly",
"value": "NodeImageOnly",
"description": "NodeImageOnly upgrades only the node images of the target ManagedClusters."
"description": "NodeImageOnly upgrades only the node images of the target ManagedClusters. Requires the ManagedClusterUpgradeSpec.KubernetesVersion property to NOT be set."
}
]
}
Expand Down

0 comments on commit be0e270

Please sign in to comment.