Skip to content

Commit e14f170

Browse files
committed
Auto Format
1 parent 9ad12ba commit e14f170

File tree

2 files changed

+99
-11
lines changed

2 files changed

+99
-11
lines changed

README.md

Lines changed: 91 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,40 @@
1-
# GitOps for Apache Kafka Example
1+
2+
<!-- markdownlint-disable -->
3+
# Kafka GitOps Example
4+
<!-- markdownlint-restore -->
5+
6+
[![README Header][readme_header_img]][readme_header_link]
7+
8+
<!--
9+
10+
11+
12+
13+
** DO NOT EDIT THIS FILE
14+
**
15+
** This file was automatically generated by the `build-harness`.
16+
** 1) Make all changes to `README.yaml`
17+
** 2) Run `make init` (you only need to do this once)
18+
** 3) Run`make readme` to rebuild this file.
19+
**
20+
** (We maintain HUNDREDS of open source projects. This is how we maintain our sanity.)
21+
**
22+
23+
24+
25+
26+
27+
-->
28+
A Kafka / Confluent GitOps workflow example for multi-env deployments with Flux, Kustomize, Helm and Confluent Operator
29+
30+
---
31+
32+
33+
34+
35+
36+
37+
## Usage
238

339
For this example we assume a single cluster simulating a production confluent environment. The end goal is to leverage Flux and Kustomize to manage [Confluent Operator for Kubernetes](https://github.com/confluentinc/operator-earlyaccess). You can extend with another cluster while minimizing duplicated declarations.
440

@@ -8,11 +44,11 @@ Flux will monitor the Helm repository, and can be configured to automatically up
844
You may find this project helpful by simply referencing the documentation, code, and strategies for managing Kafka resources on Kubernetes. Additionally, if you just wish to operate a working example of the new Confluent operator, the following usage instructions will guide you.
945

1046

11-
## Repository structure
47+
### Repository structure
1248

1349
The Git repository contains the following top directories:
1450

15-
- **flux-system** dir contains the required kubernetes resources for flux to operate
51+
- **flux-system** dir contains the required kubernetes resources for flux to operate
1652
- **kustomize/base** dir contains the base definition of the confluent stack.
1753
- **kustomize/environments** dir containing an example environment, folders could be copied to create additional environments. Files within are 'patches' which are layered on top of the definitions found in kustomize/base
1854
- **kustomize/operator** dir the helm chart definition for confluent-for-kubernetes (CFK).
@@ -28,11 +64,11 @@ The Git repository contains the following top directories:
2864
│ └── operator
2965
```
3066

31-
## Forking this repository.
67+
### Forking this repository.
3268
In order to showcase the GitOps behaviour of the FluxCD toolkit you will require the ability to write to a repository. Fork this repository, and update line 11 of the file `./flux-system/gotk-sync.yaml` to the new https git address of your forked repository. Also make note of line 10 'branch'; this is the branch of the repository which Flux will monitor
3369

34-
## Deploy base Flux components
35-
### Overview
70+
### Deploy base Flux components
71+
#### Overview
3672
This step will install the base Flux kubernetes components onto your kubernetes cluster. To inspect what is being applied, simply look through the contents of `./flux-system/gotk-components.yaml`. You will see a mix of Custom Resource Definitions, Service Accounts, Deployments, and other various components. After the application of these resource definitions is completed, you should see the following pods running:
3773

3874
* Helm-Controller
@@ -43,20 +79,24 @@ This step will install the base Flux kubernetes components onto your kubernetes
4379
For more information on what these controllers do, please review [the documentation here](https://fluxcd.io/docs/components/).
4480

4581

82+
83+
84+
## Examples
85+
4686
### Deployment Process
4787
* Navigate to `./flux-system`
4888
* Run `kubectl apply -f gotk-components.yaml`
4989

5090

51-
## Deploy Flux Sync
52-
### Overview
91+
### Deploy Flux Sync
92+
#### Overview
5393
This next step will tell Flux what repository to monitor, and, within that repository, what kustomization files to start with. The first Kustomize resource that Flux will look for to is located at `./kustomize/operator`. This will install the confluent-for-kubernetes Helm chart. After a successful health check of the operator (which will run as a pod), Flux will then proceed to deploy our first environment located at `./kustomize/environments/sandbox`.
5494

5595
### Deployment Process
5696
* Navigate to `./flux-system`
5797
* run `kubectl apply -f gotk-sync.yaml`
5898

59-
## Watch Flux in action!
99+
#### Watch Flux in action!
60100
Now that we have flux monitoring the forked Git repository, let's demonstrate the GitOps behaviour! If everything has deployed successfully, you should see a healthy confluent stack looking like this:
61101
```console
62102
│ NAME PF READY RESTARTS STATUS IP NODE AGE │
@@ -74,9 +114,9 @@ Now that we have flux monitoring the forked Git repository, let's demonstrate th
74114
75115
```
76116
To exhibit Flux, let's change our kafka replicas from the default of 3, to 4:
77-
* In the file `./kustomize/environments/sandbox/kafka.yaml` uncomment the line `# replicas: 4`, commit that change to your repository (git), and push upstream. The next time flux performs a 'sync' (observable in the 'source controller' logs), it will the change to the kafka spec, and in turn increase our kafka cluster from size '3' to '4'.
117+
* In the file `./kustomize/environments/sandbox/kafka.yaml` uncomment the line `# replicas: 4`, commit that change to your repository (git), and push upstream. The next time flux performs a 'sync' (observable in the 'source controller' logs), it will the change to the kafka spec, and in turn increase our kafka cluster from size '3' to '4'.
78118

79-
## Develop Locally
119+
### Develop Locally
80120
If you want to test configuration out locally without the need to push up to git (i.e. testing locally with Minikube), the deployment can be replicated very simply:
81121

82122
* Navigate to `./flux-system`
@@ -93,3 +133,43 @@ If you want to test configuration out locally without the need to push up to git
93133
* Run `kubectl apply -k .`
94134

95135

136+
137+
138+
139+
## Related Projects
140+
141+
Check out these related projects.
142+
143+
- [Confluent for Kubernetes (CFK) examples](https://github.com/osodevops/confluent-kubernetes-playground) - Playground for Kafka / Confluent Kubernetes experimentations
144+
145+
146+
147+
## Need some help
148+
149+
File a GitHub [issue](https://github.com/osodevops/kafka-gitops-examples/issues), send us an [email][email] or [tweet us][twitter].
150+
151+
## The legals
152+
153+
Copyright © 2017-2021 [OSO](https://oso.sh) | See [LICENCE](LICENSE) for full details.
154+
155+
[<img src="https://oso-public-resources.s3.eu-west-1.amazonaws.com/oso-logo-green.png" alt="OSO who we are" width="250"/>](https://oso.sh/who-we-are/)
156+
157+
## Who we are
158+
159+
We at [OSO][website] help teams to adopt emerging technologies and solutions to boost their competitiveness, operational excellence and introduce meaningful innovations that drive real business growth. Our developer-first culture, combined with our cross-industry experience and battle-tested delivery methods allow us to implement the most impactful solutions for your business.
160+
161+
Looking for support applying emerging technologies in your business? We’d love to hear from you, get in touch by [email][email]
162+
163+
Start adopting new technologies by checking out [our other projects][github], [follow us on twitter][twitter], [join our team of leaders and challengers][careers], or [contact us][contact] to find the right technology to support your business.[![Beacon][beacon]][website]
164+
165+
[logo]: https://oso-public-resources.s3.eu-west-1.amazonaws.com/oso-logo-green.png
166+
[website]: https://oso.sh?utm_source=github&utm_medium=readme&utm_campaign=osodevops/kafka-gitops-examples&utm_content=website
167+
[github]: https://github.com/osodevops?utm_source=github&utm_medium=readme&utm_campaign=osodevops/kafka-gitops-examples&utm_content=github
168+
[careers]: https://oso.sh/careers/?utm_source=github&utm_medium=readme&utm_campaign=osodevops/kafka-gitops-examples&utm_content=careers
169+
[contact]: https://oso.sh/contact/?utm_source=github&utm_medium=readme&utm_campaign=osodevops/kafka-gitops-examples&utm_content=contact
170+
[linkedin]: https://www.linkedin.com/company/oso-devops?utm_source=github&utm_medium=readme&utm_campaign=osodevops/kafka-gitops-examples&utm_content=linkedin
171+
[twitter]: https://twitter.com/osodevops?utm_source=github&utm_medium=readme&utm_campaign=osodevops/kafka-gitops-examples&utm_content=twitter
172+
[email]: mailto:[email protected]?utm_source=github&utm_medium=readme&utm_campaign=osodevops/kafka-gitops-examples&utm_content=email
173+
[readme_header_img]: https://oso-public-resources.s3.eu-west-1.amazonaws.com/oso-animation.gif
174+
[readme_header_link]: https://oso.sh/what-we-do/?utm_source=github&utm_medium=readme&utm_campaign=osodevops/kafka-gitops-examples&utm_content=readme_header_link
175+
[beacon]: https://github-analyics.ew.r.appspot.com/G-WV0Q3HYW08/osodevops/kafka-gitops-examples?pixel&cs=github&cm=readme&an=kafka-gitops-examples

docs/targets.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!-- markdownlint-disable -->
2+
## Makefile Targets
3+
```text
4+
Available targets:
5+
6+
7+
```
8+
<!-- markdownlint-restore -->

0 commit comments

Comments
 (0)