You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "squakez (via GitHub)" <gi...@apache.org> on 2023/10/27 10:29:08 UTC

[PR] feat(knative): make installation explicit [camel-k]

squakez opened a new pull request, #4873:
URL: https://github.com/apache/camel-k/pull/4873

   Instead of letting the CLI perfom the installation, we need to make it explicit in order to use the same approach for any other installation methodology.
   
   Closes #4716
   
   <!-- Description -->
   
   
   
   
   <!--
   Enter your extended release note in the below block. If the PR requires
   additional action from users switching to the new release, include the string
   "action required". If no release note is required, write "NONE". 
   
   You can (optionally) mark this PR with labels "kind/bug" or "kind/feature" to make sure
   the text is added to the right section of the release notes. 
   -->
   
   **Release Note**
   ```release-note
   NONE
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1782693255

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 33.5% --> 33.6% (Coverage difference: **+.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on code in PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#discussion_r1375986485


##########
config/rbac/knative/kustomization.yaml:
##########
@@ -0,0 +1,36 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+namespace: my-ns
+resources:
+# Required in order to perform namespace replacement below
+- operator-service-account.yaml
+- operator-role-knative.yaml
+- operator-role-binding-knative.yaml
+- operator-cluster-role-binding-custom-resource-definitions.yaml
+replacements:

Review Comment:
   Using `replacements` is one of my (favorite) possible option for namespace handling. Bu I need to see how it fits with all the other rbac configurations adaptations like ClusterRoleBindings and RoleBindings that reference the service.



##########
config/rbac/knative/kustomization.yaml:
##########
@@ -0,0 +1,36 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+namespace: my-ns
+resources:
+# Required in order to perform namespace replacement below
+- operator-service-account.yaml
+- operator-role-knative.yaml
+- operator-role-binding-knative.yaml
+- operator-cluster-role-binding-custom-resource-definitions.yaml
+replacements:

Review Comment:
   Using `replacements` is one of my (favorite) possible option for namespace handling. But I need to see how it fits with all the other rbac configurations adaptations like ClusterRoleBindings and RoleBindings that reference the service.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1798195160

   :camel: **Thank you for contributing!** :camel: 
   
     Unable to create **Coverage Report** :warning:. 
    Merge conflicts found.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#discussion_r1389189199


##########
docs/modules/ROOT/pages/installation/knative.adoc:
##########
@@ -0,0 +1,35 @@
+= Knative installation
+
+"https://knative.dev[Knative] is an Open-Source Enterprise-level solution to build Serverless and Event Driven Applications. The effort done in this project is a great complement to Camel K, which can leverage natively some feature offered by Knative. In particular, Camel K will be able to leverage "scale to 0" (hence, serverless) feature offered by Knative.
+
+NOTE: Knative is an optional configuration. It is not required to run Camel K.
+
+[[install-knative]]
+== Knative roles configuration
+
+Camel K needs to have certain privileges to use the resources used by Knative. We have identified them, so, it follows a few configuration that you will need to apply in order to make Camel K work with Knative.
+
+NOTE: We assume you have already both the Knative operator and the Camel K operator up and running. If not, the first step is to install both operator. See the guide on xref:installation/installation.adoc[how to install Camel K] and the guide on https://knative.dev/docs/install/[how to install Knative] respectively.
+
+Once all the resources are installed in the cluster, you'll need to perform the following action:
+
+```bash
+kubectl apply -k https://github.com/apache/camel-k/tree/main/config/rbac/knative?ref=v2.1.0
+```
+
+The configuration above is using the released version `2.1.0`. You may want to use instead another version or the latest development available on `main` branch. Before continuing with the configuration, you need to make sure to know which are the namespaces on which the Operator is running and on which your Integration is going to run (they could be the same). In order to change it, you must perform some customization locally in a similar fashion:
+
+```bash
+git clone https://github.com/apache/camel-k.git
+cd camel-k/config/rbac/knative
+sed -i "s/namespace: placeholder/namespace: $OPERATOR_NAMESPACE/" operator-cluster-role-binding-custom-resource-definitions.yaml

