[camel-k] branch master updated: Unable to reinstall the operator fixes #43

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

[camel-k] branch master updated: Unable to reinstall the operator fixes #43

nferraro
This is an automated email from the ASF dual-hosted git repository.

nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/master by this push:
     new 0db195a  Unable to reinstall the operator fixes #43
0db195a is described below

commit 0db195aa1aece481f18994eec84e339b5a1baf83
Author: Dmitry Volodin <[hidden email]>
AuthorDate: Wed Sep 12 11:10:26 2018 +0300

    Unable to reinstall the operator fixes #43
---
 pkg/install/operator.go | 4 ++++
 1 file changed, 4 insertions(+)

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