-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #277 from pierDipi/add-camel-k
Add Red Hat Integration - Camel K operator
- Loading branch information
Showing
20 changed files
with
213 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# red-hat-camel-k | ||
|
||
Red Hat Integration - Camel K | ||
============== | ||
|
||
**Red Hat Integration - Camel K** is a lightweight integration platform, born on Kubernetes, with serverless superpowers. | ||
|
||
## Installation | ||
|
||
To start using Camel K, install the operator and then create the following `IntegrationPlatform`: | ||
``` | ||
apiVersion: camel.apache.org/v1 | ||
kind: IntegrationPlatform | ||
metadata: | ||
name: camel-k | ||
labels: | ||
app: "camel-k" | ||
``` | ||
|
||
An `IntegrationPlatform` resource is automatically created by default, 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 project. | ||
|
||
## Running an Integration | ||
|
||
After the initial setup, you can run a Camel integration on the cluster by creating an example `Integration`, e.g.: | ||
``` | ||
apiVersion: camel.apache.org/v1 | ||
kind: Integration | ||
metadata: | ||
name: example | ||
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"); | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Red Hat Integration - Camel K | ||
|
||
Install Red Hat Integration - Camel K. | ||
|
||
Do not use the `base` directory directly, as you will need to patch the `channel` based on the version of OpenShift you are using, or the version of the operator you want to use. | ||
|
||
The current *overlays* available are for the following channels: | ||
|
||
* [1.10.x](operator/overlays/1.10.x) | ||
* [1.4.x](operator/overlays/1.4.x) | ||
* [1.6.x](operator/overlays/1.6.x) | ||
* [1.8.x](operator/overlays/1.8.x) | ||
* [candidate](operator/overlays/candidate) | ||
* [latest](operator/overlays/latest) | ||
* [stable](operator/overlays/stable) | ||
|
||
## Usage | ||
|
||
If you have cloned the `gitops-catalog` repository, you can install Red Hat Integration - Camel K based on the overlay of your choice by running from the root (`gitops-catalog`) directory. | ||
|
||
``` | ||
oc apply -k red-hat-camel-k/operator/overlays/<channel> | ||
``` | ||
|
||
Or, without cloning: | ||
|
||
``` | ||
oc apply -k https://github.com/redhat-cop/gitops-catalog/red-hat-camel-k/operator/overlays/<channel> | ||
``` | ||
|
||
As part of a different overlay in your own GitOps repo: | ||
|
||
``` | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- github.com/redhat-cop/gitops-catalog/red-hat-camel-k/operator/overlays/<channel>?ref=main | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- namespace.yaml | ||
- operator-group.yaml | ||
- subscription.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
annotations: | ||
openshift.io/display-name: "Red Hat Integration - Camel K" | ||
labels: | ||
openshift.io/cluster-monitoring: 'true' | ||
name: red-hat-camel-k |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: operators.coreos.com/v1 | ||
kind: OperatorGroup | ||
metadata: | ||
name: red-hat-camel-k-group | ||
namespace: red-hat-camel-k |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: Subscription | ||
metadata: | ||
name: red-hat-camel-k | ||
namespace: red-hat-camel-k | ||
spec: | ||
channel: patch-me-see-overlays-dir | ||
installPlanApproval: Automatic | ||
name: red-hat-camel-k | ||
source: redhat-operators | ||
sourceNamespace: openshift-marketplace |
11 changes: 11 additions & 0 deletions
11
red-hat-camel-k/operator/overlays/1.10.x/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- ../../base | ||
|
||
patches: | ||
- target: | ||
kind: Subscription | ||
name: red-hat-camel-k | ||
path: patch-channel.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- op: replace | ||
path: /spec/channel | ||
value: 1.10.x |
11 changes: 11 additions & 0 deletions
11
red-hat-camel-k/operator/overlays/1.4.x/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- ../../base | ||
|
||
patches: | ||
- target: | ||
kind: Subscription | ||
name: red-hat-camel-k | ||
path: patch-channel.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- op: replace | ||
path: /spec/channel | ||
value: 1.4.x |
11 changes: 11 additions & 0 deletions
11
red-hat-camel-k/operator/overlays/1.6.x/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- ../../base | ||
|
||
patches: | ||
- target: | ||
kind: Subscription | ||
name: red-hat-camel-k | ||
path: patch-channel.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- op: replace | ||
path: /spec/channel | ||
value: 1.6.x |
11 changes: 11 additions & 0 deletions
11
red-hat-camel-k/operator/overlays/1.8.x/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- ../../base | ||
|
||
patches: | ||
- target: | ||
kind: Subscription | ||
name: red-hat-camel-k | ||
path: patch-channel.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- op: replace | ||
path: /spec/channel | ||
value: 1.8.x |
11 changes: 11 additions & 0 deletions
11
red-hat-camel-k/operator/overlays/candidate/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- ../../base | ||
|
||
patches: | ||
- target: | ||
kind: Subscription | ||
name: red-hat-camel-k | ||
path: patch-channel.yaml |
3 changes: 3 additions & 0 deletions
3
red-hat-camel-k/operator/overlays/candidate/patch-channel.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- op: replace | ||
path: /spec/channel | ||
value: candidate |
11 changes: 11 additions & 0 deletions
11
red-hat-camel-k/operator/overlays/latest/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- ../../base | ||
|
||
patches: | ||
- target: | ||
kind: Subscription | ||
name: red-hat-camel-k | ||
path: patch-channel.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- op: replace | ||
path: /spec/channel | ||
value: latest |
11 changes: 11 additions & 0 deletions
11
red-hat-camel-k/operator/overlays/stable/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- ../../base | ||
|
||
patches: | ||
- target: | ||
kind: Subscription | ||
name: red-hat-camel-k | ||
path: patch-channel.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- op: replace | ||
path: /spec/channel | ||
value: stable |