Skip to content

Commit a1801ed

Browse files
committed
Add OverrideScheduling field to CertManager CRD
1 parent 6ab8b4c commit a1801ed

File tree

4 files changed

+400
-0
lines changed

4 files changed

+400
-0
lines changed

Diff for: api/operator/v1alpha1/certmanager_types.go

+22
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ type DeploymentConfig struct {
8181
// +kubebuilder:validation:Optional
8282
// +optional
8383
OverrideResources CertManagerResourceRequirements `json:"overrideResources,omitempty"`
84+
85+
// +kubebuilder:validation:Optional
86+
// +optional
87+
OverrideScheduling CertManagerScheduling `json:"overrideScheduling,omitempty"`
8488
}
8589

8690
// CertManagerResourceRequirements describes the compute resource requirements for the cert-manager operands,
@@ -98,6 +102,24 @@ type CertManagerResourceRequirements struct {
98102
Requests corev1.ResourceList `json:"requests,omitempty" protobuf:"bytes,2,rep,name=requests,casttype=ResourceList,castkey=ResourceName"`
99103
}
100104

105+
// CertManagerScheduling describes the scheduling configurations for the cert-manager operands,
106+
// namely the controller, webhook and cainjector.
107+
type CertManagerScheduling struct {
108+
// NodeSelector is a selector which must be true for the pod to fit on a node.
109+
// Selector which must match a node's labels for the pod to be scheduled on that node.
110+
// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
111+
// +optional
112+
// +mapType=atomic
113+
NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,7,rep,name=nodeSelector"`
114+
115+
// Tolerations are attached to the pod to tolerate any taint that matches the
116+
// taint's key, value and effect using the toleration's matching operator.
117+
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
118+
// +optional
119+
// +listType=atomic
120+
Tolerations []corev1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"`
121+
}
122+
101123
// CertManagerStatus defines the observed state of CertManager
102124
type CertManagerStatus struct {
103125
apiv1.OperatorStatus `json:",inline"`

Diff for: api/operator/v1alpha1/zz_generated.deepcopy.go

+30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: bundle/manifests/operator.openshift.io_certmanagers.yaml

+174
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,64 @@ spec:
213213
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
214214
type: object
215215
type: object
216+
overrideScheduling:
217+
description: |-
218+
CertManagerScheduling describes the scheduling configurations for the cert-manager operands,
219+
namely the controller, webhook and cainjector.
220+
properties:
221+
nodeSelector:
222+
additionalProperties:
223+
type: string
224+
description: |-
225+
NodeSelector is a selector which must be true for the pod to fit on a node.
226+
Selector which must match a node's labels for the pod to be scheduled on that node.
227+
More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
228+
type: object
229+
x-kubernetes-map-type: atomic
230+
tolerations:
231+
description: |-
232+
Tolerations are attached to the pod to tolerate any taint that matches the
233+
taint's key, value and effect using the toleration's matching operator.
234+
More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
235+
items:
236+
description: |-
237+
The pod this Toleration is attached to tolerates any taint that matches
238+
the triple <key,value,effect> using the matching operator <operator>.
239+
properties:
240+
effect:
241+
description: |-
242+
Effect indicates the taint effect to match. Empty means match all taint effects.
243+
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
244+
type: string
245+
key:
246+
description: |-
247+
Key is the taint key that the toleration applies to. Empty means match all taint keys.
248+
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
249+
type: string
250+
operator:
251+
description: |-
252+
Operator represents a key's relationship to the value.
253+
Valid operators are Exists and Equal. Defaults to Equal.
254+
Exists is equivalent to wildcard for value, so that a pod can
255+
tolerate all taints of a particular category.
256+
type: string
257+
tolerationSeconds:
258+
description: |-
259+
TolerationSeconds represents the period of time the toleration (which must be
260+
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
261+
it is not set, which means tolerate the taint forever (do not evict). Zero and
262+
negative values will be treated as 0 (evict immediately) by the system.
263+
format: int64
264+
type: integer
265+
value:
266+
description: |-
267+
Value is the taint value the toleration matches to.
268+
If the operator is Exists, the value should be empty, otherwise just a regular string.
269+
type: string
270+
type: object
271+
type: array
272+
x-kubernetes-list-type: atomic
273+
type: object
216274
type: object
217275
controllerConfig:
218276
description: |-
@@ -398,6 +456,64 @@ spec:
398456
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
399457
type: object
400458
type: object
459+
overrideScheduling:
460+
description: |-
461+
CertManagerScheduling describes the scheduling configurations for the cert-manager operands,
462+
namely the controller, webhook and cainjector.
463+
properties:
464+
nodeSelector:
465+
additionalProperties:
466+
type: string
467+
description: |-
468+
NodeSelector is a selector which must be true for the pod to fit on a node.
469+
Selector which must match a node's labels for the pod to be scheduled on that node.
470+
More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
471+
type: object
472+
x-kubernetes-map-type: atomic
473+
tolerations:
474+
description: |-
475+
Tolerations are attached to the pod to tolerate any taint that matches the
476+
taint's key, value and effect using the toleration's matching operator.
477+
More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
478+
items:
479+
description: |-
480+
The pod this Toleration is attached to tolerates any taint that matches
481+
the triple <key,value,effect> using the matching operator <operator>.
482+
properties:
483+
effect:
484+
description: |-
485+
Effect indicates the taint effect to match. Empty means match all taint effects.
486+
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
487+
type: string
488+
key:
489+
description: |-
490+
Key is the taint key that the toleration applies to. Empty means match all taint keys.
491+
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
492+
type: string
493+
operator:
494+
description: |-
495+
Operator represents a key's relationship to the value.
496+
Valid operators are Exists and Equal. Defaults to Equal.
497+
Exists is equivalent to wildcard for value, so that a pod can
498+
tolerate all taints of a particular category.
499+
type: string
500+
tolerationSeconds:
501+
description: |-
502+
TolerationSeconds represents the period of time the toleration (which must be
503+
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
504+
it is not set, which means tolerate the taint forever (do not evict). Zero and
505+
negative values will be treated as 0 (evict immediately) by the system.
506+
format: int64
507+
type: integer
508+
value:
509+
description: |-
510+
Value is the taint value the toleration matches to.
511+
If the operator is Exists, the value should be empty, otherwise just a regular string.
512+
type: string
513+
type: object
514+
type: array
515+
x-kubernetes-list-type: atomic
516+
type: object
401517
type: object
402518
logLevel:
403519
default: Normal
@@ -629,6 +745,64 @@ spec:
629745
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
630746
type: object
631747
type: object
748+
overrideScheduling:
749+
description: |-
750+
CertManagerScheduling describes the scheduling configurations for the cert-manager operands,
751+
namely the controller, webhook and cainjector.
752+
properties:
753+
nodeSelector:
754+
additionalProperties:
755+
type: string
756+
description: |-
757+
NodeSelector is a selector which must be true for the pod to fit on a node.
758+
Selector which must match a node's labels for the pod to be scheduled on that node.
759+
More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
760+
type: object
761+
x-kubernetes-map-type: atomic
762+
tolerations:
763+
description: |-
764+
Tolerations are attached to the pod to tolerate any taint that matches the
765+
taint's key, value and effect using the toleration's matching operator.
766+
More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
767+
items:
768+
description: |-
769+
The pod this Toleration is attached to tolerates any taint that matches
770+
the triple <key,value,effect> using the matching operator <operator>.
771+
properties:
772+
effect:
773+
description: |-
774+
Effect indicates the taint effect to match. Empty means match all taint effects.
775+
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
776+
type: string
777+
key:
778+
description: |-
779+
Key is the taint key that the toleration applies to. Empty means match all taint keys.
780+
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
781+
type: string
782+
operator:
783+
description: |-
784+
Operator represents a key's relationship to the value.
785+
Valid operators are Exists and Equal. Defaults to Equal.
786+
Exists is equivalent to wildcard for value, so that a pod can
787+
tolerate all taints of a particular category.
788+
type: string
789+
tolerationSeconds:
790+
description: |-
791+
TolerationSeconds represents the period of time the toleration (which must be
792+
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
793+
it is not set, which means tolerate the taint forever (do not evict). Zero and
794+
negative values will be treated as 0 (evict immediately) by the system.
795+
format: int64
796+
type: integer
797+
value:
798+
description: |-
799+
Value is the taint value the toleration matches to.
800+
If the operator is Exists, the value should be empty, otherwise just a regular string.
801+
type: string
802+
type: object
803+
type: array
804+
x-kubernetes-list-type: atomic
805+
type: object
632806
type: object
633807
type: object
634808
status:

0 commit comments

Comments
 (0)