Skip to content

Commit cd59392

Browse files
committed
Merge remote-tracking branch 'origin/main' into issues/53
2 parents 954bb32 + 0f0e2a9 commit cd59392

File tree

175 files changed

+3385
-1093
lines changed

Some content is hidden

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

175 files changed

+3385
-1093
lines changed

.dev/dev_arm64.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ services:
3232
KAFKA_CLUSTERS_0_AUDIT_CONSOLEAUDITENABLED: 'true'
3333

3434
kafka0:
35-
image: confluentinc/cp-kafka:7.2.1.arm64
35+
image: confluentinc/cp-kafka:7.8.0.arm64
36+
user: "0:0"
3637
hostname: kafka0
3738
container_name: kafka0
3839
ports:
@@ -56,12 +57,10 @@ services:
5657
KAFKA_JMX_PORT: 9997
5758
# KAFKA_JMX_HOSTNAME: localhost # uncomment this line and comment the next one if running with kafka-ui as a jar
5859
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka0 -Dcom.sun.management.jmxremote.rmi.port=9997
59-
volumes:
60-
- ../documentation/compose/scripts/update_run.sh:/tmp/update_run.sh
61-
command: "bash -c 'if [ ! -f /tmp/update_run.sh ]; then echo \"ERROR: Did you forget the update_run.sh file that came with this docker-compose.yml file?\" && exit 1 ; else /tmp/update_run.sh && /etc/confluent/docker/run ; fi'"
60+
CLUSTER_ID: 'MkU3OEVBNTcwNTJENDM2Qk'
6261

6362
schema-registry0:
64-
image: confluentinc/cp-schema-registry:7.2.1.arm64
63+
image: confluentinc/cp-schema-registry:7.8.0.arm64
6564
ports:
6665
- 8085:8085
6766
depends_on:
@@ -77,7 +76,7 @@ services:
7776
SCHEMA_REGISTRY_KAFKASTORE_TOPIC: _schemas
7877

7978
kafka-connect0:
80-
image: confluentinc/cp-kafka-connect:7.2.1.arm64
79+
image: confluentinc/cp-kafka-connect:7.8.0.arm64
8180
ports:
8281
- 8083:8083
8382
depends_on:
@@ -102,7 +101,7 @@ services:
102101
CONNECT_PLUGIN_PATH: "/usr/share/java,/usr/share/confluent-hub-components,/usr/local/share/kafka/plugins,/usr/share/filestream-connectors"
103102

104103
ksqldb0:
105-
image: confluentinc/ksqldb-server:0.18.0
104+
image: confluentinc/cp-ksqldb-server:7.8.0.arm64
106105
depends_on:
107106
- kafka0
108107
- kafka-connect0
@@ -120,7 +119,7 @@ services:
120119
KSQL_CACHE_MAX_BYTES_BUFFERING: 0
121120

122121
kafka-init-topics:
123-
image: confluentinc/cp-kafka:7.2.1.arm64
122+
image: confluentinc/cp-kafka:7.8.0.arm64
124123
volumes:
125124
- ../documentation/compose/data/message.json:/data/message.json
126125
depends_on:

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,23 @@ updates:
1414
- "type/dependencies"
1515
- "scope/backend"
1616

17+
- package-ecosystem: docker
18+
directory: "/api"
19+
schedule:
20+
interval: weekly
21+
time: "10:00"
22+
timezone: Europe/London
23+
reviewers:
24+
- "kafbat/backend"
25+
open-pull-requests-limit: 10
26+
ignore:
27+
- dependency-name: "azul/zulu-openjdk-alpine"
28+
# Limit dependabot pull requests to minor Java upgrades
29+
update-types: ["version-update:semver-major"]
30+
labels:
31+
- "type/dependencies"
32+
- "scope/backend"
33+
1734
- package-ecosystem: npm
1835
directory: "/frontend"
1936
schedule:

.github/workflows/backend_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Set up JDK
2929
uses: actions/setup-java@v4
3030
with:
31-
java-version: '17'
31+
java-version: '21'
3232
distribution: 'zulu'
3333
cache: 'maven'
3434

.github/workflows/branch-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Set up JDK
3030
uses: actions/setup-java@v4
3131
with:
32-
java-version: '17'
32+
java-version: '21'
3333
distribution: 'zulu'
3434
cache: 'maven'
3535
- name: Build

.github/workflows/build-public-image.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ on:
66
types: ['labeled']
77

88
permissions:
9+
id-token: write
910
contents: read
11+
pull-requests: write
1012

