Skip to content

Commit

Permalink
fix example spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
indexjoseph committed Jun 24, 2024
1 parent 154fdf6 commit 9eb6a8c
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 80 deletions.
142 changes: 65 additions & 77 deletions examples/chainfleetautoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

#
# [Stage:Alpha]
# [Stage:Dev]
# [FeatureFlag:ScheduledAutoscaler]
# Example of a FleetAutoscaler - This is used to scale a fleet on a schedule,
# allowing for different policies to be applied at different times.
Expand All @@ -25,80 +25,68 @@
apiVersion: autoscaling.agones.dev/v1
kind: FleetAutoscaler
metadata:
name: chain-fleet-autoscaler
name: chain-fleet-autoscaler
spec:
policy:
type: Chain # Chain based policy for autoscaling.
chain:
# Id of chain entry.
# Optional.
- uid: "weekday"
type: Schedule # Schedule based condition.
schedule:
# Timezone to be used for the schedule.
timezone: "America/New_York"
between:
# The policy becomes eligible for application starting on
# Feb 20, 2024 at 4:04 PM.
# Optional.
start: "2024-02-19 16:04:00"
# The policy becomes ineligible for application on
# Feb 23, 2024 at 4:04 PM.
# Optional.
end: "2024-02-23 16:04:00" # optional
activePeriod:
# Start applying the bufferSize everyday at 1:00 AM
# (Only eligible starting on Feb 20, 2024 at 4:04 PM.)
# Optional.
startCron: "0 1 * * 0"
# Only apply the bufferSize for this 5 hours
# Optional.
duration: "5h"
# Policy to be applied when the condition is met.
# Required.
policy:
type: Buffer
buffer:
bufferSize: 50
minReplicas: 100
maxReplicas: 2000
# Id of chain entry.
# Optional.
- uid: "weekend"
type: Schedule
schedule:
# Timezone to be used for the schedule.
timezone: "America/New_York"
between:
# The policy becomes eligible for application starting on
# Feb 24, 2024 at 4:05 PM.
# Optional.
start: "2024-02-24 16:05:00"
start: "2024-02-26 16:05:00"
activePeriod:
# Start applying the bufferSize everyday at 1:00 AM
# (Only eligible starting on Feb 24, 2024 at 4:05 PM.)
# Optional.
startCron: "0 1 * * 0"
# Only apply the bufferSize for this 7 hours
# Optional.
duration: "7h"
# Policy to be applied when the condition is met.
# Required.
policy:
type: Counter
counter:
key: rooms
bufferSize: 10
minCapacity: 500
maxCapacity: 1000
# Id of chain entry.
- uid: "default"
# Policy will always be applied when no other policy is applicable.
# Required.
policy:
type: Buffer
buffer:
bufferSize: 5
minReplicas: 100
maxReplicas: 2000
policy:
type: Chain # Chain based policy for autoscaling.
chain:
# UID of chain entry. Optional.
- uid: "weekday"
type: Schedule # Schedule based condition.
schedule:
# Timezone to be used for the schedule. Optional.
timezone: "America/New_York"
between:
# The policy becomes eligible for application starting on
# Feb 20, 2024 at 4:04 PM. Optional.
start: "2024-02-19 16:04:00"
# The policy becomes ineligible for application on
# Feb 23, 2024 at 4:04 PM. Optional.
end: "2024-02-23 16:04:00" # optional
activePeriod:
# Start applying the bufferSize everyday at 1:00 AM EST
# (Only eligible starting on Feb 20, 2024 at 4:04 PM EST). Optional.
startCron: "0 1 * * 0"
# Only apply the bufferSize for this 5 hours. Optional.
duration: "5h"
# Policy to be applied when the condition is met. Required.
policy:
type: Buffer
buffer:
bufferSize: 50
minReplicas: 100
maxReplicas: 2000
# UID of chain entry. Optional.
- uid: "weekend"
type: Schedule
schedule:
# Timezone to be used for the schedule. Optional.
timezone: "America/New_York"
between:
# The policy becomes eligible for application starting on
# Feb 24, 2024 at 4:05 PM. Optional.
start: "2024-02-24 16:05:00"
end: "2024-02-26 16:05:00"
activePeriod:
# Start applying the bufferSize everyday at 1:00 AM
# (Only eligible starting on Feb 24, 2024 at 4:05 PM). Optional.
startCron: "0 1 * * 0"
# Only apply the bufferSize for this 7 hours. Optional.
duration: "7h"
# Policy to be applied when the condition is met. Required.
policy:
type: Counter
counter:
key: rooms
bufferSize: 10
minCapacity: 500
maxCapacity: 1000
# UID of chain entry.
- uid: "default"
# Policy will always be applied when no other policy is applicable. Required.
policy:
type: Buffer
buffer:
bufferSize: 5
minReplicas: 100
maxReplicas: 2000
6 changes: 3 additions & 3 deletions pkg/util/runtime/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ const (
// FeaturePortPolicyNone is a feature flag to allow setting Port Policy to None.
FeaturePortPolicyNone Feature = "PortPolicyNone"

// FeatureScheduledAutoscaler is a feature flag to enable/disable scheduled fleet autoscaling.
FeatureScheduledAutoscaler Feature = "ScheduledAutoscaler"

////////////////
// Dev features

// FeatureScheduledAutoscaler is a feature flag to enable/disable scheduled fleet autoscaling.
FeatureScheduledAutoscaler Feature = "ScheduledAutoscaler"

////////////////
// Example feature

Expand Down

0 comments on commit 9eb6a8c

Please sign in to comment.