Skip to content

Commit

Permalink
Change quota status api
Browse files Browse the repository at this point in the history
Signed-off-by: Imtiaz Uddin <[email protected]>
  • Loading branch information
Imtiaz246 committed Oct 5, 2023
1 parent 55c8c0d commit 8fae3a8
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 75 deletions.
7 changes: 4 additions & 3 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.

45 changes: 13 additions & 32 deletions apis/management/v1alpha1/openapi_generated.go

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

9 changes: 3 additions & 6 deletions apis/management/v1alpha1/projectquota_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,15 @@ type ProjectQuotaStatus struct {

type ResourceQuotaStatus struct {
ResourceQuotaSpec `json:",inline"`
QuotaStatus QuotaStatus `json:"quotaStatus"`
Result QuotaResult `json:"result"`
// +optional
Reason string `json:"reason"`

// Used is the current observed total usage of the resource in the namespace.
// +optional
Used core.ResourceList `json:"used,omitempty"`
}

type QuotaStatus struct {
Result QuotaResult `json:"result"`
Reason string `json:"reason,omitempty"`
}

// +kubebuilder:validation:Enum=Success;Error
type QuotaResult string

Expand Down
17 changes: 0 additions & 17 deletions apis/management/v1alpha1/zz_generated.deepcopy.go

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

7 changes: 4 additions & 3 deletions apis/meta/v1alpha1/zz_generated.deepcopy.go

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

3 changes: 2 additions & 1 deletion apis/ui/v1alpha1/zz_generated.deepcopy.go

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

21 changes: 8 additions & 13 deletions crds/management.k8s.appscode.com_projectquotas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,13 @@ spec:
type: object
kind:
type: string
quotaStatus:
properties:
reason:
type: string
result:
enum:
- Success
- Error
type: string
required:
- result
type: object
reason:
type: string
result:
enum:
- Success
- Error
type: string
used:
additionalProperties:
anyOf:
Expand All @@ -104,7 +99,7 @@ spec:
resource in the namespace.
type: object
required:
- quotaStatus
- result
type: object
type: array
required:
Expand Down

0 comments on commit 8fae3a8

Please sign in to comment.