New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support schedule configuration like CronJob #30
Labels
enhancement
New feature or request
Comments
Possible requirements:
|
Precedents:
|
Currently, SpannerAutoscaler CRD has two responsibility.
We want to add a new functionality.
Considerations
(For reference) Relationships in d-kuro/scheduled-pod-autoscaler
|
Draft schemaWritten in CUE to express disjunctions. import "time"
#ScheduledSpannerAutoscaler: {
apiVersion: "spanner.mercari.com/v1alpha1"
kind: "ScheduledSpannerAutoscaler"
metadata: {
name: string
namespace: string
}
spec: {
// SpannerAutoscaler without {min,max}{Nodes,ProcessingUnits}
spannerAutoscalerTemplate: {
scaleTargetRef: {
projectId: string
instanceId: string
}
{
serviceAccountSecretRef: {
namespace: string
name: string
key: string
}
} | {
impersonateConfig: targetServiceAccount: string
}
maxScaleDownNodes: int
targetCPUUtilization: {
highPriority: int
}
}
defaultScaleConfig: #ScaleConfig
}
}
#Schedule: {
apiVersion: "spanner.mercari.com/v1alpha1"
kind: "Schedule"
metadata: {
name: string
namespace: string
}
spec: {
// References in same namespace
ScheduledSpannerAutoscalerRef: {
name: string
}
scaleConfig: #ScaleConfig
{
manual: {
// RFC3339
startTime: time.Time
// RFC3339
endTime?: time.Time
}
} | {
cron: {
// in github.com/robfig/cron compatible format
spec: string
duration: time.Duration
timeZone?: string | *"UTC"
}
}
}
}
#ScaleConfig: {
// Only supports processing units
min: int
max: int
} |
Missing use case Schedule last day of month
IMHO, 2 is realistic approach. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What you want to add
Add schedule node count schedule configuration like this
Why this is needed
We sometimes want to increase node num before starting a batch job.
The text was updated successfully, but these errors were encountered: