Skip to content

Commit

Permalink
Merge branch 'master' into feature/CON-21466/amiAutoUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
shaulib committed Jan 4, 2024
2 parents 824fe0a + ac36060 commit 4af43a0
Show file tree
Hide file tree
Showing 31 changed files with 765 additions and 93 deletions.
108 changes: 65 additions & 43 deletions api/services/elastigroup/aws/schemas/elastigroupScaleDown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ properties:
description: |
The policy name.
example: "my-down-policy"
namespace:
type: string
description: |
The namespace for the alarm's associated metric.
default: "AWS/EC2"
source:
type: string
description: |
The metric source.
enum: [ spectrum, cloudWatch ]
example: "spectrum"
metricName:
type: string
description: |
Expand Down Expand Up @@ -34,46 +45,10 @@ properties:
description: |
The value against which the specified statistic is compared.
example: 90
action:
type: object
adjustment:
type: integer
description: |
The action to take when scale up is needed.
A mandatory field, that should be filled with one of the following:
"adjustment", "percentageAdjustment", "setMaxTarget", "setMinTarget", "updateCapacity".
properties:
type:
type: string
description: |
The type of the action to take when scale up is needed.
enum: [ adjustment , updateCapacity setMinTarget , percentageAdjustment ]
example: "updateCapacity"
adjustment:
type: integer
description: |
The number / percentage associated with the specified adjustment type.
Required if using `adjustment` or `percentageAdjustment` as action type.
example: 1
minTargetCapacity:
type: integer
description: |
The minimum target capacity.
Required if using `setMinTarget` as action type.
example: 1
target:
type: integer
description: |
The desired number of instances. Required if using `updateCapacity` as action type and neither `minimum` nor `maximum` are defined.
example: 1
minimum:
type: integer
description: |
The lower limit number of instances that you can scale down to. Optional, required if using `updateCapacity` as action type and neither minimum nor maximum are defined.
example: 0
maximum:
type: integer
description: |
The upper limit number of instances that you can scale up to. Optional, required if using `updateCapacity` as action type and neither minimum nor maximum are defined.
example: 5
The number associated with the specified adjustment type.
stepAdjustments:
type: array
description: |
Expand All @@ -82,9 +57,13 @@ properties:
If specified, at least one step should be defined.
items:
type: object
required:
- threshold
properties:
action:
type: object
required:
- type
description: |
The action to take when scale down according to step's threshold is needed.
A mandatory field, that should be filled with one of the following:
Expand Down Expand Up @@ -129,18 +108,61 @@ properties:
The value against which the specified statistic is compared in order
to determine if a step should be applied.
example: 10
namespace:
type: string
action:
type: object
required:
- type
description: |
The namespace for the alarm's associated metric.
default: "AWS/EC2"
The action to take when scale up is needed.
A mandatory field, that should be filled with one of the following:
"adjustment", "percentageAdjustment", "setMaxTarget", "setMinTarget", "updateCapacity".
properties:
type:
type: string
description: |
The type of the action to take when scale up is needed.
enum: [ adjustment, updateCapacity, setMinTarget, percentageAdjustment ]
example: "updateCapacity"
adjustment:
type: integer
description: |
The number / percentage associated with the specified adjustment type.
Required if using `adjustment` or `percentageAdjustment` as action type.
example: 1
maxTargetCapacity:
type: integer
description: |
The maximum target capacity.
Required if using `setMaxTarget` as action type.
example: 1
target:
type: integer
description: |
The desired number of instances. Required if using `updateCapacity` as action type and neither `minimum` nor `maximum` are defined.
example: 1
minimum:
type: integer
description: |
The lower limit number of instances that you can scale down to. Optional, required if using `updateCapacity` as action type and neither minimum nor maximum are defined.
example: 0
maximum:
type: integer
description: |
The upper limit number of instances that you can scale up to. Optional, required if using `updateCapacity` as action type and neither minimum nor maximum are defined.
example: 5
maxTargetCapacity:
type: integer
description: |
The maximum target capacity.
dimensions:
type: array
description: |
The dimensions for the alarm's associated metric.
When name is "instanceId", no value is needed.
items:
type: object
required:
- name
properties:
name:
type: string
Expand Down
111 changes: 67 additions & 44 deletions api/services/elastigroup/aws/schemas/elastigroupScaleUp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ properties:
description: |
The policy name.
example: "my-up-policy"
namespace:
type: string
description: |
The namespace for the alarm's associated metric.
default: "AWS/EC2"
source:
type: string
description: |
The metric source.
enum: [ spectrum, cloudWatch ]
example: "spectrum"
metricName:
type: string
description: |
Expand Down Expand Up @@ -37,46 +48,10 @@ properties:
description: |
The value against which the specified statistic is compared.
example: 90
action:
type: object
adjustment:
type: integer
description: |
The action to take when scale up is needed.
A mandatory field, that should be filled with one of the following:
"adjustment", "percentageAdjustment", "setMaxTarget", "setMinTarget", "updateCapacity".
properties:
type:
type: string
description: |
The type of the action to take when scale up is needed.
enum: [ adjustment , updateCapacity setMinTarget , percentageAdjustment ]
example: "updateCapacity"
adjustment:
type: integer
description: |
The number / percentage associated with the specified adjustment type.
Required if using `adjustment` or `percentageAdjustment` as action type
example: 1
minTargetCapacity:
type: integer
description: |
The minimum target capacity.
Required if using `setMinTarget` as action type.
example: 1
target:
type: integer
description: |
The desired number of instances. Required if using `updateCapacity` as action type and neither `minimum` nor `maximum` are defined.
example: 1
minimum:
type: integer
description: |
The lower limit number of instances that you can scale down to. Optional, required if using `updateCapacity` as action type and neither `target` nor `maximum` are defined
example: 0
maximum:
type: integer
description: |
The upper limit number of instances that you can scale up to. Optional, required if using `updateCapacity` as action type and neither `target` nor `minimum` are defined
example: 5
The number associated with the specified adjustment type.
stepAdjustments:
type: array
description: |
Expand All @@ -85,9 +60,13 @@ properties:
If specified, at least one step should be defined.
items:
type: object
required:
- threshold
properties:
action:
type: object
required:
- type
description: |
The action to take when scale up according to step's threshold is needed.
A mandatory field, that should be filled with one of the following:
Expand All @@ -97,7 +76,7 @@ properties:
type: string
description: |
The type of the action to take when scale up is needed.
enum: [ adjustment , updateCapacity setMinTarget , percentageAdjustment ]
enum: [ adjustment, updateCapacity, setMinTarget, percentageAdjustment ]
example: "setMinTarget"
adjustment:
type: integer
Expand Down Expand Up @@ -132,18 +111,61 @@ properties:
The value against which the specified statistic is compared in order
to determine if a step should be applied.
example: 50
namespace:
type: string
action:
type: object
required:
- type
description: |
The namespace for the alarm's associated metric.
default: "AWS/EC2"
The action to take when scale up is needed.
A mandatory field, that should be filled with one of the following:
"adjustment", "percentageAdjustment", "setMaxTarget", "setMinTarget", "updateCapacity".
properties:
type:
type: string
description: |
The type of the action to take when scale up is needed.
enum: [ adjustment, updateCapacity, setMinTarget, percentageAdjustment ]
example: "updateCapacity"
adjustment:
type: integer
description: |
The number / percentage associated with the specified adjustment type.
Required if using `adjustment` or `percentageAdjustment` as action type
example: 1
minTargetCapacity:
type: integer
description: |
The minimum target capacity.
Required if using `setMinTarget` as action type.
example: 1
target:
type: integer
description: |
The desired number of instances. Required if using `updateCapacity` as action type and neither `minimum` nor `maximum` are defined.
example: 1
minimum:
type: integer
description: |
The lower limit number of instances that you can scale down to. Optional, required if using `updateCapacity` as action type and neither `target` nor `maximum` are defined
example: 0
maximum:
type: integer
description: |
The upper limit number of instances that you can scale up to. Optional, required if using `updateCapacity` as action type and neither `target` nor `minimum` are defined
example: 5
minTargetCapacity:
type: integer
description: |
The minimum target capacity.
dimensions:
type: array
description: |
The dimensions for the alarm's associated metric.
When name is "instanceId", no value is needed.
items:
type: object
required:
- name
properties:
name:
type: string
Expand Down Expand Up @@ -177,3 +199,4 @@ properties:
Specifies whether the scaling policy described in this block is enabled.
default: true
example: true

