Skip to content

Commit

Permalink
Capacity -> Allcatable in NodeTopology
Browse files Browse the repository at this point in the history
Signed-off-by: Arnob kumar saha <[email protected]>
  • Loading branch information
ArnobKumarSaha authored and tamalsaha committed Dec 25, 2023
1 parent f9e0093 commit 4ae6613
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 21 deletions.
7 changes: 3 additions & 4 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.

7 changes: 3 additions & 4 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.

2 changes: 2 additions & 0 deletions apis/node/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ package node
const (
GroupName = "node.k8s.appscode.com"
)


1 change: 1 addition & 0 deletions apis/node/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package install

import (

"kmodules.xyz/resource-metadata/apis/node/v1alpha1"

"k8s.io/apimachinery/pkg/runtime"
Expand Down
1 change: 1 addition & 0 deletions apis/node/install/roundtrip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package install
import (
"testing"


"k8s.io/apimachinery/pkg/api/apitesting/roundtrip"
)

Expand Down
2 changes: 2 additions & 0 deletions apis/node/v1alpha1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ limitations under the License.
// +k8s:defaulter-gen=TypeMeta
// +groupName=node.k8s.appscode.com
package v1alpha1


2 changes: 2 additions & 0 deletions apis/node/v1alpha1/nodetopology_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ limitations under the License.
package v1alpha1

import (

"kmodules.xyz/client-go/apiextensions"
"kmodules.xyz/resource-metadata/crds"

)

func (v NodeTopology) CustomResourceDefinition() *apiextensions.CustomResourceDefinition {
Expand Down
6 changes: 4 additions & 2 deletions apis/node/v1alpha1/nodetopology_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
package v1alpha1

import (


core "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down Expand Up @@ -52,9 +54,9 @@ type NodeTopologySpec struct {

type NodeGroup struct {
TopologyValue string `json:"topologyValue"`
// Capacity represents the total resources of a node.
// Allocatable represents the total resources of a node.
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
Capacity core.ResourceList `json:"capacity"`
Allocatable core.ResourceList `json:"allocatable"`
}

// +kubebuilder:validation:Enum=LabelSelector;Taint
Expand Down
8 changes: 5 additions & 3 deletions apis/node/v1alpha1/openapi_generated.go

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

1 change: 1 addition & 0 deletions apis/node/v1alpha1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package v1alpha1

import (

"kmodules.xyz/resource-metadata/apis/node"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
4 changes: 2 additions & 2 deletions apis/node/v1alpha1/zz_generated.deepcopy.go

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

3 changes: 1 addition & 2 deletions apis/ui/v1alpha1/zz_generated.deepcopy.go

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

8 changes: 4 additions & 4 deletions crds/node.k8s.appscode.com_nodetopologies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ spec:
nodeGroups:
items:
properties:
capacity:
allocatable:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Capacity represents the total resources of a node.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity'
description: 'Allocatable represents the total resources of
a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity'
type: object
topologyValue:
type: string
required:
- capacity
- allocatable
- topologyValue
type: object
type: array
Expand Down

0 comments on commit 4ae6613

Please sign in to comment.