Skip to content

Commit

Permalink
Rename project to Kaap (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoloboschi authored Jun 28, 2023
1 parent d7d288d commit 10c4e56
Show file tree
Hide file tree
Showing 327 changed files with 27,390 additions and 27,390 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci-release-operator-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,29 @@ jobs:
- name: Install Helm releaser
run: |
#!/bin/bash
chart=helm/k8saap
chart=helm/kaap
helm dependency update "$chart"
helm package "$chart" --destination .cr-release-packages
- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: helm/k8saap
charts_dir: helm/kaap
skip_packaging: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Update doc
run: |
cd helm/k8saap
cd helm/kaap
docker run --rm --volume "$(pwd):/helm-docs" -u $(id -u) jnorwood/helm-docs:latest
mv README.md /tmp/README.md
cd ../..
git reset --hard
git checkout gh-pages
mkdir -p k8saap
mv /tmp/README.md k8saap/README.md
git add k8saap/README.md
git commit -m "k8saap/README.md"
mkdir -p kaap
mv /tmp/README.md kaap/README.md
git add kaap/README.md
git commit -m "kaap/README.md"
git pull --rebase origin gh-pages
git push origin gh-pages
8 changes: 4 additions & 4 deletions .github/workflows/ci-release-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
mvn clean install -DskipTests -Pskip-crds
docker_tag=${GITHUB_REF/refs\/tags\/operator-/}
docker tag datastax/k8saap:latest-dev datastax/k8saap:$docker_tag
docker tag datastax/k8saap:latest-dev datastax/k8saap:latest
docker push datastax/k8saap:$docker_tag
docker push datastax/k8saap:latest
docker tag datastax/kaap:latest-dev datastax/kaap:$docker_tag
docker tag datastax/kaap:latest-dev datastax/kaap:latest
docker push datastax/kaap:$docker_tag
docker push datastax/kaap:latest
- uses: ncipollo/release-action@v1
with:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci-release-stack-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,29 @@ jobs:
- name: Install Helm releaser
run: |
#!/bin/bash
chart=helm/k8saap-stack
chart=helm/kaap-stack
helm dependency update "$chart"
helm package "$chart" --destination .cr-release-packages
- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: helm/k8saap-stack
charts_dir: helm/kaap-stack
skip_packaging: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Update doc
run: |
cd helm/k8saap-stack
cd helm/kaap-stack
docker run --rm --volume "$(pwd):/helm-docs" -u $(id -u) jnorwood/helm-docs:latest
mv README.md /tmp/README.md
cd ../..
git reset --hard
git checkout gh-pages
mkdir -p k8saap-stack
mv /tmp/README.md k8saap-stack/README.md
git add k8saap-stack/README.md
git commit -m "k8saap-stack/README.md"
mkdir -p kaap-stack
mv /tmp/README.md kaap-stack/README.md
git add kaap-stack/README.md
git commit -m "kaap-stack/README.md"
git pull --rebase origin gh-pages
git push origin gh-pages
8 changes: 4 additions & 4 deletions .github/workflows/ci-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ jobs:
chart=$1
cat $chart/Chart.yaml | grep "repository:" | grep -e "https://" -e "http://" | awk '{print $2}' | awk -F'/' '{print $NF} {print $0}' | xargs -n2 helm repo add
}
add_repos helm/k8saap-stack
add_repos helm/kaap-stack
helm dependency build helm/k8saap
helm dependency build helm/k8saap-stack
helm dependency build helm/kaap
helm dependency build helm/kaap-stack
if: ${{ matrix.setup_helm == 'true' }}

- name: Set up JDK 17
Expand All @@ -111,7 +111,7 @@ jobs:
#!/bin/bash
mvn -B -ntp -nsu test -pl tests \
-Dgroups='${{ matrix.group }}' \
-Dk8saap.tests.env.existing.k3s.agents='${{ matrix.num_agents }}'
-Dkaap.tests.env.existing.k3s.agents='${{ matrix.num_agents }}'
- name: Upload Surefire reports
uses: actions/upload-artifact@v3
Expand Down
6 changes: 3 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This will create a new tag `operator-<version>`, bump the pom versions and push
Run the following command:

