Allow CloudProviders to wrap their CreateErrors to create a combined ConditionMessage with more detail
Example
err1 := cloudprovider.NewCreateError(fmt.Errorf("really really detailed error that I want to log"), "Pretty status message 1")
err2 := cloudprovider.NewCreateError(fmt.Errorf("another really really detailed error that I want to log, %w", err1), "Pretty status message 2")
fmt.Println(err2.ConditionMessage()) // prints "Pretty status message 2, Pretty status message 1"
How was this change tested?
make presubmit
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Needs approval from an approver in each of these files:
- ~~[OWNERS](https://github.com/kubernetes-sigs/karpenter/blob/main/OWNERS)~~ [jonathan-innis]
Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
Fixes #N/A
Description
Allow CloudProviders to wrap their CreateErrors to create a combined ConditionMessage with more detail
Example
How was this change tested?
make presubmit
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.