Skip to content

Commit

Permalink
feat(knative): helm installation procedure
Browse files Browse the repository at this point in the history
* The resources required to watch Knative are created for all installation methodologies
* A log message is shown in the operator to verify if it has the privileges to watch Knative
* Documentation

Closes #4716
  • Loading branch information
squakez committed Jan 2, 2024
1 parent c15b140 commit c8e93fc
Show file tree
Hide file tree
Showing 29 changed files with 257 additions and 243 deletions.
45 changes: 26 additions & 19 deletions config/manifests/bases/camel-k.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ spec:
Apache Camel K
==============
Apache Camel K is a lightweight integration platform, born on Kubernetes, with serverless superpowers.
Apache Camel K is a lightweight integration platform, born on Kubernetes, with serverless superpowers:
the easiest way to build and manage your Camel applications on Kubernetes.
## Installation
You may need to specify the container registry where to store the container images created for the Camel applications.
To start using Camel K, install the operator and then create the following `IntegrationPlatform`:
```
apiVersion: camel.apache.org/v1
Expand All @@ -99,34 +101,39 @@ spec:
name: camel-k
labels:
app: "camel-k"
spec:
build:
registry:
address: docker.io/my-org
```
An `IntegrationPlatform` resource is automatically created by default on OpenShift, so you can skip this step.
Also, You can edit the `IntegrationPlatform`, to configure Camel K.
The configuration from the `IntegrationPlatform` will apply to the Camel integrations created in the same namespace/project.
An `IntegrationPlatform` resource is automatically created by default on OpenShift, so you can skip this step when using Openshift cluster.
## Running an Integration
After the initial setup, you can run a Camel integration on the cluster by creating an example `Integration`, e.g.:
Run a Camel application on the cluster by creating a sample `Integration`, e.g.:
```
apiVersion: camel.apache.org/v1
kind: Integration
metadata:
name: example
annotations:
camel.apache.org/operator.id: camel-k
name: test
spec:
sources:
- name: Example.java
content: |
import org.apache.camel.builder.RouteBuilder;
public class Example extends RouteBuilder {
@Override
public void configure() throws Exception {
from("timer:tick")
.setBody(constant("Hello World!"))
.to("log:info?skipBodyLineSeparator=false");
}
}
flows:
- from:
parameters:
period: "1000"
steps:
- setBody:
simple: Hello Camel from ${routeId}
- log: ${body}
uri: timer:yaml
```
Log the result of the running application:
```
kubectl wait --for=condition=ready integration test --timeout=180s
kubectl logs deployment/test -f
```
displayName: Camel K Operator
icon:
Expand Down
2 changes: 1 addition & 1 deletion config/rbac/descoped/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ kind: Kustomization

resources:
- operator-cluster-role-events.yaml
- operator-cluster-role-knative.yaml
- operator-cluster-role.yaml
- operator-cluster-role-keda.yaml
- operator-cluster-role-knative.yaml
- operator-cluster-role-leases.yaml
- operator-cluster-role-podmonitors.yaml
- operator-cluster-role-strimzi.yaml
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/namespaced/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ kind: Kustomization

resources:
- operator-role-events.yaml
- operator-role-knative.yaml
- operator-role.yaml
- operator-role-keda.yaml
- operator-role-knative.yaml
- operator-role-leases.yaml
- operator-role-podmonitors.yaml
- operator-role-strimzi.yaml
- operator-role-binding.yaml
- operator-role-binding-events.yaml
- operator-role-binding-keda.yaml
- operator-role-binding-knative.yaml
- operator-role-binding-leases.yaml
- operator-role-binding-podmonitors.yaml
- operator-role-binding-strimzi.yaml
- operator-role-binding.yaml
Loading

0 comments on commit c8e93fc

Please sign in to comment.