```bash
./release/release.sh k8saap-stack <version>
./release/release.sh kaap-stack <version>
```

This will create a new tag `stack-<version>`, bump the chart version, creates a new Github release with the chart tarball and update the docs.
Expand All @@ -36,7 +36,7 @@ This will create a new tag `stack-<version>`, bump the chart version, creates a
Run the following command:

```bash
./release/release.sh k8saap <version>
./release/release.sh kaap <version>
```

This will create a new tag `k8saap-<version>`, bump the chart version, creates a new Github release with the chart tarball and update the docs.
This will create a new tag `kaap-<version>`, bump the chart version, creates a new Github release with the chart tarball and update the docs.
2 changes: 1 addition & 1 deletion bin/migration-tool
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

this_dir=$( dirname -- "${BASH_SOURCE[0]}" )
CP=$(cat $this_dir/../migration-tool/target/classpath.txt)
exec java -cp "$CP:$this_dir/../migration-tool/target/*" com.datastax.oss.k8saap.migrationtool.Main "$@"
exec java -cp "$CP:$this_dir/../migration-tool/target/*" com.datastax.oss.kaap.migrationtool.Main "$@"
4 changes: 2 additions & 2 deletions dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Run the operator locally but targeting the remote cluster:
./dev/run-dev-mode.sh
```

Note that CRDs are not re-applied when they change. If you change the CRDs, you have to stop the process, build the `k8saap` module (`mvn package`) and restart the dev mode.
Note that CRDs are not re-applied when they change. If you change the CRDs, you have to stop the process, build the `kaap` module (`mvn package`) and restart the dev mode.


## Deploy a pulsar cluster
Expand All @@ -26,5 +26,5 @@ You must disable the operator deployment in the chart because it's served by the

For example, you can install the bookie racks example:
```
helm install k8saap helm/k8saap --values helm/examples/bookie-racks/values.yaml --set operator.enabled=false
helm install kaap helm/kaap --values helm/examples/bookie-racks/values.yaml --set operator.enabled=false
```
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# K8s Autoscaling for Apache Pulsar Docs
- [K8saap Stack Operator](k8saap-stack.md)
- [K8saap Operator](k8saap.md)
- [Kaap Stack Operator](kaap-stack.md)
- [Kaap Operator](kaap.md)
- [Usage](usage.md)
- [Staged upgrades](staged-upgrades.md)
- [Resource Sets and Racks](resource-sets.md)
Expand Down
6 changes: 3 additions & 3 deletions docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Packages:

- [k8saap.oss.datastax.com/v1alpha1](#k8saapossdatastaxcomv1alpha1)
- [kaap.oss.datastax.com/v1alpha1](#kaapossdatastaxcomv1alpha1)

# k8saap.oss.datastax.com/v1alpha1
# kaap.oss.datastax.com/v1alpha1

Resource Types:

Expand Down Expand Up @@ -33,7 +33,7 @@ Resource Types:
<tbody><tr>
<td><b>apiVersion</b></td>
<td>string</td>
<td>k8saap.oss.datastax.com/v1alpha1</td>
<td>kaap.oss.datastax.com/v1alpha1</td>
<td>true</td>
</tr>
<tr>
Expand Down
18 changes: 9 additions & 9 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ The operator is built upon the [quarkus-operator-sdk](https://quarkiverse.github

## Creates the operator docker image
```
mvn package -DskipTests -pl k8saap -am -Pskip-crds
mvn package -DskipTests -pl kaap -am -Pskip-crds
```

If you want to use a public k8s cluster, you would need to deploy the operator image to DockerHub or another public registry.

```
$dockerhub_repo=<your dockerhub repo>
docker tag datastax/k8saap:latest-dev
$dockerhub_repo/k8saap:latest
docker push $dockerhub_repo/k8saap:latest
docker tag datastax/kaap:latest-dev
$dockerhub_repo/kaap:latest
docker push $dockerhub_repo/kaap:latest
```

## Local deployment
Expand Down Expand Up @@ -60,16 +60,16 @@ This will build and push the new docker image to the container.

### Use the Quarkus dev mode

In this mode, the `k8saap` code is hot reloaded at every change in the source code.
In this mode, the `kaap` code is hot reloaded at every change in the source code.

```
mvn quarkus:dev -pl k8saap -am -Pskip-crds
mvn quarkus:dev -pl kaap -am -Pskip-crds
```

### Deploy the operator and the Pulsar cluster
Check at `helm/examples` to get some ideas about how to deploy a Pulsar cluster.
Note that the k3s registry DOES NOT use your host docker registry, so every image will be downloaded from upstream.
The k3s cluster already contains the dev version of the operator, named `datastax/k8saap:latest-dev`.
The k3s cluster already contains the dev version of the operator, named `datastax/kaap:latest-dev`.
The k3s cluster also contains a Pulsar/LunaStreaming image to use.

### Integration tests
Expand All @@ -83,7 +83,7 @@ mvn -pl tests test -Dtest='CRDsTest' -Prun-tests-current-context
```

