Skip to content

Commit ae229a2

Browse files
authored
Merge pull request #843 from MetaCell/feature/CH-259
CH-259: Update kafka deployment
2 parents ed32fbe + 04d660c commit ae229a2

28 files changed

Lines changed: 147 additions & 876 deletions

applications/events/deploy/charts/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ apiVersion: v2
22
name: kafka-ui
33
description: A Helm chart for kafka-UI
44
type: application
5-
version: 0.4.6
6-
appVersion: v0.4.0
5+
version: 0.7.6
6+
appVersion: v0.7.2
77
icon: https://github.com/provectus/kafka-ui/raw/master/documentation/images/kafka-ui-logo.png
Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1 @@
1-
# Kafka-UI Helm Chart
2-
3-
## Configuration
4-
5-
Most of the Helm charts parameters are common, follow table describe unique parameters related to application configuration.
6-
7-
### Kafka-UI parameters
8-
9-
| Parameter | Description | Default |
10-
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
11-
| `existingConfigMap` | Name of the existing ConfigMap with Kafka-UI environment variables | `nil` |
12-
| `existingSecret` | Name of the existing Secret with Kafka-UI environment variables | `nil` |
13-
| `envs.secret` | Set of the sensitive environment variables to pass to Kafka-UI | `{}` |
14-
| `envs.config` | Set of the environment variables to pass to Kafka-UI | `{}` |
15-
| `yamlApplicationConfigConfigMap` | Map with name and keyName keys, name refers to the existing ConfigMap, keyName refers to the ConfigMap key with Kafka-UI config in Yaml format | `{}` |
16-
| `yamlApplicationConfig` | Kafka-UI config in Yaml format | `{}` |
17-
| `networkPolicy.enabled` | Enable network policies | `false` |
18-
| `networkPolicy.egressRules.customRules` | Custom network egress policy rules | `[]` |
19-
| `networkPolicy.ingressRules.customRules` | Custom network ingress policy rules | `[]` |
20-
| `podLabels` | Extra labels for Kafka-UI pod | `{}` |
21-
22-
23-
## Example
24-
25-
To install Kafka-UI need to execute follow:
26-
``` bash
27-
helm repo add kafka-ui https://provectus.github.io/kafka-ui
28-
helm install kafka-ui kafka-ui/kafka-ui --set envs.config.KAFKA_CLUSTERS_0_NAME=local --set envs.config.KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9092
29-
```
30-
To connect to Kafka-UI web application need to execute:
31-
``` bash
32-
kubectl port-forward svc/kafka-ui 8080:80
33-
```
34-
Open the `http://127.0.0.1:8080` on the browser to access Kafka-UI.
1+
Please refer to our [documentation](https://docs.kafka-ui.provectus.io/configuration/helm-charts) to get some info on our helm charts.

applications/events/deploy/charts/templates/_helpers.tpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ This allows us to check if the registry of the image is specified or not.
6868
*/}}
6969
{{- define "kafka-ui.imageName" -}}
7070
{{- $registryName := .Values.image.registry -}}
71+
{{- if .Values.global }}
72+
{{- if .Values.global.imageRegistry }}
73+
{{- $registryName = .Values.global.imageRegistry -}}
74+
{{- end -}}
75+
{{- end -}}
7176
{{- $repository := .Values.image.repository -}}
7277
{{- $tag := .Values.image.tag | default .Chart.AppVersion -}}
7378
{{- if $registryName }}
@@ -76,4 +81,3 @@ This allows us to check if the registry of the image is specified or not.
7681
{{- printf "%s:%s" $repository $tag -}}
7782
{{- end }}
7883
{{- end -}}
79-

applications/events/deploy/charts/templates/configmap.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ apiVersion: v1
33
kind: ConfigMap
44
metadata:
55
name: {{ include "kafka-ui.fullname" . }}
6+
namespace: {{ .Release.Namespace }}
67
labels:
78
{{- include "kafka-ui.labels" . | nindent 4 }}
89
data:
910
{{- toYaml .Values.envs.config | nindent 2 }}
10-
{{- end -}}
11+
{{- end -}}

