Skip to content

Commit

Permalink
Change quota management API group version to v1alpha1
Browse files Browse the repository at this point in the history
  • Loading branch information
astefanutti authored and openshift-merge-robot committed Sep 26, 2023
1 parent 0d1a39e commit 8c4c3f0
Show file tree
Hide file tree
Showing 43 changed files with 312 additions and 185 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ verify-tag-name: print-global-variables
t=${TAG} && [ $${#t} -le 128 ] || { echo "Target name $$t has 128 or more chars"; false; }
.PHONY: generate-client ## Generate client packages
generate-client: code-generator
rm -rf pkg/client/applyconfiguration pkg/client/clientset/versioned pkg/client/informers/externalversions pkg/client/listers/controller/v1beta1 pkg/client/listers/quotasubtree/v1
rm -rf pkg/client/applyconfiguration pkg/client/clientset/versioned pkg/client/informers/externalversions pkg/client/listers/controller/v1beta1 pkg/client/listers/quotasubtree/v1alpha1
$(APPLYCONFIGURATION_GEN) \
--input-dirs="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/apis/controller/v1beta1" \
--go-header-file="hack/boilerplate/boilerplate.go.txt" \
--output-package="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/client/applyconfiguration" \
--trim-path-prefix "github.com/project-codeflare/multi-cluster-app-dispatcher"
$(CLIENT_GEN) \
--input="pkg/apis/controller/v1beta1" \
--input="pkg/apis/quotaplugins/quotasubtree/v1" \
--input="pkg/apis/quotaplugins/quotasubtree/v1alpha1" \
--input-base="github.com/project-codeflare/multi-cluster-app-dispatcher" \
--go-header-file="hack/boilerplate/boilerplate.go.txt" \
--clientset-name "versioned" \
Expand All @@ -86,14 +86,14 @@ generate-client: code-generator
--trim-path-prefix "github.com/project-codeflare/multi-cluster-app-dispatcher"
$(LISTER_GEN) \
--input-dirs="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/apis/controller/v1beta1" \
--input-dirs="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/apis/quotaplugins/quotasubtree/v1" \
--input-dirs="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/apis/quotaplugins/quotasubtree/v1alpha1" \
--go-header-file="hack/boilerplate/boilerplate.go.txt" \
--output-base="." \
--output-package="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/client/listers" \
--trim-path-prefix "github.com/project-codeflare/multi-cluster-app-dispatcher"
$(INFORMER_GEN) \
--input-dirs="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/apis/controller/v1beta1" \
--input-dirs="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/apis/quotaplugins/quotasubtree/v1" \
--input-dirs="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/apis/quotaplugins/quotasubtree/v1alpha1" \
--versioned-clientset-package="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/client/clientset/versioned" \
--listers-package="github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/client/listers" \
--go-header-file="hack/boilerplate/boilerplate.go.txt" \
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/quota.codeflare.dev_quotasubtrees.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
singular: quotasubtree
scope: Namespaced
versions:
- name: v1
- name: v1alpha1
schema:
openAPIV3Schema:
description: QuotaSubtree is a specification for a quota subtree resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
singular: quotasubtree
scope: Namespaced
versions:
- name: v1
- name: v1alpha1
schema:
openAPIV3Schema:
description: QuotaSubtree is a specification for a quota subtree resource
Expand Down
6 changes: 3 additions & 3 deletions doc/usage/quota_management/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ One of the key features of quota trees is the hardLimit attribute, which determi
from its siblings or not. A sibling is another child node that shares the same parent node. If a quota has hardLimit set
to true, then it can only use the resources defined in its specification. If a quota has hardLimit set to false, then it
can use any unused resources from its siblings, as long as it does not violate the parent node’s limits. However, if an
object is defined which neccesitates borrowing from a sibling node, then if another kubernetes object is created which
object is defined which necessitates borrowing from a sibling node, then if another kubernetes object is created which
uses the borrowees quota (and is within the borrowees limit) then the borrower will be preempted to free these
resources.

Expand All @@ -21,7 +21,7 @@ optimize resource utilization, avoid resource starvation, and ensure quality of
## Example QuotaSubtree

```yaml
apiVersion: quota.codeflare.dev/v1
apiVersion: quota.codeflare.dev/v1alpha1
kind: QuotaSubtree
metadata:
name: context-root
Expand All @@ -37,7 +37,7 @@ spec:
cpu: 2000m
memory: 8000Mi
---
apiVersion: quota.codeflare.dev/v1
apiVersion: quota.codeflare.dev/v1alpha1
kind: QuotaSubtree
metadata:
name: context-root-children
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ limitations under the License.
// +kubebuilder:object:generate=true
// +groupName=quota.codeflare.dev

package v1
package v1alpha1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1
package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -16,7 +16,7 @@ const (
GroupName = "quota.codeflare.dev"

// GroupVersion is the version of scheduling group
GroupVersion = "v1"
GroupVersion = "v1alpha1"
)

// SchemeGroupVersion is the group version used to register these objects.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package v1
package v1alpha1

/*
Copyright 2022 The Multi-Cluster App Dispatcher Authors.
Expand Down Expand Up @@ -54,10 +55,10 @@ type QuotaSubtreeSpec struct {

// Child is the spec for a QuotaSubtree resource
type Child struct {
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"`
Quotas Quota `json:"quotas,omitempty" protobuf:"bytes,4,opt,name=quotas"`
Path string `json:"path,omitempty" protobuf:"bytes,5,opt,name=path"`
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"`
Quotas Quota `json:"quotas,omitempty" protobuf:"bytes,4,opt,name=quotas"`
Path string `json:"path,omitempty" protobuf:"bytes,5,opt,name=path"`
}

// Quota is the spec for a QuotaSubtree resource
Expand Down

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

16 changes: 8 additions & 8 deletions pkg/client/clientset/versioned/clientset.go

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

10 changes: 5 additions & 5 deletions pkg/client/clientset/versioned/fake/clientset_generated.go

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

4 changes: 2 additions & 2 deletions pkg/client/clientset/versioned/fake/register.go

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

4 changes: 2 additions & 2 deletions pkg/client/clientset/versioned/scheme/register.go

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

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

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

Loading

0 comments on commit 8c4c3f0

Please sign in to comment.