This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 5249e23b4201c0cf885207009665a2c95ff7c609 Author: Antonin Stefanutti <anto...@stefanutti.fr> AuthorDate: Tue Jun 1 11:07:16 2021 +0200 chore: Use controller-runtime client to update kit status --- pkg/trait/builder.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/trait/builder.go b/pkg/trait/builder.go index 29821e2..ba8e26f 100644 --- a/pkg/trait/builder.go +++ b/pkg/trait/builder.go @@ -23,7 +23,6 @@ import ( "strings" corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "github.com/apache/camel-k/pkg/apis/camel/v1" "github.com/apache/camel-k/pkg/builder" @@ -71,10 +70,9 @@ func (t *builderTrait) Apply(e *Environment) error { e.IntegrationKit.Status.Phase = v1.IntegrationKitPhaseError e.IntegrationKit.Status.SetCondition("IntegrationKitPropertiesFormatValid", corev1.ConditionFalse, "IntegrationKitPropertiesFormatValid", fmt.Sprintf("One or more properties where not formatted as expected: %s", err.Error())) - if _, err := e.Client.CamelV1().IntegrationKits(e.IntegrationKit.Namespace).UpdateStatus(e.C, e.IntegrationKit, metav1.UpdateOptions{}); err != nil { + if err := e.Client.Status().Update(e.C, e.IntegrationKit); err != nil { return err } - return nil }