55 changes: 49 additions & 6 deletions api/services/elastigroup/aws/schemas/elastigroupTargetScale.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
type: object
title: target scaling config
required:
- policyName
- namespace
- metricName
- target
properties:
source:
title: Source
description: |
The source of the metric.
enum: [cloudWatch, spectrum]
enum: [ cloudWatch, spectrum ]
type: string
example: "spectrum"
policyName:
type: string
description: |
The policy name
example: "my-up-policy"
example: "my-target-scaling-policy"
metricName:
type: string
description: |
Expand All @@ -36,13 +41,51 @@ properties:
description: |
The namespace for the alarm's associated metric.
default: "AWS/EC2"
target:
dimensions:
type: array
description: |
The dimensions for the alarm's associated metric.
When name is "instanceId", no value is needed.
items:
type: object
required:
- name
properties:
name:
type: string
example: "InstanceId"
value:
type: string
period:
type: integer
description: |
The target value for the group.
The period in seconds over which the statistic is applied.
example: 300
evaluationPeriods:
type: integer
description: |
The number of periods over which data is compared to the specified threshold.
example: 1
cooldown:
type: integer
description: |
The amount of time, in seconds, after a scaling activity completes and before any further trigger-related scaling activities can start.
example: 300
The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.
example: 300
target:
type: integer
description: |
The target value for the group.
example: 1
predictive:
type: object
description: |
Enable predictive autoscaling.
required:
- mode
properties:
mode:
description: |
Predictive autoscaling mode.
enum: [ FORECAST_AND_SCALE, FORECAST_ONLY ]
type: string
example: "FORECAST_AND_SCALE"
Loading

0 comments on commit 4af43a0

Please sign in to comment.