Skip to content

Commit 04f0063

Browse files
committed
2 parents 2cbc5b4 + e035fc6 commit 04f0063

23 files changed

Lines changed: 456 additions & 164 deletions

File tree

.woodpecker/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ steps:
2525
environment:
2626
REPO_NAME: ${CI_REPO_NAME}
2727
REPO_OWNER: ${CI_REPO_OWNER}
28-
secrets:
29-
- github_token
28+
GITHUB_TOKEN:
29+
from_secret: github_token
3030
when:
3131
- event: tag
3232
ref: refs/tags/v*

addons/kafka/3.6/chart/kafka/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ Returns the internel listeners based on the number of controller-eligible nodes
583583
{{- $fullname := include "common.names.fullname" . -}}
584584
{{- $releaseNamespace := include "common.names.namespace" . -}}
585585
{{- range $i := until (int .Values.controller.replicaCount) -}}
586-
{{- $nodeAddress := printf "%s-controller-%d.%s-controller-headless.%s.svc.%s:%d" $fullname (int $i) $fullname $releaseNamespace $.Values.clusterDomain (int $.Values.listeners.interbroker.containerPort) -}}
586+
{{- $nodeAddress := printf "%s-controller-%d.%s-controller-headless.%s.svc.%s" $fullname (int $i) $fullname $releaseNamespace $.Values.clusterDomain -}}
587587
{{- $internelListeners = append $internelListeners (printf "%s" $nodeAddress ) -}}
588588
{{- end -}}
589589
{{- join "," $internelListeners -}}
Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,50 @@
11
credential:
2-
- name: INTERNAL_LISTENERS
3-
value: {{ include "kafka.kraft.internelListeners" . }}
4-
52
- name: PROTOCOL_MAP
63
value: {{ include "kafka.securityProtocolMap" . }}
74

