Skip to content

Commit 013d1b4

Browse files
authored
Merge pull request #76 from tchiotludo/dev
Release 0.8.0
2 parents 266d120 + ef2f845 commit 013d1b4

37 files changed

+550
-135
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ file example can be found here :[application.example.yml](application.example.ym
113113
### KafkaHQ configuration
114114

115115
#### Topic List
116+
* `kafkahq.topic.page-size` number of topics per page (default : 25)
116117
* `kafkahq.topic.default-view` is default list view (ALL, HIDE_INTERNAL, HIDE_INTERNAL_STREAM, HIDE_STREAM)
117118
* `kafkahq.topic.internal-regexps` is list of regexp to be considered as internal (internal topic can't be deleted or updated)
118119
* `kafkahq.topic.stream-regexps` is list of regexp to be considered as internal stream topic
@@ -124,6 +125,10 @@ file example can be found here :[application.example.yml](application.example.ym
124125
* `kafkahq.topic-data.poll-timeout`: The time, in milliseconds, spent waiting in poll if data is not available in the
125126
buffer (default: 1000).
126127

128+
129+
#### Schema List
130+
* `kafkahq.schema.page-size` number of schemas per page (default : 25)
131+
127132

128133
### Security
129134
* `kafkahq.security.default-roles`: Roles available for all the user even unlogged user, roles available are :
@@ -161,13 +166,17 @@ kafkahq:
161166
- connect/read
162167
```
163168
164-
165169
#### Basic Auth
166170
* `kafkahq.security.basic-auth`: List user & password with affected roles
167171
* `actual-username`: login of the current user as a yaml key (may be anything email, login, ...)
168172
* `password`: Password in sha256, can be converted with command `echo -n "password" | sha256sum`
169173
* `roles`: Role for current users
170174

175+
> Take care that basic auth will use session store in server **memory**. If your instance is behind a reverse proxy or a
176+
> loadbalancer, you will need to forward the session cookie named `SESSION` and / or use
177+
> [sesssion stickiness](https://en.wikipedia.org/wiki/Load_balancing_(computing)#Persistence)
178+
179+
171180
### Server
172181
* `kafkahq.server.base-path`: if behind a reverse proxy, path to kafkahq with trailing slash (optional). Example:
173182
kafkahq is behind a reverse proxy with url <http://my-server/kafkahq>, set base-path: "/kafkahq/". Not needed if you're
@@ -188,6 +197,17 @@ KafkaHQ docker image support 3 environment variables to handle configuraiton :
188197
* `MICRONAUT_APPLICATION_JSON`: a string that contains the full configuration in JSON format
189198
* `MICRONAUT_CONFIG_FILES`: a path to to a configuration file on container. Default path is `/app/application.yml`
190199

200+
## Monitoring endpoint
201+
Several monitoring endpoint is enabled by default. You can disabled it or restrict access only for authenticated users
202+
following micronaut configuration below.
203+
204+
* `/info` [Info Endpoint](https://docs.micronaut.io/snapshot/guide/index.html#infoEndpoint) with git status
205+
informations.
206+
* `/health` [Health Endpoint](https://docs.micronaut.io/snapshot/guide/index.html#healthEndpoint)
207+
* `/loggers` [Loggers Endpoint](https://docs.micronaut.io/snapshot/guide/index.html#loggersEndpoint)
208+
* `/metrics` [Metrics Endpoint](https://docs.micronaut.io/snapshot/guide/index.html#metricsEndpoint)
209+
* `/prometheus` [Prometheus Endpoint](https://micronaut-projects.github.io/micronaut-micrometer/latest/guide/)
210+
191211
## Development Environment
192212
A docker-compose is provide to start a development environnement.
193213
Just install docker & docker-compose, clone the repository and issue a simple `docker-compose -f docker-compose-dev.yml up` to start a dev server.

application.example.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ kafkahq:
5959

6060
# Topic list display options (optional)
6161
topic:
62+
page-size: 25 # number of topics per page (default : 25)
6263
default-view: HIDE_INTERNAL # default list view (ALL, HIDE_INTERNAL, HIDE_INTERNAL_STREAM, HIDE_STREAM)
6364
internal-regexps: # list of regexp to be considered as internal (internal topic can't be deleted or updated)
6465
- "^_.*$"
@@ -77,6 +78,10 @@ kafkahq:
7778
size: 50 # max record per page (default: 50)
7879
poll-timeout: 1000 # The time, in milliseconds, spent waiting in poll if data is not available in the buffer.
7980

81+
# Schama list display options (optional)
82+
schema:
83+
page-size: 25 # number of schemas per page (default : 25)
84+
8085
# Auth & Roles (optional)
8186
security:
8287
default-roles: # Roles available for all the user even unlogged user

assets/modules/datas/filter.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
@include media-breakpoint-up(sm) {
1414
select {
15-
max-width: 200px;
15+
max-width: 170px;
1616
}
1717
}
1818

assets/modules/templates/layout.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ h3.logo {
8181
margin-left: $menu-width;
8282
}
8383

84-
@include media-breakpoint-down(md) {
84+
@include media-breakpoint-down(sm) {
8585
width: 100%;
8686
}
8787

build.gradle

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
buildscript {
22
ext {
3-
micronautVersion = "1.1.1"
3+
micronautVersion = "1.1.3"
44
confluentVersion = "5.2.+"
55
kafkaVersion = "2.2.+"
66
}
@@ -13,7 +13,7 @@ buildscript {
1313

1414
dependencies {
1515
// kafkahq
16-
classpath "com.commercehub.gradle.plugin:gradle-avro-plugin:0.16.0"
16+
classpath "com.commercehub.gradle.plugin:gradle-avro-plugin:0.17.0"
1717
}
1818
}
1919

@@ -25,11 +25,12 @@ plugins {
2525
id "java"
2626
id "net.ltgt.apt-eclipse" version "0.21"
2727
id "net.ltgt.apt-idea" version "0.21"
28+
id "com.gorylenko.gradle-git-properties" version "2.0.0"
2829

2930
// kafkahq
3031
id "com.moowork.node" version "1.3.1"
31-
id 'io.franzbecker.gradle-lombok' version '3.0.0'
32-
id 'com.adarshr.test-logger' version '1.6.0'
32+
id 'io.franzbecker.gradle-lombok' version '3.1.0'
33+
id 'com.adarshr.test-logger' version '1.7.0'
3334
id 'com.github.psxpaul.execfork' version '0.1.10'
3435
id "com.github.ben-manes.versions" version "0.21.0"
3536
}
@@ -95,7 +96,7 @@ tasks.withType(JavaCompile){
9596
}
9697

9798
gradle.taskGraph.whenReady { graph ->
98-
if (graph.hasTask(run)) {
99+
if (graph.hasTask(run) || graph.hasTask(testClasses)) {
99100
webpack.enabled = false
100101
npmInstall.enabled = false
101102
}
@@ -108,7 +109,7 @@ dependencies {
108109
// micronaut
109110
annotationProcessor "io.micronaut:micronaut-inject-java"
110111
annotationProcessor "io.micronaut:micronaut-validation"
111-
annotationProcessor "io.micronaut:micronaut-security:" + micronautVersion
112+
annotationProcessor "io.micronaut:micronaut-security"
112113
compile "io.micronaut:micronaut-inject"
113114
compile "io.micronaut:micronaut-validation"
114115
compile 'io.micronaut:micronaut-views'
@@ -117,14 +118,17 @@ dependencies {
117118
compile "io.micronaut:micronaut-http-server-netty"
118119
runtime "ch.qos.logback:logback-classic:1.2.3"
119120
runtime 'org.freemarker:freemarker:2.3.28'
120-
compile "io.micronaut:micronaut-security:" + micronautVersion
121-
compile "io.micronaut:micronaut-security-session:" + micronautVersion
121+
compile "io.micronaut:micronaut-security"
122+
compile "io.micronaut:micronaut-security-session"
123+
compile "io.micronaut:micronaut-management"
124+
compile 'io.micronaut.configuration:micronaut-micrometer-registry-prometheus'
125+
compile 'io.github.mweirauch:micrometer-jvm-extras:0.1.3'
122126

123127
// kafka
124128
compile group: "org.apache.kafka", name: "kafka-clients", version: kafkaVersion
125129
compile group: "io.confluent", name: "kafka-schema-registry-client", version: confluentVersion
126130
compile group: "io.confluent", name: "kafka-avro-serializer", version: confluentVersion
127-
compile group: 'org.apache.avro', name: 'avro', version: '1.8.2'
131+
compile group: 'org.apache.avro', name: 'avro', version: '1.9.0'
128132
compile group: 'org.sourcelab', name: 'kafka-connect-client', version: '2.0.+'
129133

130134
// log

docker-compose-dev.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
version: '3.6'
22

33
volumes:
4-
gradle-cache:
5-
driver: local
64
zookeeper-data:
75
driver: local
86
zookeeper-log:
@@ -17,7 +15,6 @@ services:
1715
working_dir: /app
1816
volumes:
1917
- ./:/app
20-
- gradle-cache:/home/gradle/.gradle
2118
ports:
2219
- 127.11.8.17:8080:8080
2320
depends_on:

docker/app/kafkahq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ do
77
JAVA_OPTS="${JAVA_OPTS} ${JVM_OPT}"
88
done
99

10-
/usr/bin/java ${JAVA_OPTS} -jar /app/kafkahq.jar
10+
/usr/local/openjdk-11/bin/java ${JAVA_OPTS} -jar /app/kafkahq.jar
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

package-lock.json

Lines changed: 14 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/org/kafkahq/controllers/RedirectController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public HttpResponse slash() throws URISyntaxException {
2525
return HttpResponse.redirect(this.uri("/" + kafkaModule.getClustersList().get(0) + "/topic"));
2626
}
2727

28-
@Get("${kafkahq.server.base-path:}")
28+
@Get("${kafkahq.server.base-path:}^")
2929
public HttpResponse home() throws URISyntaxException {
3030
return HttpResponse.redirect(this.uri("/" + kafkaModule.getClustersList().get(0) + "/topic"));
3131
}

0 commit comments

Comments
 (0)