Skip to content

Commit

Permalink
Merge pull request k8stopologyawareschedwg#152 from ffromani/update-a…
Browse files Browse the repository at this point in the history
…pi-v1a2

deps: update the stack to NRT API v1alpha2
  • Loading branch information
ffromani authored Mar 16, 2023
2 parents 413facc + 5834ba9 commit c858eb7
Show file tree
Hide file tree
Showing 4 changed files with 183 additions and 15 deletions.
20 changes: 20 additions & 0 deletions doc/examples/pod.defsched.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Pod
metadata:
generateName: defsched-pod-
spec:
containers:
- name: numalign
image: quay.io/fromani/numalign
imagePullPolicy: IfNotPresent
command: ["/usr/local/bin/numalign"]
env:
- name: NUMALIGN_SLEEP_HOURS
value: "127"
resources:
limits:
cpu: 1
memory: 256Mi
requests:
cpu: 1
memory: 256Mi
21 changes: 21 additions & 0 deletions doc/examples/pod.numalign.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: Pod
metadata:
generateName: numalign-pod-
spec:
schedulerName: topology-aware-scheduler
containers:
- name: numalign
image: quay.io/fromani/numalign
imagePullPolicy: IfNotPresent
command: ["/usr/local/bin/numalign"]
env:
- name: NUMALIGN_SLEEP_HOURS
value: "127"
resources:
limits:
cpu: 1
memory: 256Mi
requests:
cpu: 1
memory: 256Mi
16 changes: 8 additions & 8 deletions pkg/images/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
package images

const (
SchedulerPluginSchedulerDefaultImageTag = "registry.k8s.io/scheduler-plugins/kube-scheduler:v0.24.9"
SchedulerPluginControllerDefaultImageTag = "registry.k8s.io/scheduler-plugins/controller:v0.24.9"
NodeFeatureDiscoveryDefaultImageTag = "registry.k8s.io/nfd/node-feature-discovery:v0.12.0"
ResourceTopologyExporterDefaultImageTag = "quay.io/k8stopologyawareschedwg/resource-topology-exporter:v0.9.0"
SchedulerPluginSchedulerDefaultImageTag = "quay.io/k8stopologyawareschedwg/scheduler-plugins-kube-scheduler:v0.0.2023031503"
SchedulerPluginControllerDefaultImageTag = "quay.io/k8stopologyawareschedwg/scheduler-plugins-controller:v0.0.2023031503"
NodeFeatureDiscoveryDefaultImageTag = "quay.io/k8stopologyawareschedwg/node-feature-discovery:v0.0.2023031605"
ResourceTopologyExporterDefaultImageTag = "quay.io/k8stopologyawareschedwg/resource-topology-exporter:v0.10.1"
)

const (
SchedulerPluginSchedulerDefaultImageSHA = "registry.k8s.io/scheduler-plugins/kube-scheduler@sha256:7e5681d6ee55da2a371111401fafd1ba371df83c4f1da088a0a7b20a2951eb72"
SchedulerPluginControllerDefaultImageSHA = "registry.k8s.io/scheduler-plugins/controller@sha256:28ade406054565a06a7585acd839c420e1a0b8969f5bbe81ca7f0d97a4a483f3"
NodeFeatureDiscoveryDefaultImageSHA = "registry.k8s.io/nfd/node-feature-discovery@sha256:c116b6498cc3281342b74e22eeb9e98b58f902dac90360c2abdeb2baa485e8c3"
ResourceTopologyExporterDefaultImageSHA = "quay.io/k8stopologyawareschedwg/resource-topology-exporter@sha256:fe556f871ceec7497e6216b08719d3aab1643ee465b78590e36e0357a7ce07d3"
SchedulerPluginSchedulerDefaultImageSHA = "quay.io/k8stopologyawareschedwg/scheduler-plugins-kube-scheduler@sha256:7c75900ae5eb94f7d8ea89e2fc640a03731b2f17960e23cdf50ea99258b0beeb"
SchedulerPluginControllerDefaultImageSHA = "quay.io/k8stopologyawareschedwg/scheduler-plugins-controller@sha256:ac030bb933bfe0c9b11a0192bd81d1bb2d27e80f9dc356c69f865d9395bfe007"
NodeFeatureDiscoveryDefaultImageSHA = "quay.io/k8stopologyawareschedwg/node-feature-discovery@sha256:984c9b12ff32bab1716da12d898d058c57b932dcc38b42ebc16234a26cb234aa"
ResourceTopologyExporterDefaultImageSHA = "quay.io/k8stopologyawareschedwg/resource-topology-exporter@sha256:633b1975b746238a9a3ec5b5db5eaac046dac2189508068810978cd323de94f5"
)
141 changes: 134 additions & 7 deletions pkg/manifests/yaml/api/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
api-approved.kubernetes.io: https://github.com/kubernetes/enhancements/pull/1870
controller-gen.kubebuilder.io/version: v0.7.0
controller-gen.kubebuilder.io/version: v0.11.2
creationTimestamp: null
name: noderesourcetopologies.topology.node.k8s.io
spec:
Expand Down Expand Up @@ -134,10 +134,137 @@ spec:
- zones
type: object
served: true
storage: false
- name: v1alpha2
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
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
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:
description: 'DEPRECATED (to be removed in v1beta1): use top level attributes
if needed'
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:
- zones
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

0 comments on commit c858eb7

Please sign in to comment.