-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
265 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,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2021 - present - Yupiik SAS - https://www.yupiik.com | ||
Licensed 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. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>alveolus</artifactId> | ||
<groupId>io.yupiik.alveoli</groupId> | ||
<version>1.0.28-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>kafka-local</artifactId> | ||
<name>BundleBee :: Alveolus :: Kafka Local</name> | ||
</project> |
26 changes: 26 additions & 0 deletions
26
...ocal/src/main/resources/bundlebee/kubernetes/io.yupiik.alveoli_kafka-local.configmap.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,26 @@ | ||
# | ||
# Copyright (c) 2021 - present - Yupiik SAS - https://www.yupiik.com | ||
# Licensed 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: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: kafka-local-config | ||
labels: | ||
app: kafka-local | ||
data: | ||
broker.id: "{{kafka-local.brokerId:-kafka-local}}" | ||
log.dirs: "/usr/share/kafka/data" | ||
JAVA_OPTS: "{{kafka-local.javaOpts:--Dbundlebee=true}}" |
35 changes: 35 additions & 0 deletions
35
.../main/resources/bundlebee/kubernetes/io.yupiik.alveoli_kafka-local.persistencevolume.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,35 @@ | ||
# | ||
# Copyright (c) 2021 - present - Yupiik SAS - https://www.yupiik.com | ||
# Licensed 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. | ||
# | ||
|
||
kind: PersistentVolume | ||
apiVersion: v1 | ||
metadata: | ||
name: kafka-pv-volume | ||
labels: | ||
type: local | ||
app: kafka-local | ||
finalizers: [] | ||
spec: | ||
storageClassName: local-storage | ||
capacity: | ||
storage: 5Gi | ||
accessModes: | ||
- ReadWriteMany | ||
claimRef: | ||
name: kafka-pv-claim | ||
namespace: "{{bundlebee.kube.namespace:-default}}" | ||
hostPath: | ||
path: "{{kafka-local.mountPath:-/data/kafka-local}}" |
29 changes: 29 additions & 0 deletions
29
.../resources/bundlebee/kubernetes/io.yupiik.alveoli_kafka-local.persistencevolumeclaim.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,29 @@ | ||
# | ||
# Copyright (c) 2021 - present - Yupiik SAS - https://www.yupiik.com | ||
# Licensed 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. | ||
# | ||
|
||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: kafka-pv-claim | ||
labels: | ||
app: kafka-local | ||
spec: | ||
storageClassName: local-storage | ||
accessModes: | ||
- ReadWriteMany | ||
resources: | ||
requests: | ||
storage: 5Gi |
33 changes: 33 additions & 0 deletions
33
...-local/src/main/resources/bundlebee/kubernetes/io.yupiik.alveoli_kafka-local.service.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,33 @@ | ||
# | ||
# Copyright (c) 2021 - present - Yupiik SAS - https://www.yupiik.com | ||
# Licensed 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: v1 | ||
kind: Service | ||
metadata: | ||
name: kafka | ||
labels: | ||
app: kafka-local | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 9092 | ||
targetPort: 9092 | ||
name: kafka-internal | ||
- port: 9093 | ||
targetPort: 9093 | ||
name: kafka-external | ||
selector: | ||
app: kafka-local |
60 changes: 60 additions & 0 deletions
60
...al/src/main/resources/bundlebee/kubernetes/io.yupiik.alveoli_kafka-local.statefulset.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,60 @@ | ||
# | ||
# Copyright (c) 2021 - present - Yupiik SAS - https://www.yupiik.com | ||
# Licensed 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: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: kafka-local | ||
labels: | ||
app: kafka-local | ||
spec: | ||
serviceName: "kafka-local" | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: kafka-local | ||
template: | ||
metadata: | ||
labels: | ||
app: kafka-local | ||
spec: | ||
initContainers: | ||
- name: chmod-kafka-data-folder-workaround | ||
image: alpine:latest | ||
command: | ||
- chown | ||
- -R | ||
- 1000:1000 | ||
- /usr/share/kafka/data | ||
volumeMounts: | ||
- name: pv-data | ||
mountPath: /usr/share/kafka/data | ||
containers: | ||
- name: kafka | ||
image: "{{kafka-local.image:-apache/kafka:3.8.0}}" | ||
envFrom: | ||
- configMapRef: | ||
name: kafka-local-config | ||
ports: | ||
- containerPort: 9092 | ||
name: kafka | ||
volumeMounts: | ||
- name: pv-data | ||
mountPath: /usr/share/kafka/data | ||
volumes: | ||
- name: pv-data | ||
persistentVolumeClaim: | ||
claimName: kafka-pv-claim |
47 changes: 47 additions & 0 deletions
47
alveolus/kafka-local/src/main/resources/bundlebee/manifest.json
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,47 @@ | ||
{ | ||
"alveoli": [ | ||
{ | ||
"//": "Setup \"${project.artifactId}\" which runs an Apache Kafka instance usable by other applications.", | ||
"name": "${project.groupId}:${project.artifactId}:${project.version}", | ||
"descriptors": [ | ||
{ | ||
"name": "${project.groupId}_${project.artifactId}.configmap", | ||
"interpolate": true | ||
}, | ||
{ | ||
"name": "${project.groupId}_${project.artifactId}.persistencevolume", | ||
"interpolate": true | ||
}, | ||
{ | ||
"name": "${project.groupId}_${project.artifactId}.persistencevolumeclaim", | ||
"interpolate": true | ||
}, | ||
{ | ||
"name": "${project.groupId}_${project.artifactId}.service" | ||
}, | ||
{ | ||
"name": "${project.groupId}_${project.artifactId}.statefulset", | ||
"interpolate": true | ||
} | ||
], | ||
"placeholdersDoc": [ | ||
{ | ||
"name": "kafka-local.image", | ||
"description": "The Apache Kafka image to use." | ||
}, | ||
{ | ||
"name": "kafka-local.brokerId", | ||
"description": "The Apache Kafka broker id." | ||
}, | ||
{ | ||
"name": "kafka-local.javaOpts", | ||
"description": "The JAVA_OPTS value." | ||
}, | ||
{ | ||
"name": "kafka-local.mountPath", | ||
"description": "Where to store Apache Kafka data on the host." | ||
} | ||
] | ||
} | ||
] | ||
} |
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
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