Skip to content

Commit

Permalink
Amend CRD structs (#69)
Browse files Browse the repository at this point in the history
* update CRDs

* fix CRD structs
  • Loading branch information
AVSuni authored Jan 31, 2025
1 parent 3a01889 commit 46a8118
Show file tree
Hide file tree
Showing 22 changed files with 1,997 additions and 94 deletions.
9 changes: 9 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,13 @@ resources:
kind: KaiwoService
path: github.com/silogen/kaiwo/pkg/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1alpha1
namespaced: true
controller: true
domain: silogen.ai
group: kaiwo
kind: KaiwoQueueConfig
path: github.com/silogen/kaiwo/pkg/api/v1alpha1
version: v1alpha1
version: "3"
7 changes: 7 additions & 0 deletions cmd/operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "KaiwoService")
os.Exit(1)
}
if err = (&controller.KaiwoQueueConfigReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "KaiwoQueueConfig")
os.Exit(1)
}
// +kubebuilder:scaffold:builder

if metricsCertWatcher != nil {
Expand Down
568 changes: 561 additions & 7 deletions config/crd/bases/kaiwo.silogen.ai_kaiwojobs.yaml

Large diffs are not rendered by default.

175 changes: 162 additions & 13 deletions config/crd/bases/kaiwo.silogen.ai_kaiwoqueueconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,168 @@ spec:
spec:
description: KaiwoQueueConfigSpec defines the desired state of KaiwoQueueConfig.
properties:
clusterQueueName:
type: string
priorityClasses:
additionalProperties:
format: int32
type: integer
type: object
quotas:
additionalProperties:
type: string
type: object
required:
- clusterQueueName
clusterQueues:
items:
description: ClusterQueueSpec represents the configuration of a
ClusterQueue.
properties:
name:
type: string
namespaceSelector:
additionalProperties:
type: string
type: object
resourceGroups:
items:
description: ResourceGroup defines a group of covered resources
and their available flavors.
properties:
coveredResources:
items:
type: string
type: array
flavors:
items:
description: FlavorResourceQuota maps a flavor to a
set of resource quotas.
properties:
name:
type: string
resources:
items:
description: ResourceQuota represents the quota
for a specific resource.
properties:
nominalQuota:
type: string
resourceName:
type: string
required:
- nominalQuota
- resourceName
type: object
type: array
required:
- name
- resources
type: object
type: array
required:
- coveredResources
- flavors
type: object
type: array
required:
- name
- resourceGroups
type: object
type: array
resourceFlavors:
items:
description: ResourceFlavorSpec represents the configuration for
a ResourceFlavor.
properties:
name:
type: string
nodeLabels:
additionalProperties:
type: string
type: object
taints:
description: Taints applied to nodes with this flavor
items:
description: |-
The node this Taint is attached to has the "effect" on
any pod that does not tolerate the Taint.
properties:
effect:
description: |-
Required. The effect of the taint on pods
that do not tolerate the taint.
Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
type: string
key:
description: Required. The taint key to be applied to
a node.
type: string
timeAdded:
description: |-
TimeAdded represents the time at which the taint was added.
It is only written for NoExecute taints.
format: date-time
type: string
value:
description: The taint value corresponding to the taint
key.
type: string
required:
- effect
- key
type: object
type: array
tolerations:
description: Tolerations for workloads that should be scheduled
on nodes with this flavor
items:
description: |-
The pod this Toleration is attached to tolerates any taint that matches
the triple <key,value,effect> using the matching operator <operator>.
properties:
effect:
description: |-
Effect indicates the taint effect to match. Empty means match all taint effects.
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
type: string
key:
description: |-
Key is the taint key that the toleration applies to. Empty means match all taint keys.
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
type: string
operator:
description: |-
Operator represents a key's relationship to the value.
Valid operators are Exists and Equal. Defaults to Equal.
Exists is equivalent to wildcard for value, so that a pod can
tolerate all taints of a particular category.
type: string
tolerationSeconds:
description: |-
TolerationSeconds represents the period of time the toleration (which must be
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
it is not set, which means tolerate the taint forever (do not evict). Zero and
negative values will be treated as 0 (evict immediately) by the system.
format: int64
type: integer
value:
description: |-
Value is the taint value the toleration matches to.
If the operator is Exists, the value should be empty, otherwise just a regular string.
type: string
type: object
type: array
required:
- name
- nodeLabels
type: object
type: array
workloadPriorityClasses:
items:
description: WorkloadPriorityClassSpec represents the configuration
for a WorkloadPriorityClass.
properties:
description:
type: string
name:
type: string
value:
format: int32
type: integer
required:
- description
- name
- value
type: object
type: array
type: object
status:
description: KaiwoQueueConfigStatus defines the observed state of KaiwoQueueConfig.
Expand Down
Loading

0 comments on commit 46a8118

Please sign in to comment.