camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nferr...@apache.org
Subject [camel-k] 01/02: Add label to operator service
Date Tue, 11 Sep 2018 13:54:54 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

commit 45c7e9feba2bc1068464be43ad26ec89b49646f5
Author: Dmitry Volodin <dmvolod@gmail.com>
AuthorDate: Tue Sep 11 14:31:38 2018 +0300

    Add label to operator service
---
 deploy/operator-service.yaml | 19 +++++++++++++++++++
 deploy/resources.go          | 24 +++++++++++++++++++++++-
 pkg/install/operator.go      |  1 +
 3 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/deploy/operator-service.yaml b/deploy/operator-service.yaml
new file mode 100644
index 0000000..29a623b
--- /dev/null
+++ b/deploy/operator-service.yaml
@@ -0,0 +1,19 @@
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    name: camel-k-operator
+    app: "camel-k"
+  name: camel-k-operator
+spec:
+  ports:
+    - name: metrics
+      port: 60000
+      protocol: TCP
+      targetPort: metrics
+  selector:
+    name: camel-k-operator
+  sessionAffinity: None
+  type: ClusterIP
+status:
+  loadBalancer: {}
diff --git a/deploy/resources.go b/deploy/resources.go
index 9f21fcd..e1b1bbb 100644
--- a/deploy/resources.go
+++ b/deploy/resources.go
@@ -86,7 +86,6 @@ spec:
     metadata:
       labels:
         name: camel-k-operator
-        app: "camel-k"
     spec:
       serviceAccountName: camel-k-operator
       containers:
@@ -312,6 +311,29 @@ metadata:
     app: "camel-k"
 
 `
+	Resources["operator-service.yaml"] =
+		`
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    name: camel-k-operator
+    app: "camel-k"
+  name: camel-k-operator
+spec:
+  ports:
+    - name: metrics
+      port: 60000
+      protocol: TCP
+      targetPort: metrics
+  selector:
+    name: camel-k-operator
+  sessionAffinity: None
+  type: ClusterIP
+status:
+  loadBalancer: {}
+
+`
 	Resources["operator.yaml"] =
 		`
 apiVersion: apps/v1
diff --git a/pkg/install/operator.go b/pkg/install/operator.go
index a4d98d1..cea7a24 100644
--- a/pkg/install/operator.go
+++ b/pkg/install/operator.go
@@ -31,6 +31,7 @@ func Operator(namespace string) error {
 		"operator-role-openshift.yaml", // TODO distinguish between Openshift and Kubernetes
 		"operator-role-binding.yaml",
 		"operator-deployment.yaml",
+		"operator-service.yaml",
 	)
 }
 


Mime
View raw message