1113
jobs:
1214
build:
@@ -25,7 +27,7 @@ jobs:
2527
- name: Set up JDK
2628
uses: actions/setup-java@v4
2729
with:
28-
java-version: '17'
30+
java-version: '21'
2931
distribution: 'zulu'
3032
cache: 'maven'
3133
- name: Build
@@ -47,12 +49,11 @@ jobs:
4749
key: ${{ runner.os }}-buildx-${{ github.sha }}
4850
restore-keys: |
4951
${{ runner.os }}-buildx-
50-
- name: Configure AWS credentials for Kafka-UI account
52+
- name: Configure AWS Credentials
5153
uses: aws-actions/configure-aws-credentials@v4
5254
with:
53-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
54-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
5555
aws-region: us-east-1
56+
role-to-assume: ${{ secrets.AWS_ROLE }}
5657
- name: Login to Amazon ECR
5758
id: login-ecr
5859
uses: aws-actions/amazon-ecr-login@v2
@@ -65,7 +66,7 @@ jobs:
6566
builder: ${{ steps.buildx.outputs.name }}
6667
context: api
6768
push: true
68-
tags: public.ecr.aws/kafbat/kafka-ui-custom-build:${{ steps.extract_branch.outputs.tag }}
69+
tags: ${{ vars.ECR_REGISTRY }}/${{ github.repository }}:${{ steps.extract_branch.outputs.tag }}
6970
build-args: |
7071
JAR_FILE=api-${{ steps.build.outputs.version }}.jar
7172
cache-from: type=local,src=/tmp/.buildx-cache
@@ -75,6 +76,6 @@ jobs:
7576
with:
7677
issue-number: ${{ github.event.pull_request.number }}
7778
body: |
78-
Image published at public.ecr.aws/kafbat/kafka-ui-custom-build:${{ steps.extract_branch.outputs.tag }}
79+
Image published at ${{ vars.ECR_REGISTRY }}/${{ github.repository }}:${{ steps.extract_branch.outputs.tag }}
7980
outputs:
8081
tag: ${{ steps.extract_branch.outputs.tag }}

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- name: Set up JDK
4646
uses: actions/setup-java@v4
4747
with:
48-
java-version: '17'
48+
java-version: '21'
4949
distribution: 'zulu'
5050
cache: 'maven'
5151

.github/workflows/cve_checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up JDK
2121
uses: actions/setup-java@v4
2222
with:
23-
java-version: '17'
23+
java-version: '21'
2424
distribution: 'zulu'
2525
cache: 'maven'
2626

