new attempt

This commit is contained in:
Bastian Schnorbus
2025-05-06 23:03:51 +02:00
parent 7783d14826
commit cbefdfba7b
28 changed files with 80 additions and 446 deletions

View File

@@ -23,20 +23,18 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// Important: Run "make" to regenerate code after modifying this file
// Container defines container related properties.
// Container related properties
type Container struct {
Image string `json:"image"`
Port int `json:"port"`
}
// Service defines service related properties.
// Service related properties
type Service struct {
Port int `json:"port"`
}
// SchedulingConfig defines scheduling related properties.
// Scheduling related properties
type Scheduling struct {
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=23
@@ -45,20 +43,28 @@ type Scheduling struct {
// +kubebuilder:validation:Maximum=23
EndTime int `json:"endTime"`
// +kubebuilder:validation:Minimum=0
Replica int `json:"replica"`
// +kubebuilder:validation:Maximum=6
Replicas int `json:"replicas"`
}
// TDSetSpec defines the desired state of TDSet
type TDSetSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
// +kubebuilder:validation:Required
Container Container `json:"container"`
// +kubebuilder:validation:Optional
Service Service `json:"service,omitempty"`
// +kubebuilder:validation:Required
SchedulingConfig []*Scheduling `json:"schedulingConfig"`
// +kubebuilder:validation:Required
// +kubebuilder:validation:Minimum=1
DefaultReplica int32 `json:"defaultReplica"`
// +kubebuilder:Minimum:1
DefaultReplicas int32 `json:"defaultReplicas,omitempty"`
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=1440