valdar commented on code in PR #4168:
URL: https://github.com/apache/camel-k/pull/4168#discussion_r1150188976


##########
pkg/cmd/operator/operator.go:
##########
@@ -243,19 +242,20 @@ func Run(healthPort, monitoringPort int32, leaderElection 
bool, leaderElectionID
 
 // findOrCreateIntegrationPlatform create default integration platform in 
operator namespace if not already exists.
 func findOrCreateIntegrationPlatform(ctx context.Context, c client.Client, 
operatorNamespace string) error {
+       operatorID := defaults.OperatorID()
        var platformName string
-       if defaults.OperatorID() != "" {
-               platformName = defaults.OperatorID()
+       if operatorID != "" {
+               platformName = operatorID
        } else {
                platformName = platform.DefaultPlatformName
        }
 
        if pl, err := kubernetes.GetIntegrationPlatform(ctx, c, platformName, 
operatorNamespace); pl == nil || k8serrors.IsNotFound(err) {
                defaultPlatform := v1.NewIntegrationPlatform(operatorNamespace, 
platformName)
-               if defaultPlatform.Labels == nil {
-                       defaultPlatform.Labels = make(map[string]string)
+               v1.SetAnnotation(&defaultPlatform.ObjectMeta, 
"camel.apache.org/platform.generated", "true")

Review Comment:
   Changed back to be a label.



-- 
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