Skip to content

Commit d006bb8

Browse files
authored
Merge branch 'main' into main
2 parents 31df647 + c1826ad commit d006bb8

File tree

9 files changed

+322
-54
lines changed

9 files changed

+322
-54
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: 'Update README from values.yaml metadata'
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- "charts/**"
9+
10+
permissions: {} # Remove all permissions by default
11+
12+
jobs:
13+
update-readme-metadata:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
steps:
18+
- name: Install readme-generator-for-helm
19+
run: npm install -g @bitnami/readme-generator-for-helm
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0 # Necessary for getting a complete history for diffs
23+
24+
- name: Get modified charts
25+
id: get-modified-charts
26+
run: |
27+
paths=$(git diff --name-only origin/main... --name-only | grep 'charts/.*/values.yaml' | cut -d/ -f1,2 | uniq | tr '\n' ' ')
28+
echo "Modified charts: $paths"
29+
echo "paths=${paths}" >> $GITHUB_ENV # Using ENV as this is now within the same job
30+
31+
- name: Execute readme-generator-for-helm
32+
if: env.paths != '' # Ensure there are paths to proceed
33+
run: |
34+
IFS=' ' read -ra ADDR <<< "$paths"
35+
echo "Updating READMEs for modified charts: ${ADDR[@]}"
36+
for chart in "${ADDR[@]}"; do
37+
echo "Updating README.md for ${chart}"
38+
readme-generator --values "${chart}/values.yaml" --readme "${chart}/README.md"
39+
if [[ $? -ne 0 ]]; then
40+
echo "Error: Failed to update README for ${chart}"
41+
exit 1
42+
fi
43+
# fix schema for nullable
44+
# cat <<< $(jq '(..|objects|select(.nullable)).type |= ["string","null"]' "${chart}/values.schema.json") > "${chart}/values.schema.json"
45+
done
46+
47+
- name: Commit and Push Changes
48+
if: env.paths != '' # Only commit if there are changes
49+
uses: stefanzweifel/git-auto-commit-action@v5
50+
with:
51+
commit_message: Update README.md for modified charts
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
name: Release helm
22
on:
3-
push:
3+
push:
44
branches:
5-
- main
5+
- main
66
paths:
77
- "charts/**"
88

99
jobs:
10-
release-helm:
11-
runs-on:
12-
ubuntu-latest
13-
steps:
10+
release-helm:
11+
runs-on: ubuntu-latest
12+
steps:
1413
- uses: actions/checkout@v3
1514
with:
1615
fetch-depth: 1
17-
1816
- run: |
1917
git config user.name github-actions
2018
git config user.email github-actions@github.com
21-
2219
- uses: azure/setup-helm@v3
23-
2420
- name: add chart #realse helm with new version
2521
run: |
2622
VERSION=$(cat charts/kafka-ui/Chart.yaml | grep version | awk '{print $2}')
@@ -36,4 +32,4 @@ jobs:
3632
git push
3733
- uses: rickstaa/action-create-tag@v1 #create new tag
3834
with:
39-
tag: "charts/kafka-ui-${{ env.HELM_VERSION }}"
35+
tag: "charts/kafka-ui-${{ env.HELM_VERSION }}"

charts/kafka-ui/Chart.yaml

Lines changed: 1 addition & 1 deletion
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: 1.4.0
5+
version: 1.4.9
66
appVersion: v1.0.0
77
icon: https://raw.githubusercontent.com/kafbat/kafka-ui/main/documentation/images/logo_new.png

