-
Notifications
You must be signed in to change notification settings - Fork 18
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
init commit for scheduled scaling #370
base: main
Are you sure you want to change the base?
Conversation
@randytqwjp You have to run |
type ScheduledScaling struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec ScheduledScalingSpec `json:"spec,omitempty"` | ||
Status ScheduledScalingStatus `json:"status,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// ScheduledScalingList contains a list of ScheduledScaling | ||
type ScheduledScalingList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []ScheduledScaling `json:"items"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing protobuf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protobuf is missing in tortoise_types.go as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I missed one point last time, other points LGTM
// start of schedule | ||
StartAt *string `json:"startAt,omitempty" protobuf:"bytes,1,opt,name=startAt"` | ||
// end of schedule | ||
FinishAt *string `json:"finishAt,omitempty" protobuf:"bytes,2,name=finishAt"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As proposal describes, it should be a required value. We don't want to allow users to keep increasing the resources.
# Must not empty. If empty, the validation webhook rejects the creation.
https://github.com/mercari/tortoise/blob/main/proposals/scheduled-scaling/README.md
// start of schedule | ||
StartAt *string `json:"startAt,omitempty" protobuf:"bytes,1,name=startAt"` | ||
// end of schedule | ||
FinishAt *string `json:"finishAt,omitempty" protobuf:"bytes,2,name=finishAt"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FinishAt *string `json:"finishAt,omitempty" protobuf:"bytes,2,name=finishAt"` | |
FinishAt *string `json:"finishAt" protobuf:"bytes,2,name=finishAt"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you have to make manifests
after updating api/v1alpha1/scheduledscaling_types.go so that all CRD spec is updated accordingly
type Schedule struct { | ||
/// RFC3339 format e.g., "2006-01-02T15:04:05Z09:00" | ||
// start of schedule | ||
StartAt *string `json:"startAt" protobuf:"bytes,1,name=startAt"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StartAt is required.
StartAt *string `json:"startAt" protobuf:"bytes,1,name=startAt"` | |
StartAt *string `json:"startAt,omitempty" protobuf:"bytes,1,opt,name=startAt"` |
What this PR does / why we need it:
Create CRD for scheduledscaling
Which issue(s) this PR fixes:
#34
Fixes #
Special notes for your reviewer: