Skip to content

Commit b7add83

Browse files
authored
Merge branch 'main' into kafbat/203
2 parents 6d31b98 + d8cc886 commit b7add83

File tree

229 files changed

+4226
-1295
lines changed

Some content is hidden

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

229 files changed

+4226
-1295
lines changed

.dev/dev_arm64.yaml renamed to .dev/dev.yaml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# This is a compose file designed for arm64/Apple Silicon systems
2-
# To adapt this to x86 please find and replace ".arm64" with empty
3-
4-
# ARM64 supported images for kafka can be found here
5-
# https://hub.docker.com/r/confluentinc/cp-kafka/tags?page=1&name=arm64
6-
---
71
version: '3.8'
82
name: "kafbat-ui-dev"
93

@@ -32,7 +26,7 @@ services:
3226
KAFKA_CLUSTERS_0_AUDIT_CONSOLEAUDITENABLED: 'true'
3327

3428
kafka0:
35-
image: confluentinc/cp-kafka:7.2.1.arm64
29+
image: confluentinc/cp-kafka:7.8.0
3630
hostname: kafka0
3731
container_name: kafka0
3832
ports:
@@ -56,12 +50,10 @@ services:
5650
KAFKA_JMX_PORT: 9997
5751
# KAFKA_JMX_HOSTNAME: localhost # uncomment this line and comment the next one if running with kafka-ui as a jar
5852
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'"
53+
CLUSTER_ID: 'MkU3OEVBNTcwNTJENDM2Qk'
6254

6355
schema-registry0:
64-
image: confluentinc/cp-schema-registry:7.2.1.arm64
56+
image: confluentinc/cp-schema-registry:7.8.0
6557
ports:
6658
- 8085:8085
6759
depends_on:
@@ -77,7 +69,7 @@ services:
7769
SCHEMA_REGISTRY_KAFKASTORE_TOPIC: _schemas
7870

7971
kafka-connect0:
80-
image: confluentinc/cp-kafka-connect:7.2.1.arm64
72+
image: confluentinc/cp-kafka-connect:7.8.0
8173
ports:
8274
- 8083:8083
8375
depends_on:
@@ -102,7 +94,7 @@ services:
10294
CONNECT_PLUGIN_PATH: "/usr/share/java,/usr/share/confluent-hub-components,/usr/local/share/kafka/plugins,/usr/share/filestream-connectors"
10395

10496
ksqldb0:
105-
image: confluentinc/ksqldb-server:0.18.0
97+
image: confluentinc/cp-ksqldb-server:7.8.0
10698
depends_on:
10799
- kafka0
108100
- kafka-connect0
@@ -120,7 +112,7 @@ services:
120112
KSQL_CACHE_MAX_BYTES_BUFFERING: 0
121113

122114
kafka-init-topics:
123-
image: confluentinc/cp-kafka:7.2.1.arm64
115+
image: confluentinc/cp-kafka:7.8.0
124116
volumes:
125117
- ../documentation/compose/data/message.json:/data/message.json
126118
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_main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ concurrency:
1919
cancel-in-progress: true
2020

2121
jobs:
22-
build:
22+
build-and-test:
2323
uses: ./.github/workflows/backend_tests.yml
2424
with:
2525
event_name: ${{ github.event_name }}

.github/workflows/backend_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ concurrency:
2020
cancel-in-progress: true
2121

2222
jobs:
23-
build:
23+
build-and-test:
2424
uses: ./.github/workflows/backend_tests.yml
2525
with:
2626
event_name: ${{ github.event_name }}

.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: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: "Infra: CVE checks"
22
on:
3+
pull_request:
4+
types: [ "opened", "reopened", "synchronize" ]
5+
push:
6+
branches: [ "main" ]
37
workflow_dispatch:
48
schedule:
59
# * is a special character in YAML so you have to quote this string
@@ -9,7 +13,8 @@ permissions:
913
contents: read
1014

1115
jobs:
12-
build-and-test:
16+
17+
check-cves:
1318
runs-on: ubuntu-latest
1419

1520
steps:
@@ -20,7 +25,7 @@ jobs:
2025
- name: Set up JDK
2126
uses: actions/setup-java@v4
2227
with:
23-
java-version: '17'
28+
java-version: '21'
2429
distribution: 'zulu'
2530
cache: 'maven'
2631

@@ -62,8 +67,17 @@ jobs:
6267
cache-to: type=local,dest=/tmp/.buildx-cache
6368

6469
- name: Run CVE checks
65-
uses: aquasecurity/trivy-action@0.19.0
70+
uses: aquasecurity/trivy-action@0.29.0
6671
with:
6772
image-ref: "ghcr.io/kafbat/kafka-ui:${{ steps.build.outputs.version }}"
6873
format: "table"
6974
exit-code: "1"
75+
76+
notify:
77+
needs: check-cves
78+
if: ${{ always() && needs.build-and-test.result == 'failure' && github.event_name == 'schedule' }}
79+
uses: ./.github/workflows/infra_discord_hook.yml
80+
with:
81+
message: "Attention! CVE checks run failed! Please fix them CVEs :("
82+
secrets:
83+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL_CVE }}

.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

0 commit comments

Comments
 (0)