Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ on:
# The branches below must be a subset of the branches above
branches: [main]
paths:
- 'charts/**'
- 'charts/kavir/templates/*'
- 'charts/kavir/Chart.yaml'
- '.github/workflows/lint-test.yml'

jobs:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ kavir can observe all [kubernetes workload resources](https://kubernetes.io/docs

## kavir - container image

The container is based on [bitnamis kubectl container](https://github.com/bitnami/containers/tree/main/bitnami/kubectl) published under the [Apache2 License](https://www.apache.org/licenses/LICENSE-2.0). It uses a bash file which gathers information via `kubectl` and commits them as csv files to the predefined git repository. Look inside the `docker` folder to read more about it and how to use it.
The container uses a bash script to gather information via `kubectl` and commits them as csv files to the predefined git repository. Look inside the `docker/` folder to read more about it and how to use it.

## helm chart

The helm chart uses the container image described above to create a [kubernetes cronjob](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/) inside the kubernetes cluster which periodically updates the csv files in the predefined git repository. Look inside the `charts/kavir/` folder to read more about it and how to use it.

## html-report-builder

The html-report-builder is a python script that uses the csv files to build a html report (static html file). Look inside the `html-report-builder` folder to read more about it and how to use it.
The html-report-builder is a python script that uses the csv files to build a html report (static html file). Look inside the `html-report-builder/` folder to read more about it and how to use it.

## git-pages

Pipeline templates to utilise the pipeline and pages features of a git hosting service in a convenient way to run kavirs html-report-builder. Look inside the `git-pages` folder to read more about it and how to use it.
Pipeline templates to utilise the pipeline and pages features of a git hosting service in a convenient way to run kavirs html-report-builder. Look inside the `git-pages/` folder to read more about it and how to use it.
2 changes: 1 addition & 1 deletion charts/kavir/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# kavir - **K**ubernetes **A**pplication **V**ers**I**on **R**eporter - helm

The helm chart uses the container image described in the `docker` folder to create a [kubernetes cronjob](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/) inside the kubernetes cluster which periodically updates the csv files in the predefined git repository.
The helm chart uses the container image described in the `docker/` folder to create a [kubernetes cronjob](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/) inside the kubernetes cluster which periodically updates the csv files in the predefined git repository.

## values.yaml

Expand Down
2 changes: 1 addition & 1 deletion charts/kavir/values.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cronjob:
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
containerRegistry:
image: ghcr.io/telekom-mms/kavir:1.0.1
image: ghcr.io/telekom-mms/kavir:1.2.0
dockerconfigjson: '{"auths":{"ghcr.io":{"username":"xxxxx","password":"xxxxx","email":"kavir@acme.de","auth":"xxxxx"}}}'
git:
repoUrl: https://git.acme.de/repo.git
Expand Down
31 changes: 22 additions & 9 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
FROM bitnami/kubectl:1.33
FROM debian:trixie-20250908-slim

LABEL org.opencontainers.image.authors="I-Am-hehu" \
org.opencontainers.image.base.name="bitnami/kubectl" \
org.opencontainers.image.created="2025-07-09T16:00:00Z" \
org.opencontainers.image.base.name="debian:trixie-20250908-slim" \
org.opencontainers.image.created="2025-09-28T16:00:00Z" \
org.opencontainers.image.description="kavir forwards information about applications in a kubernetes cluster to a git repository. This way software and stakeholders without access to the kubernetes cluster can still see the image names and versions that are used by the applications in the cluster." \
org.opencontainers.image.documentation="https://github.com/telekom-mms/kavir/tree/main" \
org.opencontainers.image.source="https://github.com/telekom-mms/kavir/tree/main" \
org.opencontainers.image.documentation="https://github.com/telekom-mms/kavir" \
org.opencontainers.image.source="https://github.com/telekom-mms/kavir" \
org.opencontainers.image.title="kavir" \
org.opencontainers.image.url="https://github.com/telekom-mms/kavir/tree/main" \
org.opencontainers.image.url="https://github.com/telekom-mms/kavir" \
org.opencontainers.image.vendor="Deutsche Telekom MMS GmbH" \
org.opencontainers.image.version="1.1.0"
org.opencontainers.image.version="1.2.0"

COPY ./kavir.bash /opt/kavir.bash
ENTRYPOINT /bin/bash /opt/kavir.bash
RUN apt-get update && apt-get install -y \
bash \
curl \
git \
&& curl -LO "https://dl.k8s.io/v1.34.0/bin/linux/amd64/kubectl" && chmod +x ./kubectl && mv ./kubectl /usr/local/bin/kubectl \
&& apt-get clean

COPY ./kavir.bash /usr/local/bin/kavir.bash
RUN chmod +x /usr/local/bin/kavir.bash

RUN groupadd --gid 1001 kavir && \
useradd --uid 1001 --gid 1001 kavir
USER 1001

ENTRYPOINT ["kavir.bash"]
6 changes: 3 additions & 3 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# kavir - **K**ubernetes **A**pplication **V**ers**I**on **R**eporter - docker

The container is based on [bitnamis kubectl container](https://github.com/bitnami/containers/tree/main/bitnami/kubectl) published under the [Apache2 License](https://www.apache.org/licenses/LICENSE-2.0). It uses a bash file which gathers information via `kubectl` and commits them as csv files to the predefined git repository.
The container uses the `kavir.bash` script to gather information via `kubectl` and commits them as csv files to the predefined git repository.

## environment variables

Expand Down Expand Up @@ -53,15 +53,15 @@ A `cronjobs.csv` could look like this:

```csv
Name,Image:Tag
kavir,ghcr.io/telekom-mms/kavir:1.0.1
kavir,ghcr.io/telekom-mms/kavir:1.2.0
my-cronjob,container-registry.acme.de/cronjobs/my-cronjob:1.0.0
```

If `reportNamespaces` is set to `true`, the `cronjobs.csv` will look like this:

```csv
Name,Namespace,Image:Tag
kavir,monitoring,ghcr.io/telekom-mms/kavir:1.0.1
kavir,monitoring,ghcr.io/telekom-mms/kavir:1.2.0
my-cronjob,app,container-registry.acme.de/cronjobs/my-cronjob:1.0.0
```

Expand Down
7 changes: 7 additions & 0 deletions docker/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this component will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.2.0

### Changed

* updated base image: `bitnami/kubectl:1.33` -> `debian:trixie-20250908-slim`
* updated kubectl: `v1.33.3` -> `v1.34.0`

## 1.1.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion docker/examples/dev/cronjobs.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Name,Namespace,Image:Tag
kavir,monitoring,ghcr.io/telekom-mms/kavir:1.0.1
kavir,monitoring,ghcr.io/telekom-mms/kavir:1.2.0
my-cronjob,app,container-registry.acme.de/cronjobs/my-cronjob:1.0.0
2 changes: 1 addition & 1 deletion docker/examples/dev/deployments.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name,Namespace,Image:Tag
cmcc-operator,app,ghcr.io/telekom-mms/cmcc-operator/cmcc-operator:v1.14.15
gitea,gitea,docker.io/bitnami/gitea:1.22.3-debian-12-r0
gitea,gitea,docker.io/gitea/gitea:latest-rootless
my-deployment,app,container-registry.acme.de/deployments/my-deployment:0.4.2
trivy-dojo-operator,monitoring,ghcr.io/telekom-mms/docker-trivy-dojo-operator:0.7.2
2 changes: 1 addition & 1 deletion docker/examples/prod/cronjobs.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Name,Image:Tag
kavir,ghcr.io/telekom-mms/kavir:2.0.0
kavir,ghcr.io/telekom-mms/kavir:1.2.0
my-cronjob,container-registry.acme.de/cronjobs/my-cronjob:1.0.0
2 changes: 1 addition & 1 deletion docker/examples/prod/deployments.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name,Image:Tag
cmcc-operator,ghcr.io/telekom-mms/cmcc-operator/cmcc-operator:v1.14.15
gitea,docker.io/bitnami/gitea:1.22.3-debian-12-r0
gitea,gitea,docker.io/gitea/gitea:latest-rootless
my-deployment,container-registry.acme.de/deployments/my-deployment:1.0.0
trivy-dojo-operator,ghcr.io/telekom-mms/docker-trivy-dojo-operator:0.7.2
3 changes: 2 additions & 1 deletion docker/kavir.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
# https://github.com/telekom-mms/kavir
# kavir - docker
# version: 1.1.0
# version: 1.2.0

declare -A reportScope
reportScope=(
Expand Down
6 changes: 3 additions & 3 deletions html-report-builder/examples/dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ <h2>deployments</h2>
<td>gitea</td>

<td>gitea</td>
<td>docker.io/bitnami/gitea<br /></td>
<td>1.22.3-debian-12-r0<br /></td>
<td>docker.io/gitea/gitea<br /></td>
<td>latest-rootless<br /></td>
</tr>
<tr>
<td>my-deployment</td>
Expand Down Expand Up @@ -162,7 +162,7 @@ <h2>cronjobs</h2>

<td>monitoring</td>
<td>ghcr.io/telekom-mms/kavir<br /></td>
<td>1.0.1<br /></td>
<td>1.2.0<br /></td>
</tr>
<tr>
<td>my-cronjob</td>
Expand Down
6 changes: 3 additions & 3 deletions html-report-builder/examples/prod.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ <h2>deployments</h2>
</tr>
<tr>
<td>gitea</td>
<td>docker.io/bitnami/gitea<br /></td>
<td>1.22.3-debian-12-r0<br /></td>
<td>docker.io/gitea/gitea<br /></td>
<td>latest-rootless<br /></td>
</tr>
<tr>
<td>my-deployment</td>
Expand Down Expand Up @@ -148,7 +148,7 @@ <h2>cronjobs</h2>
<tr>
<td>kavir</td>
<td>ghcr.io/telekom-mms/kavir<br /></td>
<td>2.0.0<br /></td>
<td>1.2.0<br /></td>
</tr>
<tr>
<td>my-cronjob</td>
Expand Down