nicolaferraro closed pull request #23: Add label to service
URL: https://github.com/apache/camel-k/pull/23
 
 
   

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/README.md b/README.md
index d996909..43c0db8 100644
--- a/README.md
+++ b/README.md
@@ -69,6 +69,14 @@ You can check the status of all integrations by executing 
the following command:
 kamel get
 ```
 
+### Uninstalling Camel K
+
+If requires to uninstall Camel K from the OpenShift or Kubernetes, it's 
nessesary to run following command using "oc" or "kubectl" tool:
+
+```
+delete 
all,pvc,configmap,rolebindings,clusterrolebindings,secrets,sa,roles,clusterroles,crd
 -l 'app=camel-k'
+```
+
 ## Building
 
 In order to build the project follow these steps:
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:
@@ -311,6 +310,29 @@ metadata:
   labels:
     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"] =
                `
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",
        )
 }
 


 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to