Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(knative): make installation explicit #4873

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading