From 6df5827f1276ac73d6feb38f5c94666f2e606459 Mon Sep 17 00:00:00 2001 From: Swati Sehgal Date: Mon, 13 Jun 2022 14:13:56 +0100 Subject: [PATCH] nrt-api: Add manifest directory for example manifests Signed-off-by: Swati Sehgal --- .../manifests/cr-instance-example.yaml | 40 +++++ .../manifests/crd.yaml | 145 ++++++++++++++++++ 2 files changed, 185 insertions(+) create mode 100644 staging/src/k8s.io/noderesourcetopology-api/manifests/cr-instance-example.yaml create mode 100644 staging/src/k8s.io/noderesourcetopology-api/manifests/crd.yaml diff --git a/staging/src/k8s.io/noderesourcetopology-api/manifests/cr-instance-example.yaml b/staging/src/k8s.io/noderesourcetopology-api/manifests/cr-instance-example.yaml new file mode 100644 index 00000000000..69611f4b48e --- /dev/null +++ b/staging/src/k8s.io/noderesourcetopology-api/manifests/cr-instance-example.yaml @@ -0,0 +1,40 @@ +--- +apiVersion: topology.node.k8s.io/v1alpha1 +kind: NodeResourceTopology +metadata: + name: node1 +topologyPolicies: + - SingleNUMANodePodLevel +Zones: + Name: node-0 + Type: NUMA + Costs: + Name: node-0 + Value: 10 + Name: node-1 + Value: 21 + Resources: + Name: memory + Allocatable: 48023056384 + Available: 48023056384 + Capacity: 49201655808 + Name: cpu + Allocatable: 51 + Available: 51 + Capacity: 52 + Name: node-1 + Type: NUMA + Costs: + Name: node-0 + Value: 21 + Name: node-1 + Value: 10 + Resources: + Name: cpu + Allocatable: 51 + Available: 51 + Capacity: 52 + Name: memory + Allocatable: 50683113472 + Available: 50683113472 + Capacity: 50683113472 diff --git a/staging/src/k8s.io/noderesourcetopology-api/manifests/crd.yaml b/staging/src/k8s.io/noderesourcetopology-api/manifests/crd.yaml new file mode 100644 index 00000000000..83658ee33a0 --- /dev/null +++ b/staging/src/k8s.io/noderesourcetopology-api/manifests/crd.yaml @@ -0,0 +1,145 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.kubernetes.io: https://github.com/kubernetes/enhancements/pull/1870 # edited manually + controller-gen.kubebuilder.io/version: v0.7.0 + creationTimestamp: null + name: noderesourcetopologies.topology.node.k8s.io +spec: + group: topology.node.k8s.io + names: + kind: NodeResourceTopology + listKind: NodeResourceTopologyList + plural: noderesourcetopologies + shortNames: + - node-res-topo + singular: noderesourcetopology + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: NodeResourceTopology describes node resources and their topology. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + topologyPolicies: + items: + type: string + type: array + zones: + description: ZoneList contains an array of Zone objects. + items: + description: Zone represents a resource topology zone, e.g. socket, + node, die or core. + properties: + attributes: + description: AttributeList contains an array of AttributeInfo objects. + items: + description: AttributeInfo contains one attribute of a Zone. + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + costs: + description: CostList contains an array of CostInfo objects. + items: + description: CostInfo describes the cost (or distance) between + two Zones. + properties: + name: + type: string + value: + format: int64 + type: integer + required: + - name + - value + type: object + type: array + name: + type: string + parent: + type: string + resources: + description: ResourceInfoList contains an array of ResourceInfo + objects. + items: + description: ResourceInfo contains information about one resource + type. + properties: + allocatable: + anyOf: + - type: integer + - type: string + description: Allocatable quantity of the resource, corresponding + to allocatable in node status, i.e. total amount of this + resource available to be used by pods. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + available: + anyOf: + - type: integer + - type: string + description: Available is the amount of this resource currently + available for new (to be scheduled) pods, i.e. Allocatable + minus the resources reserved by currently running pods. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + capacity: + anyOf: + - type: integer + - type: string + description: Capacity of the resource, corresponding to capacity + in node status, i.e. total amount of this resource that + the node has. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + name: + description: Name of the resource. + type: string + required: + - allocatable + - available + - capacity + - name + type: object + type: array + type: + type: string + required: + - name + - type + type: object + type: array + required: + - topologyPolicies + - zones + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: []