diff --git a/api/litmuschaos/v1alpha1/chaosengine_types.go b/api/litmuschaos/v1alpha1/chaosengine_types.go index 273fd867..69622d1d 100644 --- a/api/litmuschaos/v1alpha1/chaosengine_types.go +++ b/api/litmuschaos/v1alpha1/chaosengine_types.go @@ -302,6 +302,8 @@ type SourceDetails struct { Privileged bool `json:"privileged,omitempty"` // NodeSelector for the source pod NodeSelector map[string]string `json:"nodeSelector,omitempty"` + // Tolerations for the source pod + Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // Volumes for the source pod Volumes []corev1.Volume `json:"volumes,omitempty"` // VolumesMount for the source pod diff --git a/api/litmuschaos/v1alpha1/zz_generated.deepcopy.go b/api/litmuschaos/v1alpha1/zz_generated.deepcopy.go index d9595390..abbf0fb1 100644 --- a/api/litmuschaos/v1alpha1/zz_generated.deepcopy.go +++ b/api/litmuschaos/v1alpha1/zz_generated.deepcopy.go @@ -1136,6 +1136,13 @@ func (in *SourceDetails) DeepCopyInto(out *SourceDetails) { (*out)[key] = val } } + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]v1.Toleration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Volumes != nil { in, out := &in.Volumes, &out.Volumes *out = make([]v1.Volume, len(*in)) diff --git a/deploy/chaos_crds.yaml b/deploy/chaos_crds.yaml index fbc9487a..8f6ff82e 100644 --- a/deploy/chaos_crds.yaml +++ b/deploy/chaos_crds.yaml @@ -576,6 +576,29 @@ spec: type: string description: NodeSelector for the source pod type: object + tolerations: + description: Tolerations for the source pod + items: + description: The pod with this Toleration tolerates any taint matches the using the matching operator . + properties: + effect: + description: Effect to match. Empty means all effects. + type: string + key: + description: Taint key the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists. + type: string + operator: + description: Operators are Exists or Equal. Defaults to Equal. + type: string + tolerationSeconds: + description: Period of time the toleration tolerates the taint. + format: int64 + type: integer + value: + description: If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array privileged: description: Privileged for the source pod type: boolean diff --git a/deploy/crds/chaosengine_crd.yaml b/deploy/crds/chaosengine_crd.yaml index 1f6ced39..3bcc9fc3 100644 --- a/deploy/crds/chaosengine_crd.yaml +++ b/deploy/crds/chaosengine_crd.yaml @@ -575,6 +575,29 @@ spec: type: string description: NodeSelector for the source pod type: object + tolerations: + description: Tolerations for the source pod + items: + description: The pod with this Toleration tolerates any taint matches the using the matching operator . + properties: + effect: + description: Effect to match. Empty means all effects. + type: string + key: + description: Taint key the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists. + type: string + operator: + description: Operators are Exists or Equal. Defaults to Equal. + type: string + tolerationSeconds: + description: Period of time the toleration tolerates the taint. + format: int64 + type: integer + value: + description: If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array privileged: description: Privileged for the source pod type: boolean