5+
- name: CLIENT_DOMAIN
6+
value: {{ template "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
7+
8+
- name: CLIENT_HOST
9+
valueFrom:
10+
serviceRef:
11+
name: {{ template "common.names.fullname" . }}
12+
jsonpath: '{ .spec.clusterIP }'
13+
14+
- name: CLIENT_PORT
15+
valueFrom:
16+
serviceRef:
17+
name: {{ template "common.names.fullname" . }}
18+
jsonpath: '{ .spec.ports[?(@.name=="tcp-client")].port }'
19+
20+
{{- if (eq .Values.service.type "LoadBalancer") }}
21+
- name: EXTERNAL_CLIENT_HOST
22+
valueFrom:
23+
serviceRef:
24+
name: {{ template "common.names.fullname" . }}
25+
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
26+
{{- end }}
27+
28+
{{- if .Values.externalAccess.enabled }}
29+
- name: EXTERNAL_CLIENT_PORT
30+
valueFrom:
31+
serviceRef:
32+
name: {{ template "common.names.fullname" . }}
33+
jsonpath: '{ .spec.ports[?(@.name=="tcp-external")].port }'
34+
{{- end }}
35+
36+
37+
{{- range $i, $internelListeners := ( splitList "," ( include "kafka.kraft.internelListeners" . ) )}}
38+
- name: {{ printf "KAFKA_NODE_%d" $i }}
39+
value: {{ $internelListeners }}
40+
{{- end }}
41+
42+
- name: KAFKA_PORT
43+
valueFrom:
44+
serviceRef:
45+
name: {{ template "common.names.fullname" . }}
46+
jsonpath: '{ .spec.ports[?(@.name=="tcp-client")].port }'
47+
848
{{- if (include "kafka.saslUserPasswordsEnabled" .) }}
949
{{- if (include "kafka.client.saslEnabled" .) }}
1050
- name: CLIENT_USERS
@@ -15,14 +55,9 @@ credential:
1555
secretKeyRef:
1656
name: {{ printf "%s-user-passwords" (include "common.names.fullname" .) }}
1757
jsonpath: '{ .data.client-passwords }'
18-
19-
- name: SYSTEM_USER_PASSPORT
20-
valueFrom:
21-
secretKeyRef:
22-
name: {{ printf "%s-user-passwords" (include "common.names.fullname" .) }}
23-
jsonpath: '{ .data.system-user-password }'
2458
{{- end }}
2559

60+
2661
{{- if regexFind "SASL" (upper .Values.listeners.interbroker.protocol) }}
2762
- name: INTER_BROKER_PASSWORDS
2863
valueFrom:
@@ -40,18 +75,17 @@ credential:
4075
{{- end }}
4176
{{- end }}
4277

43-
{{- if .Values.externalAccess.enabled }}
44-
{{- $fullname := include "common.names.fullname" . }}
45-
{{- $replicaCount := .Values.controller.replicaCount | int }}
46-
{{- range $i := until $replicaCount }}
47-
{{- $targetPod := printf "%s-controller-%d" (printf "%s" $fullname) $i }}
48-
- name: {{ printf "EXTERNAL_%d" $i }}
78+
{{- if .Values.externalAccess.enabled }}
79+
{{- $fullname := include "common.names.fullname" . }}
80+
{{- $replicaCount := .Values.controller.replicaCount | int }}
81+
{{- range $i := until $replicaCount }}
82+
- name: {{ printf "EXTERNAL_KAFKA_NODE_%d" $i }}
4983
valueFrom:
5084
serviceRef:
5185
name: {{ printf "%s-controller-%d-external" (include "common.names.fullname" $) $i | trunc 63 | trimSuffix "-" }}
5286
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
53-
{{- end }}
87+
{{- end }}
5488

55-
- name: EXTERNAL_PORT
89+
- name: EXTERNAL_KAFKA_PORT
5690
value: {{ .Values.externalAccess.controller.service.ports.external }}
5791
{{- end }}
Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,50 @@
11
credential:
2-
- name: INTERNAL_LISTENERS
3-
value: {{ include "kafka.kraft.internelListeners" . }}
4-
52
- name: PROTOCOL_MAP
63
value: {{ include "kafka.securityProtocolMap" . }}
74

5+
- name: CLIENT_DOMAIN
6+
value: {{ template "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
7+
8+
- name: CLIENT_HOST
9+
valueFrom:
10+
serviceRef:
11+
name: {{ template "common.names.fullname" . }}
12+
jsonpath: '{ .spec.clusterIP }'
13+
14+
- name: CLIENT_PORT
15+
valueFrom:
16+
serviceRef:
17+
name: {{ template "common.names.fullname" . }}
18+
jsonpath: '{ .spec.ports[?(@.name=="tcp-client")].port }'
19+
20+
{{- if (eq .Values.service.type "LoadBalancer") }}
21+
- name: EXTERNAL_CLIENT_HOST
22+
valueFrom:
23+
serviceRef:
24+
name: {{ template "common.names.fullname" . }}
25+
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
26+
{{- end }}
27+
28+
{{- if .Values.externalAccess.enabled }}
29+
- name: EXTERNAL_CLIENT_PORT
30+
valueFrom:
31+
serviceRef:
32+
name: {{ template "common.names.fullname" . }}
33+
jsonpath: '{ .spec.ports[?(@.name=="tcp-external")].port }'
34+
{{- end }}
35+
36+
37+
{{- range $i, $internelListeners := ( splitList "," ( include "kafka.kraft.internelListeners" . ) )}}
38+
- name: {{ printf "KAFKA_NODE_%d" $i }}
39+
value: {{ $internelListeners }}
40+
{{- end }}
41+
42+
- name: KAFKA_PORT
43+
valueFrom:
44+
serviceRef:
45+
name: {{ template "common.names.fullname" . }}
46+
jsonpath: '{ .spec.ports[?(@.name=="tcp-client")].port }'
47+
848
{{- if (include "kafka.saslUserPasswordsEnabled" .) }}
949
{{- if (include "kafka.client.saslEnabled" .) }}
1050
- name: CLIENT_USERS
@@ -15,14 +55,9 @@ credential:
1555
secretKeyRef:
1656
name: {{ printf "%s-user-passwords" (include "common.names.fullname" .) }}
1757
jsonpath: '{ .data.client-passwords }'
18-
19-
- name: SYSTEM_USER_PASSPORT
20-
valueFrom:
21-
secretKeyRef:
22-
name: {{ printf "%s-user-passwords" (include "common.names.fullname" .) }}
23-
jsonpath: '{ .data.system-user-password }'
2458
{{- end }}
2559

60+
2661
{{- if regexFind "SASL" (upper .Values.listeners.interbroker.protocol) }}
2762
- name: INTER_BROKER_PASSWORDS
2863
valueFrom:
@@ -40,18 +75,17 @@ credential:
4075
{{- end }}
4176
{{- end }}
4277

43-
{{- if .Values.externalAccess.enabled }}
44-
{{- $fullname := include "common.names.fullname" . }}
45-
{{- $replicaCount := .Values.controller.replicaCount | int }}
46-
{{- range $i := until $replicaCount }}
47-
{{- $targetPod := printf "%s-controller-%d" (printf "%s" $fullname) $i }}
48-
- name: {{ printf "EXTERNAL_%d" $i }}
78+
{{- if .Values.externalAccess.enabled }}
79+
{{- $fullname := include "common.names.fullname" . }}
80+
{{- $replicaCount := .Values.controller.replicaCount | int }}
81+
{{- range $i := until $replicaCount }}
82+
- name: {{ printf "EXTERNAL_KAFKA_NODE_%d" $i }}
4983
valueFrom:
5084
serviceRef:
5185
name: {{ printf "%s-controller-%d-external" (include "common.names.fullname" $) $i | trunc 63 | trimSuffix "-" }}
5286
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
53-
{{- end }}
87+
{{- end }}
5488

55-
- name: EXTERNAL_PORT
89+
- name: EXTERNAL_KAFKA_PORT
5690
value: {{ .Values.externalAccess.controller.service.ports.external }}
5791
{{- end }}

addons/kafka/3.6/plans/standard-1c2g3w/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## @param fullnameOverride String to fully override common.names.fullname
22
##
3-
fullnameOverride: hb-kafka-standard-1c2g3w
3+
fullnameOverride: "hb-kafka-standard-1c2g3w"
44

55
## @section Controller-eligible statefulset parameters
66
##
Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,50 @@
11
credential:
2-
- name: INTERNAL_LISTENERS
3-
value: {{ include "kafka.kraft.internelListeners" . }}
4-
52
- name: PROTOCOL_MAP
63
value: {{ include "kafka.securityProtocolMap" . }}
74

5+
- name: CLIENT_DOMAIN
6+
value: {{ template "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
7+
8+
- name: CLIENT_HOST
9+
valueFrom:
10+
serviceRef:
11+
name: {{ template "common.names.fullname" . }}
12+
jsonpath: '{ .spec.clusterIP }'
13+
14+
- name: CLIENT_PORT
15+
valueFrom:
16+
serviceRef:
17+
name: {{ template "common.names.fullname" . }}
18+
jsonpath: '{ .spec.ports[?(@.name=="tcp-client")].port }'
19+
20+
{{- if (eq .Values.service.type "LoadBalancer") }}
21+
- name: EXTERNAL_CLIENT_HOST
22+
valueFrom:
23+
serviceRef:
24+
name: {{ template "common.names.fullname" . }}
25+
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
26+
{{- end }}
27+
28+
{{- if .Values.externalAccess.enabled }}
29+
- name: EXTERNAL_CLIENT_PORT
30+
valueFrom:
31+
serviceRef:
32+
name: {{ template "common.names.fullname" . }}
33+
jsonpath: '{ .spec.ports[?(@.name=="tcp-external")].port }'
34+
{{- end }}
35+
36+
37+
{{- range $i, $internelListeners := ( splitList "," ( include "kafka.kraft.internelListeners" . ) )}}
38+
- name: {{ printf "KAFKA_NODE_%d" $i }}
39+
value: {{ $internelListeners }}
40+
{{- end }}
41+
42+
- name: KAFKA_PORT
43+
valueFrom:
44+
serviceRef:
45+
name: {{ template "common.names.fullname" . }}
46+
jsonpath: '{ .spec.ports[?(@.name=="tcp-client")].port }'
47+
848
{{- if (include "kafka.saslUserPasswordsEnabled" .) }}
949
{{- if (include "kafka.client.saslEnabled" .) }}
1050
- name: CLIENT_USERS
@@ -15,14 +55,9 @@ credential:
1555
secretKeyRef:
1656
name: {{ printf "%s-user-passwords" (include "common.names.fullname" .) }}
1757
jsonpath: '{ .data.client-passwords }'
18-
19-
- name: SYSTEM_USER_PASSPORT
20-
valueFrom:
21-
secretKeyRef:
22-
name: {{ printf "%s-user-passwords" (include "common.names.fullname" .) }}
23-
jsonpath: '{ .data.system-user-password }'
2458
{{- end }}
2559

60+
2661
{{- if regexFind "SASL" (upper .Values.listeners.interbroker.protocol) }}
2762
- name: INTER_BROKER_PASSWORDS
2863
valueFrom:
@@ -40,18 +75,17 @@ credential:
4075
{{- end }}
4176
{{- end }}
4277

43-
{{- if .Values.externalAccess.enabled }}
44-
{{- $fullname := include "common.names.fullname" . }}
45-
{{- $replicaCount := .Values.controller.replicaCount | int }}
46-
{{- range $i := until $replicaCount }}
47-
{{- $targetPod := printf "%s-controller-%d" (printf "%s" $fullname) $i }}
48-
- name: {{ printf "EXTERNAL_%d" $i }}
78+
{{- if .Values.externalAccess.enabled }}
79+
{{- $fullname := include "common.names.fullname" . }}
80+
{{- $replicaCount := .Values.controller.replicaCount | int }}
81+
{{- range $i := until $replicaCount }}
82+
- name: {{ printf "EXTERNAL_KAFKA_NODE_%d" $i }}
4983
valueFrom:
5084
serviceRef:
5185
name: {{ printf "%s-controller-%d-external" (include "common.names.fullname" $) $i | trunc 63 | trimSuffix "-" }}
5286
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
53-
{{- end }}
87+
{{- end }}
5488

55-
- name: EXTERNAL_PORT
89+
- name: EXTERNAL_KAFKA_PORT
5690
value: {{ .Values.externalAccess.controller.service.ports.external }}
5791
{{- end }}

0 commit comments

Comments
 (0)