You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2018/09/12 08:34:18 UTC

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

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 <dm...@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