Review Comment:
   Basically the operator could be installed in any namespace, ie `global-ns`. The service account `camel-k-operator` is already existing on that namespace and we must instruct the kustomize procedure that this is the namespaced resource we want to provide as a subject for the RoleBinding. I've tried to do some test, but I could not make it work without explicitly setting the namespace replacement :/



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1801441734

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 33.5% --> 33.6% (Coverage difference: **+.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on code in PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#discussion_r1386702216


##########
docs/modules/ROOT/pages/installation/knative.adoc:
##########
@@ -0,0 +1,35 @@
+= Knative installation
+
+"https://knative.dev[Knative] is an Open-Source Enterprise-level solution to build Serverless and Event Driven Applications. The effort done in this project is a great complement to Camel K, which can leverage natively some feature offered by Knative. In particular, Camel K will be able to leverage "scale to 0" (hence, serverless) feature offered by Knative.
+
+NOTE: Knative is an optional configuration. It is not required to run Camel K.
+
+[[install-knative]]
+== Knative roles configuration
+
+Camel K needs to have certain privileges to use the resources used by Knative. We have identified them, so, it follows a few configuration that you will need to apply in order to make Camel K work with Knative.
+
+NOTE: We assume you have already both the Knative operator and the Camel K operator up and running. If not, the first step is to install both operator. See the guide on xref:installation/installation.adoc[how to install Camel K] and the guide on https://knative.dev/docs/install/[how to install Knative] respectively.
+
+Once all the resources are installed in the cluster, you'll need to perform the following action:
+
+```bash
+kubectl apply -k https://github.com/apache/camel-k/tree/main/config/rbac/knative?ref=v2.1.0
+```
+
+The configuration above is using the released version `2.1.0`. You may want to use instead another version or the latest development available on `main` branch. Before continuing with the configuration, you need to make sure to know which are the namespaces on which the Operator is running and on which your Integration is going to run (they could be the same). In order to change it, you must perform some customization locally in a similar fashion:
+
+```bash
+git clone https://github.com/apache/camel-k.git
+cd camel-k/config/rbac/knative
+sed -i "s/namespace: placeholder/namespace: $OPERATOR_NAMESPACE/" operator-cluster-role-binding-custom-resource-definitions.yaml

Review Comment:
   From what I understand of kustomize, replacing "placeholder" by "default" in the rbac yaml files. This should also works on [subjects](https://github.com/kubernetes-sigs/kustomize/blob/e7c8ed18998745680cf45efd12e5990cedcb3d39/api/filters/namespace/namespace.go#L108-L125).
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on code in PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#discussion_r1386781372


##########
docs/modules/ROOT/pages/installation/knative.adoc:
##########
@@ -0,0 +1,35 @@
+= Knative installation
+
+"https://knative.dev[Knative] is an Open-Source Enterprise-level solution to build Serverless and Event Driven Applications. The effort done in this project is a great complement to Camel K, which can leverage natively some feature offered by Knative. In particular, Camel K will be able to leverage "scale to 0" (hence, serverless) feature offered by Knative.
+
+NOTE: Knative is an optional configuration. It is not required to run Camel K.
+
+[[install-knative]]
+== Knative roles configuration
+
+Camel K needs to have certain privileges to use the resources used by Knative. We have identified them, so, it follows a few configuration that you will need to apply in order to make Camel K work with Knative.
+
+NOTE: We assume you have already both the Knative operator and the Camel K operator up and running. If not, the first step is to install both operator. See the guide on xref:installation/installation.adoc[how to install Camel K] and the guide on https://knative.dev/docs/install/[how to install Knative] respectively.
+
+Once all the resources are installed in the cluster, you'll need to perform the following action:
+
+```bash
+kubectl apply -k https://github.com/apache/camel-k/tree/main/config/rbac/knative?ref=v2.1.0
+```
+
+The configuration above is using the released version `2.1.0`. You may want to use instead another version or the latest development available on `main` branch. Before continuing with the configuration, you need to make sure to know which are the namespaces on which the Operator is running and on which your Integration is going to run (they could be the same). In order to change it, you must perform some customization locally in a similar fashion:
+
+```bash
+git clone https://github.com/apache/camel-k.git
+cd camel-k/config/rbac/knative
+sed -i "s/namespace: placeholder/namespace: $OPERATOR_NAMESPACE/" operator-cluster-role-binding-custom-resource-definitions.yaml

Review Comment:
   The only issue I had was that one of the resource needs to be on another namespace that the one declared with `kustomize edit set namespace $IT_NAMESPACE` (in my case I want to keep the `camel-k-operator-local-registry` RoleBinding on namespace `kube-public`).
   What is the specifics of a "global" namespace ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on code in PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#discussion_r1386781372


##########
docs/modules/ROOT/pages/installation/knative.adoc:
##########
@@ -0,0 +1,35 @@
+= Knative installation
+
+"https://knative.dev[Knative] is an Open-Source Enterprise-level solution to build Serverless and Event Driven Applications. The effort done in this project is a great complement to Camel K, which can leverage natively some feature offered by Knative. In particular, Camel K will be able to leverage "scale to 0" (hence, serverless) feature offered by Knative.
+
+NOTE: Knative is an optional configuration. It is not required to run Camel K.
+
+[[install-knative]]
+== Knative roles configuration
+
+Camel K needs to have certain privileges to use the resources used by Knative. We have identified them, so, it follows a few configuration that you will need to apply in order to make Camel K work with Knative.
+
+NOTE: We assume you have already both the Knative operator and the Camel K operator up and running. If not, the first step is to install both operator. See the guide on xref:installation/installation.adoc[how to install Camel K] and the guide on https://knative.dev/docs/install/[how to install Knative] respectively.
+
+Once all the resources are installed in the cluster, you'll need to perform the following action:
+
+```bash
+kubectl apply -k https://github.com/apache/camel-k/tree/main/config/rbac/knative?ref=v2.1.0
+```
+
+The configuration above is using the released version `2.1.0`. You may want to use instead another version or the latest development available on `main` branch. Before continuing with the configuration, you need to make sure to know which are the namespaces on which the Operator is running and on which your Integration is going to run (they could be the same). In order to change it, you must perform some customization locally in a similar fashion:
+
+```bash
+git clone https://github.com/apache/camel-k.git
+cd camel-k/config/rbac/knative
+sed -i "s/namespace: placeholder/namespace: $OPERATOR_NAMESPACE/" operator-cluster-role-binding-custom-resource-definitions.yaml

Review Comment:
   The only issue I had was when one of the resource need to be on another namespace that the one declared with `kustomize edit set namespace $IT_NAMESPACE` (in my case I want to keep the `camel-k-operator-local-registry` RoleBinding on namespace `kube-public`).
   What is the specifics of a "global" namespace ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1782689991

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 33.5% --> 33.6% (Coverage difference: **+.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1785500028

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 33.5% --> 33.6% (Coverage difference: **+.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1798247614

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 33.5% --> 33.6% (Coverage difference: **+.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#discussion_r1386752583


##########
docs/modules/ROOT/pages/installation/knative.adoc:
##########
@@ -0,0 +1,35 @@
+= Knative installation
+
+"https://knative.dev[Knative] is an Open-Source Enterprise-level solution to build Serverless and Event Driven Applications. The effort done in this project is a great complement to Camel K, which can leverage natively some feature offered by Knative. In particular, Camel K will be able to leverage "scale to 0" (hence, serverless) feature offered by Knative.
+
+NOTE: Knative is an optional configuration. It is not required to run Camel K.
+
+[[install-knative]]
+== Knative roles configuration
+
+Camel K needs to have certain privileges to use the resources used by Knative. We have identified them, so, it follows a few configuration that you will need to apply in order to make Camel K work with Knative.
+
+NOTE: We assume you have already both the Knative operator and the Camel K operator up and running. If not, the first step is to install both operator. See the guide on xref:installation/installation.adoc[how to install Camel K] and the guide on https://knative.dev/docs/install/[how to install Knative] respectively.
+
+Once all the resources are installed in the cluster, you'll need to perform the following action:
+
+```bash
+kubectl apply -k https://github.com/apache/camel-k/tree/main/config/rbac/knative?ref=v2.1.0
+```
+
+The configuration above is using the released version `2.1.0`. You may want to use instead another version or the latest development available on `main` branch. Before continuing with the configuration, you need to make sure to know which are the namespaces on which the Operator is running and on which your Integration is going to run (they could be the same). In order to change it, you must perform some customization locally in a similar fashion:
+
+```bash
+git clone https://github.com/apache/camel-k.git
+cd camel-k/config/rbac/knative
+sed -i "s/namespace: placeholder/namespace: $OPERATOR_NAMESPACE/" operator-cluster-role-binding-custom-resource-definitions.yaml

Review Comment:
   That would be great as it simplify the procedure a lot. However I wonder how it works when the operator is installed in a global namespace. I'll make some test to see if it is the proper solution, thanks for the hints.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on code in PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#discussion_r1386702216


##########
docs/modules/ROOT/pages/installation/knative.adoc:
##########
@@ -0,0 +1,35 @@
+= Knative installation
+
+"https://knative.dev[Knative] is an Open-Source Enterprise-level solution to build Serverless and Event Driven Applications. The effort done in this project is a great complement to Camel K, which can leverage natively some feature offered by Knative. In particular, Camel K will be able to leverage "scale to 0" (hence, serverless) feature offered by Knative.
+
+NOTE: Knative is an optional configuration. It is not required to run Camel K.
+
+[[install-knative]]
+== Knative roles configuration
+
+Camel K needs to have certain privileges to use the resources used by Knative. We have identified them, so, it follows a few configuration that you will need to apply in order to make Camel K work with Knative.
+
+NOTE: We assume you have already both the Knative operator and the Camel K operator up and running. If not, the first step is to install both operator. See the guide on xref:installation/installation.adoc[how to install Camel K] and the guide on https://knative.dev/docs/install/[how to install Knative] respectively.
+
+Once all the resources are installed in the cluster, you'll need to perform the following action:
+
+```bash
+kubectl apply -k https://github.com/apache/camel-k/tree/main/config/rbac/knative?ref=v2.1.0
+```
+
+The configuration above is using the released version `2.1.0`. You may want to use instead another version or the latest development available on `main` branch. Before continuing with the configuration, you need to make sure to know which are the namespaces on which the Operator is running and on which your Integration is going to run (they could be the same). In order to change it, you must perform some customization locally in a similar fashion:
+
+```bash
+git clone https://github.com/apache/camel-k.git
+cd camel-k/config/rbac/knative
+sed -i "s/namespace: placeholder/namespace: $OPERATOR_NAMESPACE/" operator-cluster-role-binding-custom-resource-definitions.yaml

Review Comment:
   From what I understand of kustomize, replacing "placeholder" by "default" in the rbac yaml files. This works on [subjects](https://github.com/kubernetes-sigs/kustomize/blob/e7c8ed18998745680cf45efd12e5990cedcb3d39/api/filters/namespace/namespace.go#L108-L125).
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1782686653

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 33.5% --> 33.6% (Coverage difference: **+.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1864657777

   :camel: **Thank you for contributing!** :camel: 
   
     Unable to create **Coverage Report** :warning:. 
    Merge conflicts found.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez merged PR #4873:
URL: https://github.com/apache/camel-k/pull/4873


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1873857657

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 33.5% --> 33.6% (Coverage difference: **+.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1784926658

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 33.5% --> 33.6% (Coverage difference: **+.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1798203613

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 33.5% --> 33.6% (Coverage difference: **+.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1805391554

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 33.5% --> 33.6% (Coverage difference: **+.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1805396542

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 33.5% --> 33.6% (Coverage difference: **+.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1784881884

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 33.5% --> 33.6% (Coverage difference: **+.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1785529744

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 33.5% --> 33.6% (Coverage difference: **+.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#issuecomment-1798869975

   :camel: **Thank you for contributing!**
   
   Code Coverage Report :heavy_check_mark: - Coverage changed: 33.5% --> 33.6% (Coverage difference: **+.1%**)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on code in PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#discussion_r1386702216


##########
docs/modules/ROOT/pages/installation/knative.adoc:
##########
@@ -0,0 +1,35 @@
+= Knative installation
+
+"https://knative.dev[Knative] is an Open-Source Enterprise-level solution to build Serverless and Event Driven Applications. The effort done in this project is a great complement to Camel K, which can leverage natively some feature offered by Knative. In particular, Camel K will be able to leverage "scale to 0" (hence, serverless) feature offered by Knative.
+
+NOTE: Knative is an optional configuration. It is not required to run Camel K.
+
+[[install-knative]]
+== Knative roles configuration
+
+Camel K needs to have certain privileges to use the resources used by Knative. We have identified them, so, it follows a few configuration that you will need to apply in order to make Camel K work with Knative.
+
+NOTE: We assume you have already both the Knative operator and the Camel K operator up and running. If not, the first step is to install both operator. See the guide on xref:installation/installation.adoc[how to install Camel K] and the guide on https://knative.dev/docs/install/[how to install Knative] respectively.
+
+Once all the resources are installed in the cluster, you'll need to perform the following action:
+
+```bash
+kubectl apply -k https://github.com/apache/camel-k/tree/main/config/rbac/knative?ref=v2.1.0
+```
+
+The configuration above is using the released version `2.1.0`. You may want to use instead another version or the latest development available on `main` branch. Before continuing with the configuration, you need to make sure to know which are the namespaces on which the Operator is running and on which your Integration is going to run (they could be the same). In order to change it, you must perform some customization locally in a similar fashion:
+
+```bash
+git clone https://github.com/apache/camel-k.git
+cd camel-k/config/rbac/knative
+sed -i "s/namespace: placeholder/namespace: $OPERATOR_NAMESPACE/" operator-cluster-role-binding-custom-resource-definitions.yaml

Review Comment:
   From what I understand of kustomize, replacing "placeholder" by "default" in the rbac yaml files might avoid having these lines. This works on [subjects](https://github.com/kubernetes-sigs/kustomize/blob/e7c8ed18998745680cf45efd12e5990cedcb3d39/api/filters/namespace/namespace.go#L108-L125).
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(knative): make installation explicit [camel-k]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #4873:
URL: https://github.com/apache/camel-k/pull/4873#discussion_r1374380533


##########
config/rbac/knative/kustomization.yaml:
##########
@@ -0,0 +1,36 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+namespace: my-ns
+resources:
+# Required in order to perform namespace replacement below
+- operator-service-account.yaml
+- operator-role-knative.yaml
+- operator-role-binding-knative.yaml
+- operator-cluster-role-binding-custom-resource-definitions.yaml
+replacements:

Review Comment:
   @gansheer I think the "replacement" can be a good way to solve the plethora of "placeholder" replacement we have in kustomization. The idea is that we include the serviceAccount (altough it exists) in order to get its namespace and replace it accordingly. wdyt?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org