Skip to content

Commit

Permalink
feat!: cmak2zk moved to cmak-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
eshepelyuk committed May 13, 2022
1 parent 19eb388 commit bd786d2
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 243 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: volesen/setup-skaffold@v1.1
with:
version: v1.38.0
- uses: extractions/setup-just@v1
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: bahmutov/npm-install@v1
- run: npx semantic-release
env:
Expand Down
6 changes: 3 additions & 3 deletions .helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ venv
*.py
*.txt
.release-it.json
*.md
CONTRIBUTING.md
skaffold.yaml
values-lint.yaml
node_modules
README.adoc
*.sh
package-lock.json
package.json
*.puml
.editorconfig
.dockerignore
test/
cmak2zk/
justfile

4 changes: 0 additions & 4 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@ plugins:
-
- '@eshepelyuk/semantic-release-helm-oci'
- registry: oci://ghcr.io/eshepelyuk/helm
skipAppVersion: true
-
- "@semantic-release/exec"
- publishCmd: "just publish ${nextRelease.version}"
38 changes: 0 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


# CMAK (prev. Kafka Manager) for Kubernetes

[![Current](https://img.shields.io/github/v/tag/eshepelyuk/cmak-operator?logo=github&sort=semver&style=for-the-badge&label=current)](https://github.com/eshepelyuk/cmak-operator/releases/latest)
Expand Down Expand Up @@ -128,42 +126,6 @@ cmak:
1. applied only to `cluster-stage`.
1. applied only to `cluster-prod`.

## Standalone cmak2zk tool

`cmak2zk` was developed as a part of CMAK operator and actively used by the operator itself.
But the same time this tool could be used on its own outside of Helm charts and Kubernetes.

Its purpose is to take Kafka cluster configuration for CMAK in YAML format
and populate CMAK compatible config in Zookeeper.
This allows to avoid manual configuration of CMAK and provides better possibilities
to use CMAK in declarative configuration or GitOps based flows.

`cmak2zk` is distributed as [docker image](https://github.com/users/eshepelyuk/packages/container/package/cmak2zk).

To check out available options, run the image without parameters.

```sh
docker run ghcr.io/eshepelyuk/dckr/cmak2zk:latest
```

Example `docker-compose` and Kafka cluster configuration are located at
[cmak2zk/examples](https://github.com/eshepelyuk/cmak-operator/tree/master/cmak2zk/examples) directory.
One could run them using commands below.

```sh
curl -sLo clusters.yaml \
https://raw.githubusercontent.com/eshepelyuk/cmak-operator/master/cmak2zk/examples/clusters.yaml
curl -sLo docker-compose-cmak2zk.yaml \
https://raw.githubusercontent.com/eshepelyuk/cmak-operator/master/cmak2zk/examples/docker-compose-cmak2zk.yaml
docker-compose -f docker-compose-cmak2zk.yaml up
```

Wait for some time until components are stabilizing, it may take up to 5 mins.
Then, open your browser at http://localhost:9000.
There should be two pre-configured clusters, pointing to the same Kafka instance, running in Docker.

## Alternatives

[AKHQ](https://akhq.io/) project seems to be the most active open source tool
Expand Down
10 changes: 0 additions & 10 deletions cmak2zk/Dockerfile

This file was deleted.

63 changes: 0 additions & 63 deletions cmak2zk/cmak2zk.py

This file was deleted.

48 changes: 0 additions & 48 deletions cmak2zk/examples/clusters.yaml

This file was deleted.

42 changes: 0 additions & 42 deletions cmak2zk/examples/docker-compose-cmak2zk.yaml

This file was deleted.

14 changes: 1 addition & 13 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
skaffoldTags := "tags.json"
export E2E_TEST := "default"

default:
@just --list
@just --list

test-lint:
./test/linter/test.sh
Expand Down Expand Up @@ -62,14 +61,3 @@ test-e2e-sh: _chk-py
# run single e2e test
test-e2e: up test-e2e-sh

publish version:
#!/usr/bin/env bash
set -euxo pipefail
skaffold build -t {{version}} --file-output={{skaffoldTags}}

LATEST="$(jq -r .builds[0].imageName {{skaffoldTags}}):latest"
CURRENT="$(jq -r .builds[0].tag {{skaffoldTags}})"

docker tag $CURRENT $LATEST
docker push $LATEST
11 changes: 0 additions & 11 deletions skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ apiVersion: skaffold/v2beta28
kind: Config
metadata:
name: cmak-operator
build:
artifacts:
- image: ghcr.io/eshepelyuk/dckr/cmak2zk
context: ./cmak2zk
local:
push: true
useBuildkit: true
deploy:
helm:
releases:
Expand All @@ -21,7 +14,3 @@ deploy:
- "test/e2e/{{.E2E_TEST}}/values.yaml"
upgradeOnChange: false
skipBuildDependencies: true
artifactOverrides:
reconcile.image: ghcr.io/eshepelyuk/dckr/cmak2zk
imageStrategy:
helm: {}
4 changes: 2 additions & 2 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cmak:
reconcile:
image:
repository: "ghcr.io/eshepelyuk/dckr/cmak2zk"
tag: "" # chart's version
tag: "1.0.0"
pullPolicy: IfNotPresent
schedule: "*/3 * * * *"
overwriteZk: true
Expand All @@ -64,7 +64,7 @@ reconcile:
ui:
image:
repository: "ghcr.io/eshepelyuk/dckr/cmak-3.0.0.5"
tag: "0.1.2"
tag: "1.0.0"
pullPolicy: IfNotPresent
port: 9000
# additional command line arguments
Expand Down

0 comments on commit bd786d2

Please sign in to comment.