Skip to content
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

Report pod and storage resource via generic resource #529

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion apis/core/v1alpha1/generic_resource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,34 @@ type GenericResourceSpec struct {
RoleResourceLimits map[api.PodRole]core.ResourceList `json:"roleResourceLimits,omitempty"`
// +optional
RoleResourceRequests map[api.PodRole]core.ResourceList `json:"roleResourceRequests,omitempty"`
Status GenericResourceStatus `json:"status"`

Pods []ComputeResource `json:"pods,omitempty"`
Storage []StorageResource `json:"storage,omitempty"`

Status GenericResourceStatus `json:"status"`
}

type ComputeResource struct {
Name string `json:"name"`
// +optional
CreationTimestamp metav1.Time `json:"creationTimestamp,omitempty"`
Containers []ContainerResource `json:"containers,omitempty"`
InitContainers []ContainerResource `json:"initContainers,omitempty"`
}

type ContainerResource struct {
Name string `json:"name"`
// +optional
Resource core.ResourceRequirements `json:"resource"`
RestartPolicy *core.ContainerRestartPolicy `json:"restartPolicy,omitempty"`
}

type StorageResource struct {
Name string `json:"name"`
// +optional
CreationTimestamp metav1.Time `json:"creationTimestamp,omitempty"`
// +optional
Resources core.VolumeResourceRequirements `json:"resources,omitempty"`
}

type GenericResourceStatus struct {
Expand Down
151 changes: 150 additions & 1 deletion apis/core/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 85 additions & 0 deletions apis/core/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading