Skip to content

Commit

Permalink
Merge pull request #255 from yevgeny-shnaidman/yevgeny/add-toleration…
Browse files Browse the repository at this point in the history
…s-crd

Adding Tolerations fields to the NFD CRD
  • Loading branch information
k8s-ci-robot authored Mar 2, 2025
2 parents 943c7e4 + a2ae7a5 commit c8185e1
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 1 deletion.
6 changes: 6 additions & 0 deletions api/v1/nodefeaturediscovery_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ type OperandSpec struct {
// listens for incoming requests.
// +kubebuilder:validation:Optional
ServicePort int `json:"servicePort"`

// WorkerTolerations defines tolerations to be applied to the worker Daemonset
WorkerTolerations []corev1.Toleration `json:"workerTolerations,omitempty"`

// MasterTolerations defines tolerations to be applied to the master deployment
MasterTolerations []corev1.Toleration `json:"masterTolerations,omitempty"`
}

// ConfigMap describes configuration options for the NFD worker
Expand Down
17 changes: 16 additions & 1 deletion api/v1/zz_generated.deepcopy.go

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

84 changes: 84 additions & 0 deletions config/crd/bases/nfd.kubernetes.io_nodefeaturediscoveries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,94 @@ spec:
description: ImagePullPolicy defines Image pull policy for the
NFD operand image [defaults to Always]
type: string
masterTolerations:
description: MasterTolerations defines tolerations to be applied
to the master deployment
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
servicePort:
description: ServicePort specifies the TCP port that nfd-master
listens for incoming requests.
type: integer
workerTolerations:
description: WorkerTolerations defines tolerations to be applied
to the worker Daemonset
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
type: object
prunerOnDelete:
description: PruneOnDelete defines whether the NFD-master prune should
Expand Down

0 comments on commit c8185e1

Please sign in to comment.