If you're using a public cluster (e.g. GCP, EKS) you have to deploy the operator image to a public Docker registry.
You can also use a specific StorageClass for the test by setting ´k8saap.tests.existingenv.storageclass`.
You can also use a specific StorageClass for the test by setting ´kaap.tests.existingenv.storageclass`.

To run a test in GCP:

Expand All @@ -92,7 +92,7 @@ docker push <operator-image>
gcloud container clusters get-credentials gcp-cluster # or set it as current context with kubectl
mvn -pl tests test -Dtest='CRDsTest' -Prun-tests-current-context \
-Dk8saap.tests.operator.image=<operator-image>
-Dkaap.tests.operator.image=<operator-image>
```


Expand Down
10 changes: 5 additions & 5 deletions docs/k8saap-operator.md → docs/kaap-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
K8s Autoscaling for Apache Pulsar manages Apache Pulsar clusters guided by a single CRD, called `PulsarCluster`.

## Installation
The Chart is private so you need to [download](https://github.com/riptano/k8saap/releases/download/k8saap-0.0.2/k8saap-0.0.2.tgz) it first.
The Chart is private so you need to [download](https://github.com/riptano/kaap/releases/download/kaap-0.0.2/kaap-0.0.2.tgz) it first.

Then install the chart using the tarball:
```
helm install k8saap k8saap-0.0.2.tgz
helm install kaap kaap-0.0.2.tgz
```


## Usage

Install a PulsarCluster resource.
```
helm upgrade k8saap k8saap-0.0.2.tgz -f helm/examples/grafana/values.yaml
helm upgrade kaap kaap-0.0.2.tgz -f helm/examples/grafana/values.yaml
```

Wait for the cluster to be up and running
Expand All @@ -25,7 +25,7 @@ kubectl wait pulsar pulsar-cluster --for condition=Ready=True --timeout=240s

Uninstall the operator and the PulsarCluster
```
helm delete k8saap
helm delete kaap
```


Expand All @@ -34,7 +34,7 @@ Since now the CRDs are in version `v1alpha1` you need to replace them when they
Note this is only needed in the early stages of the project.

```
kubectl replace -f helm/k8saap/crds
kubectl replace -f helm/kaap/crds
```
Now you can proceed with the upgrade of the operator.

Expand Down
6 changes: 3 additions & 3 deletions docs/k8saap-stack.md → docs/kaap-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ The chart is able to install:


## Installation
The Chart is private so you need to [download](https://github.com/riptano/k8saap/releases/download/pulsar-stack-0.0.2/pulsar-stack-0.0.2.tgz) it first.
The Chart is private so you need to [download](https://github.com/riptano/kaap/releases/download/pulsar-stack-0.0.2/pulsar-stack-0.0.2.tgz) it first.

Then install the chart using the tarball.
```
helm install k8saap-stack
helm install kaap-stack
```

## Usage

Install the Pulsar stack with a PulsarCluster up and running
```
helm install pulsar pulsar-stack-0.0.2.tgz --set k8saap.cluster.create=true
helm install pulsar pulsar-stack-0.0.2.tgz --set kaap.cluster.create=true
```

Wait for the cluster to be up and running
Expand Down
8 changes: 4 additions & 4 deletions docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Once the report is generated, is up to you to decide if you want to proceed with

### Usage
Java 17+ it's required.
Download the jar from the [latest release](https://github.com/riptano/k8saap/releases).
Download the jar from the [latest release](https://github.com/riptano/kaap/releases).

Create the input file `input-cluster-specs.yaml` with the following content:
```yaml
Expand Down Expand Up @@ -44,9 +44,9 @@ java -jar migration-tool.jar diff -d output/<context-name>
Once you're happy with the report, you can proceed with the migration.
The migration supposes the existing cluster has been created using Helm.

