astefanutti commented on a change in pull request #2814:
URL: https://github.com/apache/camel-k/pull/2814#discussion_r764720227



##########
File path: pkg/install/kamelets.go
##########
@@ -19,30 +19,40 @@ package install
 
 import (
        "context"
+       "errors"
        "fmt"
-       "io/ioutil"
+       "io/fs"
+       "net/http"
        "os"
        "path"
+       "path/filepath"
        "strings"
 
-       "github.com/apache/camel-k/pkg/util"
+       "golang.org/x/sync/errgroup"
 
-       "github.com/pkg/errors"
        k8serrors "k8s.io/apimachinery/pkg/api/errors"
+       "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+       "k8s.io/apimachinery/pkg/runtime"
        "k8s.io/apimachinery/pkg/types"
 
+       ctrl "sigs.k8s.io/controller-runtime/pkg/client"
+
        "github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
        "github.com/apache/camel-k/pkg/client"
+       "github.com/apache/camel-k/pkg/util"
        "github.com/apache/camel-k/pkg/util/defaults"
        "github.com/apache/camel-k/pkg/util/kubernetes"
+       "github.com/apache/camel-k/pkg/util/patch"
 )
 
 const (
        kameletDirEnv     = "KAMELET_CATALOG_DIR"
        defaultKameletDir = "/kamelets/"
 )
 
-// KameletCatalog installs the bundled KameletCatalog into one namespace.
+var hasServerSideApply = true

Review comment:
       It should be set the first time by the main goroutine only. Even if this 
races, Server-Side Apply will be tried twice, but my understanding is that it's 
idempotent. Also the client-side logic will ultimately be removed as SSA 
becomes ubiquitous, so I guess this explains why I did not bother using an 
atomic boolean. WDYT?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to