applications/events/deploy/charts/templates/configmap_fromValues.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ apiVersion: v1
33
kind: ConfigMap
44
metadata:
55
name: {{ include "kafka-ui.fullname" . }}-fromvalues
6+
namespace: {{ .Release.Namespace }}
67
labels:
78
{{- include "kafka-ui.labels" . | nindent 4 }}
89
data:
910
config.yml: |-
1011
{{- toYaml .Values.yamlApplicationConfig | nindent 4}}
11-
{{ end }}
12+
{{ end }}

applications/events/deploy/charts/templates/deployment.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: {{ include "kafka-ui.fullname" . }}
5+
namespace: {{ .Release.Namespace }}
56
labels:
67
{{- include "kafka-ui.labels" . | nindent 4 }}
78
{{- with .Values.annotations }}
@@ -53,7 +54,7 @@ spec:
5354
{{- toYaml . | nindent 12 }}
5455
{{- end }}
5556
{{- if or .Values.yamlApplicationConfig .Values.yamlApplicationConfigConfigMap}}
56-
- name: SPRING_CONFIG_LOCATION
57+
- name: SPRING_CONFIG_ADDITIONAL-LOCATION
5758
{{- if .Values.yamlApplicationConfig }}
5859
value: /kafka-ui/config.yml
5960
{{- else if .Values.yamlApplicationConfigConfigMap }}

applications/events/deploy/charts/templates/hpa.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ apiVersion: autoscaling/v2beta1
99
kind: HorizontalPodAutoscaler
1010
metadata:
1111
name: {{ include "kafka-ui.fullname" . }}
12+
namespace: {{ .Release.Namespace }}
1213
labels:
1314
{{- include "kafka-ui.labels" . | nindent 4 }}
1415
spec:

applications/events/deploy/charts/templates/ingress.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ apiVersion: extensions/v1beta1
1313
kind: Ingress
1414
metadata:
1515
name: {{ $fullName }}
16+
namespace: {{ .Release.Namespace }}
1617
labels:
1718
{{- include "kafka-ui.labels" . | nindent 4 }}
1819
{{- with .Values.ingress.annotations }}
@@ -35,25 +36,30 @@ spec:
3536
{{- if and ($.Capabilities.APIVersions.Has "networking.k8s.io/v1") $isHigher1p19 -}}
3637
{{- range .Values.ingress.precedingPaths }}
3738
- path: {{ .path }}
38-
pathType: Prefix
39+
pathType: {{ .pathType }}
3940
backend:
4041
service:
4142
name: {{ .serviceName }}
4243
port:
44+
{{- if .servicePort }}
4345
number: {{ .servicePort }}
46+
{{- end }}
47+
{{- if .servicePortName }}
48+
name: {{ .servicePortName }}
49+
{{- end }}
4450
{{- end }}
4551
- backend:
4652
service:
4753
name: {{ $fullName }}
4854
port:
4955
number: {{ $svcPort }}
50-
pathType: Prefix
56+
pathType: {{ .Values.ingress.pathType }}
5157
{{- if .Values.ingress.path }}
5258
path: {{ .Values.ingress.path }}
5359
{{- end }}
5460
{{- range .Values.ingress.succeedingPaths }}
5561
- path: {{ .path }}
56-
pathType: Prefix
62+
pathType: {{ .pathType }}
5763
backend:
5864
service:
5965
name: {{ .serviceName }}

applications/events/deploy/charts/templates/networkpolicy-egress.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: networking.k8s.io/v1
33
kind: NetworkPolicy
44
metadata:
55
name: {{ printf "%s-egress" (include "kafka-ui.fullname" .) }}
6+
namespace: {{ .Release.Namespace }}
67
labels:
78
{{- include "kafka-ui.labels" . | nindent 4 }}
89
spec:

applications/events/deploy/charts/templates/networkpolicy-ingress.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: networking.k8s.io/v1
33
kind: NetworkPolicy
44
metadata:
55
name: {{ printf "%s-ingress" (include "kafka-ui.fullname" .) }}
6+
namespace: {{ .Release.Namespace }}
67
labels:
78
{{- include "kafka-ui.labels" . | nindent 4 }}
89
spec:

0 commit comments

Comments
 (0)