This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit e2469217b6416f69deacca8686ea5817944d7402 Author: Antonin Stefanutti <[email protected]> AuthorDate: Mon Mar 15 12:03:47 2021 +0100 chore(doc): Polish toleration trait documentation --- docs/modules/traits/pages/toleration.adoc | 12 +++++++----- pkg/trait/toleration.go | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/modules/traits/pages/toleration.adoc b/docs/modules/traits/pages/toleration.adoc index 906745b..07f8cb9 100755 --- a/docs/modules/traits/pages/toleration.adoc +++ b/docs/modules/traits/pages/toleration.adoc @@ -4,11 +4,13 @@ This trait sets Tolerations over Integration pods. Tolerations allow (but do not require) the pods to schedule onto nodes with matching taints. See https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ for more details. -The toleration should be expressed in a similar manner of taints *_Key[=Value]:Effect[:Seconds]_* where values in square brackets are optional. Examples: +The toleration should be expressed in a similar manner that of taints, i.e., `Key[=Value]:Effect[:Seconds]`, where values in square brackets are optional. -node-role.kubernetes.io/master:NoSchedule -node.kubernetes.io/network-unavailable:NoExecute:3000 -disktype=ssd:PreferNoSchedule +For examples: + +- `node-role.kubernetes.io/master:NoSchedule` +- `node.kubernetes.io/network-unavailable:NoExecute:3000` +- `disktype=ssd:PreferNoSchedule` It's disabled by default. @@ -36,7 +38,7 @@ The following configuration options are available: | toleration.taints | []string -| The taint to tolerate in the form Key[=Value]:Effect[:Seconds] +| The list of taints to tolerate, in the form `Key[=Value]:Effect[:Seconds]` |=== diff --git a/pkg/trait/toleration.go b/pkg/trait/toleration.go index 80dc69e..c62bb7a 100644 --- a/pkg/trait/toleration.go +++ b/pkg/trait/toleration.go @@ -31,18 +31,20 @@ import ( // This trait sets Tolerations over Integration pods. Tolerations allow (but do not require) the pods to schedule onto nodes with matching taints. // See https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ for more details. // -// The toleration should be expressed in a similar manner of taints *_Key[=Value]:Effect[:Seconds]_* where values in square brackets are optional. Examples: +// The toleration should be expressed in a similar manner that of taints, i.e., `Key[=Value]:Effect[:Seconds]`, where values in square brackets are optional. // -// node-role.kubernetes.io/master:NoSchedule -// node.kubernetes.io/network-unavailable:NoExecute:3000 -// disktype=ssd:PreferNoSchedule +// For examples: +// +// - `node-role.kubernetes.io/master:NoSchedule` +// - `node.kubernetes.io/network-unavailable:NoExecute:3000` +// - `disktype=ssd:PreferNoSchedule` // // It's disabled by default. // // +camel-k:trait=toleration type tolerationTrait struct { BaseTrait `property:",squash"` - // The taint to tolerate in the form Key[=Value]:Effect[:Seconds] + // The list of taints to tolerate, in the form `Key[=Value]:Effect[:Seconds]` Taints []string `property:"taints" json:"taints,omitempty"` }
