Skip to content

Commit 1f5a4e5

Browse files
Merge branch 'main' into spike/lb-operator
2 parents d963287 + 0f1c4a0 commit 1f5a4e5

File tree

93 files changed

+4575
-986
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+4575
-986
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,10 @@ target/
55
.idea/
66
*.iws
77

8+
Cargo.nix
9+
crate-hashes.json
10+
result
11+
image.tar
12+
813
# We do NOT want to ignore .git because we use the `built` crate to gather the current git commit hash at built time
914
# This means we need the .git directory in our Docker image, it will be thrown away and won't be included in the final image

.github/ISSUE_TEMPLATE/new_version.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Not all of these steps are necessary for all versions.
2929

3030
- [ ] Update the Docker image
3131
- [ ] Update documentation to include supported version(s)
32+
- [ ] Update and test getting started guide with updated version(s)
3233
- [ ] Update operator to support the new version (if needed)
3334
- [ ] Update integration tests to test use the new versions (in addition or replacing old versions
3435
- [ ] Update examples to use new versions

.github/workflows/build.yml

Lines changed: 60 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,17 @@ jobs:
3333
env:
3434
RUSTC_BOOTSTRAP: 1
3535
steps:
36+
- name: Install protoc
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install protobuf-compiler
3640
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
3741
with:
3842
submodules: recursive
3943
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7
4044
with:
4145
profile: minimal
42-
toolchain: stable
46+
toolchain: "1.63.0"
4347
override: true
4448
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # tag=v2.0.0
4549
with:
@@ -61,7 +65,7 @@ jobs:
6165
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
6266
with:
6367
submodules: recursive
64-
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # tag=v4
68+
- uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 # tag=v4
6569
- name: Install requirements for version tool
6670
run: pip install -r python/requirements.txt
6771
- id: prerelease
@@ -146,7 +150,7 @@ jobs:
146150
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7
147151
with:
148152
profile: minimal
149-
toolchain: stable
153+
toolchain: "1.63.0"
150154
components: rustfmt
151155
override: true
152156
- uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # renovate: tag=v1.0.3
@@ -158,13 +162,17 @@ jobs:
158162
name: Run Clippy
159163
runs-on: ubuntu-latest
160164
steps:
165+
- name: Install protoc
166+
run: |
167+
sudo apt-get update
168+
sudo apt-get install protobuf-compiler
161169
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
162170
with:
163171
submodules: recursive
164172
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7
165173
with:
166174
profile: minimal
167-
toolchain: stable
175+
toolchain: "1.63.0"
168176
components: clippy
169177
override: true
170178
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # tag=v2.0.0
@@ -188,13 +196,17 @@ jobs:
188196
name: Run RustDoc
189197
runs-on: ubuntu-latest
190198
steps:
199+
- name: Install protoc
200+
run: |
201+
sudo apt-get update
202+
sudo apt-get install protobuf-compiler
191203
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
192204
with:
193205
submodules: recursive
194206
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7
195207
with:
196208
profile: minimal
197-
toolchain: stable
209+
toolchain: "1.63.0"
198210
components: rustfmt
199211
override: true
200212
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # tag=v2.0.0
@@ -214,13 +226,17 @@ jobs:
214226
- run_rustdoc
215227
runs-on: ubuntu-latest
216228
steps:
229+
- name: Install protoc
230+
run: |
231+
sudo apt-get update
232+
sudo apt-get install protobuf-compiler
217233
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
218234
with:
219235
submodules: recursive
220236
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7
221237
with:
222238
profile: minimal
223-
toolchain: stable
239+
toolchain: "1.63.0"
224240
override: true
225241
- uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # tag=v2.0.0
226242
with:
@@ -229,6 +245,31 @@ jobs:
229245
with:
230246
command: test
231247

248+
# Similar to check_charts, this tries to render the README, and see if there are unintended changes.
249+
# This will save us from merging changes to the wrong file (instead of the templated source), and from
250+
# forgetting to render out modifications to the README.
251+
check_readme:
252+
name: Check if committed README is the one we would render from the available parts
253+
runs-on: ubuntu-latest
254+
steps:
255+
- name: Checkout
256+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
257+
with:
258+
submodules: recursive
259+
- uses: actions/setup-python@v4
260+
with:
261+
python-version: '3.10'
262+
- name: Regenerate charts
263+
run: make render-readme
264+
- name: Check if committed README were up to date
265+
run: git diff --exit-code
266+
- name: Git Diff showed uncommitted changes
267+
if: ${{ failure() }}
268+
uses: actions/github-script@d50f485531ba88479582bc2da03ff424389af5c1 # tag=v6
269+
with:
270+
script: |
271+
core.setFailed('Committed README are not up to date, please make sure to apply them to the templated partials, and re-commit!')
272+
232273
# This job cleans up the CRDs, Helm charts and Kustomize manifests, followed by rebuilding them
233274
# It then runs a `git diff` and fails the entire workflow, if any difference is encountered.
234275
#
@@ -248,19 +289,23 @@ jobs:
248289
- run_rustdoc
249290
runs-on: ubuntu-latest
250291
steps:
292+
- name: Install protoc
293+
run: |
294+
sudo apt-get update
295+
sudo apt-get install protobuf-compiler
251296
- name: Checkout
252297
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
253298
with:
254299
submodules: recursive
255300
- name: Set up Helm
256-
uses: azure/setup-helm@e4f3964f67aac34233ac06d6614802b7040f2a7c # tag=v3.1
301+
uses: azure/setup-helm@b5b231a831f96336bbfeccc1329990f0005c5bb1 # tag=v3.3
257302
with:
258303
version: v3.6.2
259304
- name: Set up cargo
260305
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7
261306
with:
262307
profile: minimal
263-
toolchain: stable
308+
toolchain: "1.63.0"
264309
override: true
265310
- name: Set up rust-cache
266311
uses: Swatinem/rust-cache@6720f05bc48b77f96918929a9019fb2203ff71f8 # tag=v2.0.0
@@ -272,7 +317,7 @@ jobs:
272317
run: git diff --exit-code
273318
- name: Git Diff showed uncommitted changes
274319
if: ${{ failure() }}
275-
uses: actions/github-script@7a5c598405937d486b0331594b5da2b14db670da # tag=v6
320+
uses: actions/github-script@7dff1a87643417cf3b95bb10b29f4c4bc60d8ebd # tag=v6
276321
with:
277322
script: |
278323
core.setFailed('Committed charts were not up to date, please regenerate and re-commit!')
@@ -312,16 +357,20 @@ jobs:
312357
REPO: ${{ needs.select_repo.outputs.repository }}
313358
if: needs.select_repo.outputs.repository != 'skip'
314359
steps:
360+
- name: Install protoc
361+
run: |
362+
sudo apt-get update
363+
sudo apt-get install protobuf-compiler
315364
- name: Checkout
316365
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
317366
with:
318367
submodules: recursive
319-
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # tag=v4
368+
- uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 # tag=v4
320369
if: ${{ github.event_name == 'pull_request' }}
321370
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # renovate: tag=v1.0.7
322371
with:
323372
profile: minimal
324-
toolchain: stable
373+
toolchain: "1.63.0"
325374
components: rustfmt
326375
override: true
327376
- name: Install requirements for version tool

.github/workflows/reviewdog.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
17-
- uses: reviewdog/action-actionlint@12f228ecba8c567a103efafb3fb0bf5b60dc16b7 # tag=v1.27.0
17+
- uses: reviewdog/action-actionlint@fe5c2db6029881e0b5634d7cb0d119b0c16b6922 # tag=v1.32.0
1818
with:
1919
github_token: ${{ secrets.GITHUB_TOKEN }}
2020

2121
flake8:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
25-
- uses: actions/setup-python@c4e89fac7e8767b327bbad6cb4d859eda999cf08 # tag=v4
25+
- uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 # tag=v4
2626
with:
2727
python-version: "3.9"
2828
- uses: reviewdog/action-flake8@b6435e67f0cfda225b9e0c9283cfb7ea7c551bdb # tag=v3.6.0
@@ -41,9 +41,10 @@ jobs:
4141
runs-on: ubuntu-latest
4242
steps:
4343
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
44-
- uses: reviewdog/action-markdownlint@b8f945b8bee2a2967214f35956209bc31d3c4d26 # tag=v0.7.1
44+
- uses: reviewdog/action-markdownlint@97e3df02fe1573d505a7b268046a44fa5409cbc3 # tag=v0.9.0
4545
with:
4646
github_token: ${{ secrets.GITHUB_TOKEN }}
47+
markdownlint_flags: '-i README.md .'
4748

4849
shellcheck:
4950
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ target/
1313
Cargo.nix
1414
crate-hashes.json
1515
result
16+
image.tar

.readme/README.md.j2

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{%- set title="Stackable Operator for Apache Kafka" -%}
2+
{%- set operator_name="kafka" -%}
3+
{%- set related_reading_links=[] -%}
4+
5+
{% include "partials/borrowed/header.md.j2" %}
6+
{% include "partials/borrowed/links.md.j2" %}
7+
8+
{% include "partials/main.md.j2" %}
9+
10+
{% include "partials/borrowed/footer.md.j2" %}
11+
12+
{% include "partials/borrowed/related_reading.md.j2" %}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Documentation
2+
3+
The stable documentation for this operator can be found [here](https://docs.stackable.tech/{{operator_name}}/stable/index.html).
4+
If you are interested in the most recent state of this repository, check out the [nightly docs](https://docs.stackable.tech/{{operator_name}}/nightly/index.html) instead.
5+
6+
The documentation for all Stackable products can be found at [docs.stackable.tech](https://docs.stackable.tech).
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
## About The Stackable Data Platform
2+
3+
This operator is written and maintained by [Stackable](https://www.stackable.tech) and it is part of a larger data platform.
4+
5+
![Stackable Data Platform Overview](./.readme/static/borrowed/sdp_overview.png)
6+
7+
Stackable makes it easy to operate data applications in any Kubernetes cluster.
8+
9+
The data platform offers many operators, new ones being added continuously. All our operators are designed and built to be easily interconnected and to be consistent to work with.
10+
11+
The [Stackable GmbH](https://stackable.tech/) is the company behind the Stackable Data Platform. Offering professional services, paid support plans and custom development.
12+
13+
We love open-source!
14+
15+
## Supported Platforms
16+
17+
We develop and test our operators on the following cloud platforms:
18+
19+
* Kubernetes 1.21-1.24
20+
* EKS on Amazon Web Services (AWS)
21+
* GKE on Google Cloud Platform (GCP)
22+
* AKS on Microsoft Azure
23+
* K3s
24+
25+
We are currently working to support:
26+
27+
* OpenShift
28+
29+
## Other Operators
30+
31+
These are the operators that are currently part of the Stackable Data Platform:
32+
33+
- [Stackable Operator for Apache Airflow](https://github.com/stackabletech/airflow-operator)
34+
- [Stackable Operator for Apache Druid](https://github.com/stackabletech/druid-operator)
35+
- [Stackable Operator for Apache HBase](https://github.com/stackabletech/hbase-operator)
36+
- [Stackable Operator for Apache Hadoop HDFS](https://github.com/stackabletech/hdfs-operator)
37+
- [Stackable Operator for Apache Hive](https://github.com/stackabletech/hive-operator)
38+
- [Stackable Operator for Apache Kafka](https://github.com/stackabletech/kafka-operator)
39+
- [Stackable Operator for Apache NiFi](https://github.com/stackabletech/nifi-operator)
40+
- [Stackable Operator for Apache Spark](https://github.com/stackabletech/spark-k8s-operator)
41+
- [Stackable Operator for Apache Superset](https://github.com/stackabletech/superset-operator)
42+
- [Stackable Operator for Trino](https://github.com/stackabletech/trino-operator)
43+
- [Stackable Operator for Apache ZooKeeper](https://github.com/stackabletech/zookeeper-operator)
44+
45+
And our internal operators:
46+
47+
- [Commons Operator](https://github.com/stackabletech/commons-operator)
48+
- [Listener Operator](https://github.com/stackabletech/listener-operator)
49+
- [OpenPolicyAgent Operator](https://github.com/stackabletech/opa-operator)
50+
- [Secret Operator](https://github.com/stackabletech/secret-operator)
51+
52+
## Contributing
53+
54+
Contributions are welcome. Follow our [Contributors Guide](https://docs.stackable.tech/home/stable/contributor/index.html) to learn how you can contribute.
55+
56+
## License
57+
58+
[Open Software License version 3.0](./LICENSE).
59+
60+
## Support
61+
62+
You can use this project under different licenses. Get started with the community edition! If you want professional support, [we offer subscription plans](https://stackable.tech/en/plans/).
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<p align="center">
2+
<img width="150" src="./.readme/static/borrowed/Icon_Stackable.svg" alt="Stackable Logo"/>
3+
</p>
4+
5+
<h1 align="center">{{title}}</h1>

.readme/partials/borrowed/links.md.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[![Build Actions Status](https://ci.stackable.tech/job/{{operator_name}}%2doperator%2dit%2dnightly/badge/icon?subject=Integration%20Tests)](https://ci.stackable.tech/job/{{operator_name}}%2doperator%2dit%2dnightly)
2+
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/stackabletech/{{operator_name}}-operator/graphs/commit-activity)
3+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)](https://docs.stackable.tech/home/stable/contributor/index.html)
4+
[![License OSL3.0](https://img.shields.io/badge/license-OSL3.0-green)](./LICENSE)
5+
6+
[Documentation](https://docs.stackable.tech/{{operator_name}}-operator/stable/index.html) {% if quickstart_link %}| [Quickstart]({{quickstart_link}}) {% endif %}| [Stackable Data Platform](https://stackable.tech/) | [Platform Docs](https://docs.stackable.tech/)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{%- if related_reading_links -%}
2+
## Related Reading
3+
{% for (text, link) in related_reading_links %}
4+
* [{{text}}]({{link}})
5+
{%- endfor %}
6+
{%- endif -%}

.readme/partials/main.md.j2

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
This is a Kubernetes operator to manage [Apache Kafka](https://kafka.apache.org/) clusters.
2+
3+
It is part of the Stackable Data Platform, a curated selection of the best open source data apps like Kafka, Druid, Trino or Spark, [all](#other-operators) working together seamlessly. Based on Kubernetes, it runs everywhere – [on prem or in the cloud]((#supported-platforms)).
4+
5+
## Installation
6+
7+
You can install the operator using [stackablectl or helm](https://docs.stackable.tech/kafka/stable/getting_started/installation.html).
8+
9+
Read on to get started with it, or see it in action in one of our [demos](https://stackable.tech/en/demos/).
10+
11+
## Getting Started
12+
13+
You can follow this [tutorial](https://docs.stackable.tech/kafka/stable/getting_started/first_steps.html) to create a Kafka cluster with three replicas.
14+
15+
{% include "partials/borrowed/documentation.md.j2" %}
16+
17+
## What Does This Do?
18+
19+
This operator is managing Kafka in Kubernetes. It is part of the Stackable Data Platform, a
20+
21+
Operators observe custom resources in a Kubernetes cluster, and manages the application it's responsible for according to the desired state specified in those custom resources.
22+
23+
Here's an example how a custom resource to bring up a 3-replica Kafka cluster can look like:
24+
25+
```
26+
---
27+
apiVersion: kafka.stackable.tech/v1alpha1
28+
kind: KafkaCluster
29+
metadata:
30+
name: simple-kafka
31+
spec:
32+
version: 3.2.0-stackable0.1.0
33+
zookeeperConfigMapName: simple-kafka-znode
34+
config:
35+
tls: null
36+
brokers:
37+
roleGroups:
38+
default:
39+
replicas: 3
40+
```
41+
42+
If you want to find out more about it, take a look at this [getting started guide](https://docs.stackable.tech/kafka/stable/getting_started/first_steps.html).
43+
44+
## Behind the Scenes
45+
46+
This operator is written by [Stackable](https://www.stackable.tech). It uses [kube.rs](https://kube.rs/) to interact with the Kubernetes control plane.
47+
48+
We test it [extensively](https://ci.stackable.tech/) using [Kuttl](https://kuttl.dev/)-powered integration tests on managed Kubernetes of multiple cloud platforms and our own bare-metal clusters.

0 commit comments

Comments
 (0)