[GitHub] nicolaferraro closed pull request #50: Unable to reinstall the operator fixes #43

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] nicolaferraro closed pull request #50: Unable to reinstall the operator fixes #43

GitBox
nicolaferraro closed pull request #50: Unable to reinstall the operator fixes #43
URL: https://github.com/apache/camel-k/pull/50
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/pkg/install/operator.go b/pkg/install/operator.go
index cea7a24..e3bf3f2 100644
--- a/pkg/install/operator.go
+++ b/pkg/install/operator.go
@@ -56,6 +56,10 @@ func installResource(namespace string, name string) error {
 
  err = sdk.Create(obj)
  if err != nil && errors.IsAlreadyExists(err) {
+ // Don't recreate Service object
+ if obj.GetObjectKind().GroupVersionKind().Kind == "Service" {
+ return nil
+ }
  return sdk.Update(obj)
  }
  return err


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services