.github/workflows/docker_build.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: "Docker build"
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
sha:
7+
required: true
8+
type: string
9+
version:
10+
required: true
11+
type: string
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
ref: ${{ github.event.pull_request.head.sha }}
24+
token: ${{ github.token }}
25+
26+
- name: Download maven artifacts
27+
uses: actions/download-artifact@v4
28+
with:
29+
name: kafbat-ui-${{ inputs.version }}
30+
path: api/target
31+
32+
- name: Set up QEMU
33+
uses: docker/setup-qemu-action@v3
34+
35+
- name: Set up Docker Buildx
36+
id: buildx
37+
uses: docker/setup-buildx-action@v3
38+
39+
- name: Cache Docker layers
40+
uses: actions/cache@v4
41+
with:
42+
path: /tmp/.buildx-cache
43+
key: ${{ runner.os }}-buildx-${{ inputs.sha }}
44+
restore-keys: |
45+
${{ runner.os }}-buildx-
46+
47+
# Build multi platform images and loading them at the same time is not possible with default container runtime : https://github.com/docker/buildx/issues/59
48+
# So let's use containerd instead as it supports this option
49+
# Also containerd is one of the option to allow preserving provenance attestations :https://docs.docker.com/build/attestations/#creating-attestations
50+
- name: Setup docker with containerd
51+
uses: crazy-max/ghaction-setup-docker@v3
52+
with:
53+
daemon-config: |
54+
{
55+
"features": {
56+
"containerd-snapshotter": true
57+
}
58+
}
59+
60+
- name: Build docker image
61+
id: docker_build
62+
uses: docker/build-push-action@v5
63+
with:
64+
builder: ${{ steps.buildx.outputs.name }}
65+
context: api
66+
platforms: linux/amd64,linux/arm64
67+
provenance: mode=min
68+
sbom: true
69+
push: false
70+
load: true
71+
tags: |
72+
kafka-ui:temp
73+
build-args: |
74+
JAR_FILE=api-${{ inputs.version }}.jar
75+
cache-from: type=local,src=/tmp/.buildx-cache
76+
cache-to: type=local,dest=/tmp/.buildx-cache
77+
78+
- name: Dump docker image
79+
run: |
80+
docker image save kafka-ui:temp > /tmp/image.tar
81+
82+
- name: Upload docker image
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: image
86+
path: /tmp/image.tar
87+
retention-days: 1
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: "Docker publish"
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
version:
7+
required: true
8+
type: string
9+
generic_tag:
10+
required: true
11+
type: string
12+
13+
permissions:
14+
packages: write
15+
id-token: write # Required to authenticate with OIDC for AWS
16+
17+
jobs:
18+
deploy:
19+
continue-on-error: true
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
registry: [ 'docker.io', 'ghcr.io', 'ecr' ]
24+
25+
runs-on: ubuntu-latest
26+
steps:
27+
28+
- name: Download docker image
29+
uses: actions/download-artifact@v4
30+
with:
31+
name: image
32+
path: /tmp
33+
34+
# setup containerd to preserve provenance attestations :https://docs.docker.com/build/attestations/#creating-attestations
35+
- name: Setup docker with containerd
36+
uses: crazy-max/ghaction-setup-docker@v3
37+
with:
38+
daemon-config: |
39+
{
40+
"features": {
41+
"containerd-snapshotter": true
42+
}
43+
}
44+
45+
- name: Load docker image into daemon
46+
run: |
47+
docker load --input /tmp/image.tar
48+
49+
- name: Login to docker.io
50+
if: matrix.registry == 'docker.io'
51+
uses: docker/login-action@v3
52+
with:
53+
registry: ${{ matrix.registry }}
54+
username: ${{ secrets.DOCKERHUB_USERNAME }}
55+
password: ${{ secrets.DOCKERHUB_TOKEN }}
56+
57+
- name: Login to ghcr.io
58+
if: matrix.registry == 'ghcr.io'
59+
uses: docker/login-action@v3
60+
with:
61+
registry: ${{ matrix.registry }}
62+
username: ${{ github.actor }}
63+
password: ${{ secrets.GITHUB_TOKEN }}
64+
65+
- name: Configure AWS credentials
66+
if: matrix.registry == 'ecr'
67+
uses: aws-actions/configure-aws-credentials@v4
68+
with:
69+
aws-region: us-east-1 # This region only for public ECR
70+
role-to-assume: ${{ secrets.AWS_ROLE }}
71+
72+
- name: Login to public ECR
73+
if: matrix.registry == 'ecr'
74+
id: login-ecr-public
75+
uses: aws-actions/amazon-ecr-login@v2
76+
with:
77+
registry-type: public
78+
79+
- name: define env vars
80+
run: |
81+
if [ ${{matrix.registry }} == 'docker.io' ]; then
82+
echo "REGISTRY=${{ matrix.registry }}" >> $GITHUB_ENV
83+
echo "REPOSITORY=${{ github.repository }}" >> $GITHUB_ENV
84+
elif [ ${{ matrix.registry }} == 'ghcr.io' ]; then
85+
echo "REGISTRY=${{ matrix.registry }}" >> $GITHUB_ENV
86+
echo "REPOSITORY=${{ github.repository }}" >> $GITHUB_ENV
87+
elif [ ${{ matrix.registry }} == 'ecr' ]; then
88+
echo "REGISTRY=${{ vars.ECR_REGISTRY }}" >> $GITHUB_ENV
89+
echo "REPOSITORY=${{ github.repository }}" >> $GITHUB_ENV
90+
else
91+
echo "REGISTRY=" >> $GITHUB_ENV
92+
echo "REPOSITORY=notworking" >> $GITHUB_ENV
93+
fi
94+
95+
- name: Push images to ${{ matrix.registry }}
96+
run: |
97+
docker tag kafka-ui:temp ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:${{ inputs.generic_tag }}
98+
docker tag kafka-ui:temp ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:${{ inputs.version }}
99+
docker push ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:${{ inputs.generic_tag }}
100+
docker push ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:${{ inputs.version }}

.github/workflows/e2e-run.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Set up JDK
3131
uses: actions/setup-java@v3
3232
with:
33-
java-version: '17'
33+
java-version: '21'
3434
distribution: 'zulu'
3535
cache: 'maven'
3636

@@ -72,7 +72,7 @@ jobs:
7272
- name: Set up JDK
7373
uses: actions/setup-java@v3
7474
with:
75-
java-version: '17'
75+
java-version: '21'
7676
distribution: 'zulu'
7777
cache: 'maven'
7878

@@ -103,8 +103,8 @@ jobs:
103103
run: |
104104
mkdir -p ./e2e-tests/target/selenoid-results/video
105105
mkdir -p ./e2e-tests/target/selenoid-results/logs
106-
docker-compose -f ./e2e-tests/selenoid/selenoid-ci.yaml up -d
107-
docker-compose -f ./documentation/compose/e2e-tests.yaml up -d
106+
docker compose -f ./e2e-tests/selenoid/selenoid-ci.yaml up -d
107+
docker compose -f ./documentation/compose/e2e-tests.yaml up -d
108108
109109
- name: Dump Docker logs on failure
110110
if: failure()

0 commit comments

Comments
 (0)