charts/kafka-ui/README.md

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,89 @@
1-
Please refer to our [documentation](https://ui.docs.kafbat.io/configuration/helm-charts) to get some info on our helm charts.
1+
## Parameters
2+
3+
### Common
4+
5+
| Name | Description | Value |
6+
| ------------------ | ------------------------------------------ | ----- |
7+
| `replicaCount` | Number of Kafka-UI replicas to deploy | `1` |
8+
| `image.registry` | image registry | `""` |
9+
| `image.repository` | image repository | `""` |
10+
| `image.pullPolicy` | image pull policy | `""` |
11+
| `image.tag` | image tag (immutable tags are recommended) | `""` |
12+
| `imagePullSecrets` | Docker registry secret names as an array | `[]` |
13+
| `nameOverride` | String to partially override chart name | `""` |
14+
| `fullnameOverride` | String to fully override app name | `""` |
15+
16+
### ServiceAccount configuration
17+
18+
| Name | Description | Value |
19+
| ---------------------------- | ---------------------------------------------------- | ------ |
20+
| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
21+
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
22+
| `serviceAccount.annotations` | Additional Service Account annotations | `{}` |
23+
24+
### Application configuration
25+
26+
| Name | Description | Value |
27+
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
28+
| `existingConfigMap` | Name of the existing ConfigMap with kafbat-ui environment variables | `""` |
29+
| `yamlApplicationConfig` | Kafbat-UI config in Yaml format | `{}` |
30+
| `yamlApplicationConfigConfigMap` | Map with name and keyName keys, name refers to the existing ConfigMap, keyName refers to the ConfigMap key with Kafbat-UI config in Yaml format | `{}` |
31+
| `yamlApplicationConfigSecret` | Secret with name and keyName keys, name refers to the existing ConfigMap, keyName refers to the ConfigMap key with Kafbat-UI config in Yaml format | `{}` |
32+
| `existingSecret` | Name of the existing Secret with Kafbat-UI environment variables | `""` |
33+
| `envs.secret` | Set of the sensitive environment variables to pass to Kafbat-UI | `{}` |
34+
| `envs.config` | Set of the environment variables to pass to Kafbat-UI | `{}` |
35+
| `envs.secretMappings` | The mapping of existing secret to env variable. | `{}` |
36+
| `envs.configMappings` | The mapping of configmap and keyName to get env variable. | `{}` |
37+
| `env` | Envs to be added to the Kafka-UI container | `{}` |
38+
| `resources` | Set Kafka-UI container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
39+
| `initContainers` | Add additional init containers to the Kafka-UI pods | `{}` |
40+
| `volumeMounts` | Optionally specify additional volumeMounts for the kafka-UI container | `{}` |
41+
| `volumes` | Optionally specify additional volumes for the Kafka-UI pods | `{}` |
42+
| `hostAliases` | Kafka-UI pods host aliases | `{}` |
43+
| `extraContainers` | Specify additional containers in extraContainers. | `""` |
44+
45+
### Network Policies
46+
47+
| Name | Description | Value |
48+
| ----------------------- | --------------------------------------------------------- | ------- |
49+
| `networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `false` |
50+
| `podAnnotations` | Annotations for Kafka-UI pods | `{}` |
51+
| `podLabels` | Extra labels for Kafka-UI pods | `{}` |
52+
| `annotations` | Annotations to be added to kafka-ui Deployment | `{}` |
53+
| `labels` | Labels to be added to kafka-ui Deployment | `{}` |
54+
| `probes.useHttpsScheme` | Set field schema as HTTPS for readines and liveness probe | `false` |
55+
56+
### Security Context
57+
58+
| Name | Description | Value |
59+
| -------------------- | ----------------------------------------------------------------------------------- | ----- |
60+
| `podSecurityContext` | The security settings that you specify for a Pod apply to all Containers in the Pod | `{}` |
61+
| `securityContext` | The security settings that you specify for a Kafka-UI container | `{}` |
62+
63+
### Traffic Exposure Parameters
64+
65+
| Name | Description | Value |
66+
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ----------- |
67+
| `service.type` | Kafka-UI service type | `ClusterIP` |
68+
| `service.port` | Kafka-UI pod port number | `80` |
69+
| `ingress.enabled` | Enable ingress record generation for Kafka-UI | `""` |
70+
| `ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
71+
| `ingress.labels` | Labels for the Ingress | `{}` |
72+
| `ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) | `""` |
73+
| `ingress.path` | Default path for the ingress record | `/` |
74+
| `ingress.pathType` | Ingress path type | `Prefix` |
75+
| `ingress.host` | Default hostname for the ingress record | `""` |
76+
| `ingress.tls.enabled` | Enable TLS configuration for the host defined at `ingress.host` parameter | `false` |
77+
| `ingress.tls.secretName` | The name of a pre-created Secret containing a TLS private key and certificate | `""` |
78+
| `ingress.precedingPaths` | HTTP paths to add to the Ingress before the default path | `[]` |
79+
| `ingress.succeedingPaths` | Http paths to add to the Ingress after the default path | `[]` |
80+
| `resources` | Set Kafka-UI pod requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
81+
82+
### Scheduling
83+
84+
| Name | Description | Value |
85+
| ---------------------- | ----------------------------------------------------------------------- | ----- |
86+
| `nodeSelector` | Node labels for Kafka-UI pods assignment | `{}` |
87+
| `tolerations` | Tolerations for Kafka-UI pods assignment | `[]` |
88+
| `affinity` | Affinity for Kafka-UI pods assignment | `{}` |
89+
| `revisionHistoryLimit` | Specify how many old ReplicaSets for this Deployment you want to retain | `nil` |

charts/kafka-ui/templates/deployment.yaml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ metadata:
55
namespace: {{ .Release.Namespace }}
66
labels:
77
{{- include "kafka-ui.labels" . | nindent 4 }}
8+
{{- if .Values.labels }}
9+
{{- toYaml .Values.labels | nindent 4 }}
10+
{{- end }}
811
{{- with .Values.annotations }}
912
annotations:
1013
{{- toYaml . | nindent 4 }}
@@ -16,6 +19,9 @@ spec:
1619
selector:
1720
matchLabels:
1821
{{- include "kafka-ui.selectorLabels" . | nindent 6 }}
22+
{{- if .Values.revisionHistoryLimit }}
23+
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
24+
{{- end }}
1925
template:
2026
metadata:
2127
annotations:
@@ -48,7 +54,10 @@ spec:
4854
{{- toYaml .Values.securityContext | nindent 12 }}
4955
image: {{ include "kafka-ui.imageName" . }}
5056
imagePullPolicy: {{ .Values.image.pullPolicy }}
51-
{{- if or .Values.env .Values.yamlApplicationConfig .Values.yamlApplicationConfigConfigMap .Values.yamlApplicationConfigSecret }}
57+
{{- if or .Values.env
58+
.Values.yamlApplicationConfig .Values.yamlApplicationConfigConfigMap .Values.yamlApplicationConfigSecret
59+
(.Values.envs).secretMappings (.Values.envs).configMappings
60+
}}
5261
env:
5362
{{- with .Values.env }}
5463
{{- toYaml . | nindent 12 }}
@@ -63,7 +72,22 @@ spec:
6372
value: /kafka-ui/{{ .Values.yamlApplicationConfigSecret.keyName | default "config.yml" }}
6473
{{- end }}
6574
{{- end }}
75+
{{- range $key, $value := .Values.envs.secretMappings }}
76+
- name: {{ $key }}
77+
valueFrom:
78+
secretKeyRef:
79+
name: {{ required "Missing required value envs.secretMappings.[].name" $value.name }}
80+
key: {{ required "Missing required value envs.secretMappings.[].keyName" $value.keyName }}
81+
{{- end }}
82+
{{- range $key, $value := .Values.envs.configMappings }}
83+
- name: {{ $key }}
84+
valueFrom:
85+
configMapKeyRef:
86+
name: {{ required "Missing required value envs.configMappings.[].name" $value.name }}
87+
key: {{ required "Missing required value envs.configMappings.[].keyName" $value.keyName }}
88+
{{- end }}
6689
{{- end }}
90+
{{- if or .Values.existingConfigMap .Values.envs.config .Values.existingSecret .Values.envs.secret }}
6791
envFrom:
6892
{{- if .Values.existingConfigMap }}
6993
- configMapRef:
@@ -80,7 +104,8 @@ spec:
80104
{{- if .Values.envs.secret}}
81105
- secretRef:
82106
name: {{ include "kafka-ui.fullname" . }}
83-
{{- end}}
107+
{{- end}}
108+
{{- end }}
84109
ports:
85110
- name: http
86111
containerPort: 8080
@@ -127,6 +152,9 @@ spec:
127152
mountPath: /kafka-ui/
128153
{{- end }}
129154
{{- end }}
155+
{{- with .Values.extraContainers }}
156+
{{ tpl . $ | nindent 8 }}
157+
{{- end }}
130158
{{- if or .Values.yamlApplicationConfig .Values.volumes .Values.yamlApplicationConfigConfigMap .Values.yamlApplicationConfigSecret }}
131159
volumes:
132160
{{- with .Values.volumes }}

charts/kafka-ui/templates/ingress.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ metadata:
1616
namespace: {{ .Release.Namespace }}
1717
labels:
1818
{{- include "kafka-ui.labels" . | nindent 4 }}
19+
{{- with .Values.ingress.labels }}
20+
{{- toYaml . | nindent 4 }}
21+
{{- end }}
1922
{{- with .Values.ingress.annotations }}
2023
annotations:
2124
{{- toYaml . | nindent 4 }}

charts/kafka-ui/templates/networkpolicy-egress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ spec:
1414
- Egress
1515
egress:
1616
{{- if .Values.networkPolicy.egressRules.customRules }}
17-
{{- toYaml .Values.networkPolicy.egressRules.customRules | nindent 4 }}
17+
{{- tpl (toYaml .Values.networkPolicy.egressRules.customRules) $ | nindent 4 }}
1818
{{- end }}
1919
{{- end }}

charts/kafka-ui/templates/networkpolicy-ingress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ spec:
1414
- Ingress
1515
ingress:
1616
{{- if .Values.networkPolicy.ingressRules.customRules }}
17-
{{- toYaml .Values.networkPolicy.ingressRules.customRules | nindent 4 }}
17+
{{- tpl (toYaml .Values.networkPolicy.ingressRules.customRules) $ | nindent 4 }}
1818
{{- end }}
1919
{{- end }}

0 commit comments

Comments
 (0)