Create a new `values.yaml` file for the operator. Then in the `k8saap.cluster` section copy the crd's spec.
Create a new `values.yaml` file for the operator. Then in the `kaap.cluster` section copy the crd's spec.
```
k8saap:
kaap:
cluster:
create: true
name: <cluster-name>
Expand All @@ -57,7 +57,7 @@ k8saap:
1. Install the operator release with the above values.
```
helm install k8saap datastax/k8saap-stack --values <values.yaml>
helm install kaap datastax/kaap-stack --values <values.yaml>
```
2. Wait for the operator to take control of the cluster. Check the PulsarCluster status to be ready. Since each resource will match the existing ones, the following behaviours are expected:
Expand Down
6 changes: 3 additions & 3 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ global:
This will generate all the secrets needed by the components. The name of each secret is gathered from the `secretName` configured.


The repository contains examples for [real TLS example with acme](https://github.com/riptano/k8saap/tree/main/helm/examples/cert-manager-acme)
and [self-signed certificates](https://github.com/riptano/k8saap/tree/main/helm/examples/cert-manager-self-signed).
The repository contains examples for [real TLS example with acme](https://github.com/riptano/kaap/tree/main/helm/examples/cert-manager-acme)
and [self-signed certificates](https://github.com/riptano/kaap/tree/main/helm/examples/cert-manager-self-signed).


### Affinity, antiaffinity and high availability
Expand Down Expand Up @@ -256,4 +256,4 @@ To get a full list of the spec you can check the [API reference](api-reference.m

## Examples

See some examples in the [docs](https://github.com/riptano/k8saap/tree/main/helm/examples).
See some examples in the [docs](https://github.com/riptano/kaap/tree/main/helm/examples).
2 changes: 1 addition & 1 deletion helm/examples/admin-console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

Install a Pulsar cluster along with the Pulsar Admin Console. In this example, both TLS and authentication are enabled.
```
helm install pulsar helm/k8saap-stack --values helm/examples/admin-console/values.yaml --set cert-manager.global.leaderElection.namespace=default
helm install pulsar helm/kaap-stack --values helm/examples/admin-console/values.yaml --set cert-manager.global.leaderElection.namespace=default
```
2 changes: 1 addition & 1 deletion helm/examples/admin-console/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#

k8saap:
kaap:
cluster:
create: true
spec:
Expand Down
2 changes: 1 addition & 1 deletion helm/examples/bkvm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

Install a Pulsar cluster along with the BookKeeper Visual Manager.
```
helm install pulsar helm/k8saap-stack --values helm/examples/bkvm/values.yaml
helm install pulsar helm/kaap-stack --values helm/examples/bkvm/values.yaml
```
2 changes: 1 addition & 1 deletion helm/examples/bkvm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#

k8saap:
kaap:
cluster:
create: true
spec:
Expand Down
2 changes: 1 addition & 1 deletion helm/examples/bookie-autoscaling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
Bookie autoscaling is a feature that allows to scale up/down the number of bookies in a cluster based on the current disk usage.

```
helm install k8saap helm/k8saap \
helm install kaap helm/kaap \
--values helm/examples/bookie-autoscaling/values.yaml
```
Loading

0 comments on commit 10c4e56

Please sign in to comment.