Skip to content

Commit 7074084

Browse files
Adds support for RepairConfig overrides and configurations in EKS Managed Node Groups.
1 parent f154b82 commit 7074084

File tree

11 files changed

+680
-3
lines changed

11 files changed

+680
-3
lines changed

generator/ServiceModels/eks/eks-2017-11-01.api.json

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3313,9 +3313,27 @@
33133313
"NodeRepairConfig":{
33143314
"type":"structure",
33153315
"members":{
3316-
"enabled":{"shape":"BoxedBoolean"}
3316+
"enabled":{"shape":"BoxedBoolean"},
3317+
"maxUnhealthyNodeThresholdCount":{"shape":"NonZeroInteger"},
3318+
"maxUnhealthyNodeThresholdPercentage":{"shape":"PercentCapacity"},
3319+
"maxParallelNodesRepairedCount":{"shape":"NonZeroInteger"},
3320+
"maxParallelNodesRepairedPercentage":{"shape":"PercentCapacity"},
3321+
"nodeRepairConfigOverrides":{"shape":"NodeRepairConfigOverridesList"}
3322+
}
3323+
},
3324+
"NodeRepairConfigOverrides":{
3325+
"type":"structure",
3326+
"members":{
3327+
"nodeMonitoringCondition":{"shape":"String"},
3328+
"nodeUnhealthyReason":{"shape":"String"},
3329+
"minRepairWaitTimeMins":{"shape":"NonZeroInteger"},
3330+
"repairAction":{"shape":"RepairAction"}
33173331
}
33183332
},
3333+
"NodeRepairConfigOverridesList":{
3334+
"type":"list",
3335+
"member":{"shape":"NodeRepairConfigOverrides"}
3336+
},
33193337
"Nodegroup":{
33203338
"type":"structure",
33213339
"members":{
@@ -3622,6 +3640,14 @@
36223640
"member":{"shape":"RemotePodNetwork"},
36233641
"max":1
36243642
},
3643+
"RepairAction":{
3644+
"type":"string",
3645+
"enum":[
3646+
"Replace",
3647+
"Reboot",
3648+
"NoAction"
3649+
]
3650+
},
36253651
"ResolveConflicts":{
36263652
"type":"string",
36273653
"enum":[
@@ -4127,7 +4153,8 @@
41274153
"StorageConfig",
41284154
"KubernetesNetworkConfig",
41294155
"RemoteNetworkConfig",
4130-
"DeletionProtection"
4156+
"DeletionProtection",
4157+
"NodeRepairConfig"
41314158
]
41324159
},
41334160
"UpdateParams":{

generator/ServiceModels/eks/eks-2017-11-01.docs.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,6 +1350,18 @@
13501350
"UpdateNodegroupConfigRequest$nodeRepairConfig": "<p>The node auto repair configuration for the node group.</p>"
13511351
}
13521352
},
1353+
"NodeRepairConfigOverrides": {
1354+
"base": "<p>Specify granular overrides for specific repair actions. These overrides control the repair action and the repair delay time before a node is considered eligible for repair. If you use this, you must specify all the values.</p>",
1355+
"refs": {
1356+
"NodeRepairConfigOverridesList$member": null
1357+
}
1358+
},
1359+
"NodeRepairConfigOverridesList": {
1360+
"base": null,
1361+
"refs": {
1362+
"NodeRepairConfig$nodeRepairConfigOverrides": "<p>Specify granular overrides for specific repair actions. These overrides control the repair action and the repair delay time before a node is considered eligible for repair. If you use this, you must specify all the values.</p>"
1363+
}
1364+
},
13531365
"Nodegroup": {
13541366
"base": "<p>An object representing an Amazon EKS managed node group.</p>",
13551367
"refs": {
@@ -1407,6 +1419,9 @@
14071419
"NonZeroInteger": {
14081420
"base": null,
14091421
"refs": {
1422+
"NodeRepairConfig$maxUnhealthyNodeThresholdCount": "<p>Specify a count threshold of unhealthy nodes, above which node auto repair actions will stop. When using this, you cannot also set <code>maxUnhealthyNodeThresholdPercentage</code> at the same time.</p>",
1423+
"NodeRepairConfig$maxParallelNodesRepairedCount": "<p>Specify the maximum number of nodes that can be repaired concurrently or in parallel, expressed as a count of unhealthy nodes. This gives you finer-grained control over the pace of node replacements. When using this, you cannot also set <code>maxParallelNodesRepairedPercentage</code> at the same time.</p>",
1424+
"NodeRepairConfigOverrides$minRepairWaitTimeMins": "<p>Specify the minimum time in minutes to wait before attempting to repair a node with this specific <code>nodeMonitoringCondition</code> and <code>nodeUnhealthyReason</code>.</p>",
14101425
"NodegroupUpdateConfig$maxUnavailable": "<p>The maximum number of nodes unavailable at once during a version update. Nodes are updated in parallel. This value or <code>maxUnavailablePercentage</code> is required to have a value.The maximum number is 100.</p>"
14111426
}
14121427
},
@@ -1447,6 +1462,8 @@
14471462
"PercentCapacity": {
14481463
"base": null,
14491464
"refs": {
1465+
"NodeRepairConfig$maxUnhealthyNodeThresholdPercentage": "<p>Specify a percentage threshold of unhealthy nodes, above which node auto repair actions will stop. When using this, you cannot also set <code>maxUnhealthyNodeThresholdCount</code> at the same time.</p>",
1466+
"NodeRepairConfig$maxParallelNodesRepairedPercentage": "<p>Specify the maximum number of nodes that can be repaired concurrently or in parallel, expressed as a percentage of unhealthy nodes. This gives you finer-grained control over the pace of node replacements. When using this, you cannot also set <code>maxParallelNodesRepairedCount</code> at the same time.</p>",
14501467
"NodegroupUpdateConfig$maxUnavailablePercentage": "<p>The maximum percentage of nodes unavailable during a version update. This percentage of nodes are updated in parallel, up to 100 nodes at once. This value or <code>maxUnavailable</code> is required to have a value.</p>"
14511468
}
14521469
},
@@ -1531,6 +1548,12 @@
15311548
"RemoteNetworkConfigResponse$remotePodNetworks": "<p>The list of network CIDRs that can contain pods that run Kubernetes webhooks on hybrid nodes.</p>"
15321549
}
15331550
},
1551+
"RepairAction": {
1552+
"base": null,
1553+
"refs": {
1554+
"NodeRepairConfigOverrides$repairAction": "<p>Specify the repair action to take for nodes when all of the specified conditions are met.</p>"
1555+
}
1556+
},
15341557
"ResolveConflicts": {
15351558
"base": null,
15361559
"refs": {
@@ -1837,6 +1860,8 @@
18371860
"ListUpdatesResponse$nextToken": "<p>The <code>nextToken</code> value returned from a previous paginated request, where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. This value is null when there are no more results to return.</p> <note> <p>This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.</p> </note>",
18381861
"MarketplaceInformation$productId": "<p>The product ID from the Amazon Web Services Marketplace.</p>",
18391862
"MarketplaceInformation$productUrl": "<p>The product URL from the Amazon Web Services Marketplace.</p>",
1863+
"NodeRepairConfigOverrides$nodeMonitoringCondition": "<p>Specify an unhealthy condition reported by the node monitoring agent that this override would apply to.</p>",
1864+
"NodeRepairConfigOverrides$nodeUnhealthyReason": "<p>Specify a reason reported by the node monitoring agent that this override would apply to.</p>",
18401865
"Nodegroup$nodegroupName": "<p>The name associated with an Amazon EKS managed node group.</p>",
18411866
"Nodegroup$nodegroupArn": "<p>The Amazon Resource Name (ARN) associated with the managed node group.</p>",
18421867
"Nodegroup$clusterName": "<p>The name of your cluster.</p>",

generator/ServiceModels/eks/eks-2017-11-01.normal.json

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4688,10 +4688,56 @@
46884688
"enabled":{
46894689
"shape":"BoxedBoolean",
46904690
"documentation":"<p>Specifies whether to enable node auto repair for the node group. Node auto repair is disabled by default.</p>"
4691+
},
4692+
"maxUnhealthyNodeThresholdCount":{
4693+
"shape":"NonZeroInteger",
4694+
"documentation":"<p>Specify a count threshold of unhealthy nodes, above which node auto repair actions will stop. When using this, you cannot also set <code>maxUnhealthyNodeThresholdPercentage</code> at the same time.</p>"
4695+
},
4696+
"maxUnhealthyNodeThresholdPercentage":{
4697+
"shape":"PercentCapacity",
4698+
"documentation":"<p>Specify a percentage threshold of unhealthy nodes, above which node auto repair actions will stop. When using this, you cannot also set <code>maxUnhealthyNodeThresholdCount</code> at the same time.</p>"
4699+
},
4700+
"maxParallelNodesRepairedCount":{
4701+
"shape":"NonZeroInteger",
4702+
"documentation":"<p>Specify the maximum number of nodes that can be repaired concurrently or in parallel, expressed as a count of unhealthy nodes. This gives you finer-grained control over the pace of node replacements. When using this, you cannot also set <code>maxParallelNodesRepairedPercentage</code> at the same time.</p>"
4703+
},
4704+
"maxParallelNodesRepairedPercentage":{
4705+
"shape":"PercentCapacity",
4706+
"documentation":"<p>Specify the maximum number of nodes that can be repaired concurrently or in parallel, expressed as a percentage of unhealthy nodes. This gives you finer-grained control over the pace of node replacements. When using this, you cannot also set <code>maxParallelNodesRepairedCount</code> at the same time.</p>"
4707+
},
4708+
"nodeRepairConfigOverrides":{
4709+
"shape":"NodeRepairConfigOverridesList",
4710+
"documentation":"<p>Specify granular overrides for specific repair actions. These overrides control the repair action and the repair delay time before a node is considered eligible for repair. If you use this, you must specify all the values.</p>"
46914711
}
46924712
},
46934713
"documentation":"<p>The node auto repair configuration for the node group.</p>"
46944714
},
4715+
"NodeRepairConfigOverrides":{
4716+
"type":"structure",
4717+
"members":{
4718+
"nodeMonitoringCondition":{
4719+
"shape":"String",
4720+
"documentation":"<p>Specify an unhealthy condition reported by the node monitoring agent that this override would apply to.</p>"
4721+
},
4722+
"nodeUnhealthyReason":{
4723+
"shape":"String",
4724+
"documentation":"<p>Specify a reason reported by the node monitoring agent that this override would apply to.</p>"
4725+
},
4726+
"minRepairWaitTimeMins":{
4727+
"shape":"NonZeroInteger",
4728+
"documentation":"<p>Specify the minimum time in minutes to wait before attempting to repair a node with this specific <code>nodeMonitoringCondition</code> and <code>nodeUnhealthyReason</code>.</p>"
4729+
},
4730+
"repairAction":{
4731+
"shape":"RepairAction",
4732+
"documentation":"<p>Specify the repair action to take for nodes when all of the specified conditions are met.</p>"
4733+
}
4734+
},
4735+
"documentation":"<p>Specify granular overrides for specific repair actions. These overrides control the repair action and the repair delay time before a node is considered eligible for repair. If you use this, you must specify all the values.</p>"
4736+
},
4737+
"NodeRepairConfigOverridesList":{
4738+
"type":"list",
4739+
"member":{"shape":"NodeRepairConfigOverrides"}
4740+
},
46954741
"Nodegroup":{
46964742
"type":"structure",
46974743
"members":{
@@ -5294,6 +5340,14 @@
52945340
"member":{"shape":"RemotePodNetwork"},
52955341
"max":1
52965342
},
5343+
"RepairAction":{
5344+
"type":"string",
5345+
"enum":[
5346+
"Replace",
5347+
"Reboot",
5348+
"NoAction"
5349+
]
5350+
},
52975351
"ResolveConflicts":{
52985352
"type":"string",
52995353
"enum":[
@@ -6061,7 +6115,8 @@
60616115
"StorageConfig",
60626116
"KubernetesNetworkConfig",
60636117
"RemoteNetworkConfig",
6064-
"DeletionProtection"
6118+
"DeletionProtection",
6119+
"NodeRepairConfig"
60656120
]
60666121
},
60676122
"UpdateParams":{

sdk/code-analysis/ServiceAnalysis/EKS/Generated/PropertyValueRules.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,28 @@
165165
<min>1</min>
166166
<max>100</max>
167167
</property-value-rule>
168+
<property-value-rule>
169+
<property>Amazon.EKS.Model.NodeRepairConfig.MaxParallelNodesRepairedCount</property>
170+
<min>1</min>
171+
</property-value-rule>
172+
<property-value-rule>
173+
<property>Amazon.EKS.Model.NodeRepairConfig.MaxParallelNodesRepairedPercentage</property>
174+
<min>1</min>
175+
<max>100</max>
176+
</property-value-rule>
177+
<property-value-rule>
178+
<property>Amazon.EKS.Model.NodeRepairConfig.MaxUnhealthyNodeThresholdCount</property>
179+
<min>1</min>
180+
</property-value-rule>
181+
<property-value-rule>
182+
<property>Amazon.EKS.Model.NodeRepairConfig.MaxUnhealthyNodeThresholdPercentage</property>
183+
<min>1</min>
184+
<max>100</max>
185+
</property-value-rule>
186+
<property-value-rule>
187+
<property>Amazon.EKS.Model.NodeRepairConfigOverrides.MinRepairWaitTimeMins</property>
188+
<min>1</min>
189+
</property-value-rule>
168190
<property-value-rule>
169191
<property>Amazon.EKS.Model.Taint.Key</property>
170192
<min>1</min>

sdk/src/Services/EKS/Generated/Model/Internal/MarshallTransformations/NodeRepairConfigMarshaller.cs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,46 @@ public void Marshall(NodeRepairConfig requestObject, JsonMarshallerContext conte
5252
context.Writer.WriteBooleanValue(requestObject.Enabled.Value);
5353
}
5454

55+
if(requestObject.IsSetMaxParallelNodesRepairedCount())
56+
{
57+
context.Writer.WritePropertyName("maxParallelNodesRepairedCount");
58+
context.Writer.WriteNumberValue(requestObject.MaxParallelNodesRepairedCount.Value);
59+
}
60+
61+
if(requestObject.IsSetMaxParallelNodesRepairedPercentage())
62+
{
63+
context.Writer.WritePropertyName("maxParallelNodesRepairedPercentage");
64+
context.Writer.WriteNumberValue(requestObject.MaxParallelNodesRepairedPercentage.Value);
65+
}
66+
67+
if(requestObject.IsSetMaxUnhealthyNodeThresholdCount())
68+
{
69+
context.Writer.WritePropertyName("maxUnhealthyNodeThresholdCount");
70+
context.Writer.WriteNumberValue(requestObject.MaxUnhealthyNodeThresholdCount.Value);
71+
}
72+
73+
if(requestObject.IsSetMaxUnhealthyNodeThresholdPercentage())
74+
{
75+
context.Writer.WritePropertyName("maxUnhealthyNodeThresholdPercentage");
76+
context.Writer.WriteNumberValue(requestObject.MaxUnhealthyNodeThresholdPercentage.Value);
77+
}
78+
79+
if(requestObject.IsSetNodeRepairConfigOverrides())
80+
{
81+
context.Writer.WritePropertyName("nodeRepairConfigOverrides");
82+
context.Writer.WriteStartArray();
83+
foreach(var requestObjectNodeRepairConfigOverridesListValue in requestObject.NodeRepairConfigOverrides)
84+
{
85+
context.Writer.WriteStartObject();
86+
87+
var marshaller = NodeRepairConfigOverridesMarshaller.Instance;
88+
marshaller.Marshall(requestObjectNodeRepairConfigOverridesListValue, context);
89+
90+
context.Writer.WriteEndObject();
91+
}
92+
context.Writer.WriteEndArray();
93+
}
94+
5595
}
5696

5797
/// <summary>
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the eks-2017-11-01.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Globalization;
22+
using System.IO;
23+
using System.Text;
24+
using System.Xml.Serialization;
25+
26+
using Amazon.EKS.Model;
27+
using Amazon.Runtime;
28+
using Amazon.Runtime.Internal;
29+
using Amazon.Runtime.Internal.Transform;
30+
using Amazon.Runtime.Internal.Util;
31+
#pragma warning disable CS0612,CS0618
32+
namespace Amazon.EKS.Model.Internal.MarshallTransformations
33+
{
34+
/// <summary>
35+
/// NodeRepairConfigOverrides Marshaller
36+
/// </summary>
37+
public class NodeRepairConfigOverridesMarshaller : IRequestMarshaller<NodeRepairConfigOverrides, JsonMarshallerContext>
38+
{
39+
/// <summary>
40+
/// Unmarshaller the response from the service to the response class.
41+
/// </summary>
42+
/// <param name="requestObject"></param>
43+
/// <param name="context"></param>
44+
/// <returns></returns>
45+
public void Marshall(NodeRepairConfigOverrides requestObject, JsonMarshallerContext context)
46+
{
47+
if(requestObject == null)
48+
return;
49+
if(requestObject.IsSetMinRepairWaitTimeMins())
50+
{
51+
context.Writer.WritePropertyName("minRepairWaitTimeMins");
52+
context.Writer.WriteNumberValue(requestObject.MinRepairWaitTimeMins.Value);
53+
}
54+
55+
if(requestObject.IsSetNodeMonitoringCondition())
56+
{
57+
context.Writer.WritePropertyName("nodeMonitoringCondition");
58+
context.Writer.WriteStringValue(requestObject.NodeMonitoringCondition);
59+
}
60+
61+
if(requestObject.IsSetNodeUnhealthyReason())
62+
{
63+
context.Writer.WritePropertyName("nodeUnhealthyReason");
64+
context.Writer.WriteStringValue(requestObject.NodeUnhealthyReason);
65+
}
66+
67+
if(requestObject.IsSetRepairAction())
68+
{
69+
context.Writer.WritePropertyName("repairAction");
70+
context.Writer.WriteStringValue(requestObject.RepairAction);
71+
}
72+
73+
}
74+
75+
/// <summary>
76+
/// Singleton Marshaller.
77+
/// </summary>
78+
public readonly static NodeRepairConfigOverridesMarshaller Instance = new NodeRepairConfigOverridesMarshaller();
79+
80+
}
81+
}

0 commit comments

Comments
 (0)