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


##########
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:
   According to the checks nothing really changes. However, I think there could 
have been some reason why this was a Label instead of an annotation (maybe for 
external filtering?). If we do this change here we need to apply the same 
change in pkg/trait/platform.go in order to make consistent.



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