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

Rename preset to variant #368

Merged
merged 1 commit into from
Sep 29, 2023
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
8 changes: 8 additions & 0 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: 9 additions & 0 deletions apis/management/v1alpha1/projectquota_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,20 @@ type ProjectQuotaStatus struct {

type ResourceQuotaStatus struct {
ResourceQuotaSpec `json:",inline"`
Result QuotaResult `json:"result"`
// Used is the current observed total usage of the resource in the namespace.
// +optional
Used core.ResourceList `json:"used,omitempty"`
}

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

const (
ResultSuccess QuotaResult = "Success"
ResultError QuotaResult = "Error"
)

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true

Expand Down
2 changes: 1 addition & 1 deletion apis/meta/v1alpha1/openapi_generated.go

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

2 changes: 1 addition & 1 deletion apis/meta/v1alpha1/ui_menu_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type MenuItem struct {
Icons []helmshared.ImageSpec `json:"icons,omitempty"`
Installer *shared.DeploymentParameters `json:"installer,omitempty"`
// +optional
Preset string `json:"preset,omitempty"`
Variant string `json:"variant,omitempty"`
// +optional
AvailableVariants int `json:"availableVariants,omitempty"`
// +optional
Expand Down
7 changes: 7 additions & 0 deletions crds/management.k8s.appscode.com_projectquotas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ spec:
type: object
kind:
type: string
result:
enum:
- Success
- Error
type: string
used:
additionalProperties:
anyOf:
Expand All @@ -91,6 +96,8 @@ spec:
description: Used is the current observed total usage of the
resource in the namespace.
type: object
required:
- result
type: object
type: array
required:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ require (
sigs.k8s.io/cli-utils v0.34.0
sigs.k8s.io/controller-runtime v0.13.1
sigs.k8s.io/yaml v1.3.0
x-helm.dev/apimachinery v0.0.11
x-helm.dev/apimachinery v0.0.12
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -754,5 +754,5 @@ sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kF
sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
x-helm.dev/apimachinery v0.0.11 h1:tUrxsKeRT84UCw+hHuV7isheWCv9yoS8m8lwWacVkZ4=
x-helm.dev/apimachinery v0.0.11/go.mod h1:jjkebU6uv/cS/8pQGE8tbgK/rB39yh4ETiAglPbDWZc=
x-helm.dev/apimachinery v0.0.12 h1:lEuGH5F+6xqL7/uL+SsoOUXeJZFgC8c2OQgtMMj/fQM=
x-helm.dev/apimachinery v0.0.12/go.mod h1:jjkebU6uv/cS/8pQGE8tbgK/rB39yh4ETiAglPbDWZc=
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ sigs.k8s.io/structured-merge-diff/v4/value
# sigs.k8s.io/yaml v1.3.0
## explicit; go 1.12
sigs.k8s.io/yaml
# x-helm.dev/apimachinery v0.0.11
# x-helm.dev/apimachinery v0.0.12
## explicit; go 1.19
x-helm.dev/apimachinery/apis/charts/v1alpha1
x-helm.dev/apimachinery/apis/releases/v1alpha1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ type ChartPresetFlatRef struct {
releasesv1alpha1.ChartSourceFlatRef `json:",inline"`

// Editor GVR
Group string `json:"group,omitempty"`
Resource string `json:"resource,omitempty"`
Kind string `json:"kind,omitempty"`
PresetName string `json:"presetName,omitempty"`
Namespace string `json:"namespace,omitempty"`
Group string `json:"group,omitempty"`
Resource string `json:"resource,omitempty"`
Kind string `json:"kind,omitempty"`
Variant string `json:"variant,omitempty"`
Namespace string `json:"namespace,omitempty"`
}

type ChartPresetValues struct {
Expand Down
Loading