camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nferr...@apache.org
Subject [camel-k] branch master updated: Unable to reinstall the operator fixes #43
Date Wed, 12 Sep 2018 08:34:18 GMT
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 <dmvolod@gmail.com>
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


Mime
View raw message