Skip to content

Commit baadd3b

Browse files
committed
Redpanda single replica from helm chart using Yolean/unhelm#3
1 parent 7af963a commit baadd3b

File tree

7 files changed

+479
-0
lines changed

7 files changed

+479
-0
lines changed

kafka/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
# ./unhelm.sh output that we don't need
3+
helm
4+
redpanda/ystack/kustomization.yaml
5+
redpanda/ystack/redpanda/templates/poddisruptionbudget.yaml
6+
redpanda/ystack/redpanda/templates/tests

kafka/redpanda.ystack.values.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# yaml-language-server: $schema=https://github.com/redpanda-data/helm-charts/raw/redpanda-4.0.32/charts/redpanda/values.schema.json
2+
# unhelm-template-repo: https://charts.redpanda.com
3+
# unhelm-namespace: kafka
4+
5+
# this is an attempt to disable as much as possible from the chart, except the actual broker
6+
statefulset:
7+
replicas: 1
8+
additionalRedpandaCmdFlags:
9+
- --overprovisioned
10+
sideCars:
11+
configWatcher:
12+
enabled: false
13+
tls:
14+
enabled: false
15+
config:
16+
cluster:
17+
auto_create_topics_enabled: false
18+
tunable: {}
19+
node: {}
20+
external:
21+
enabled: false
22+
rbac:
23+
enabled: false
24+
post_install_job:
25+
enabled: false
26+
post_upgrade_job:
27+
enabled: false
28+
console:
29+
enabled: false
30+
logging:
31+
logLevel: info
32+
usageStats:
33+
enabled: false
34+
tuning:
35+
tune_aio_events: false
36+
# See forwarded ports in ../k3s/ystack.yaml
37+
# See also https://github.com/redpanda-data/helm-charts/issues/285
38+
listeners:
39+
kafka:
40+
port: 9092
41+
external:
42+
default:
43+
advertisedPorts:
44+
- 31712
45+
http:
46+
port: 8082
47+
external:
48+
default:
49+
advertisedPorts:
50+
- 31713
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
# Source: redpanda/templates/configmap.yaml
3+
apiVersion: v1
4+
kind: ConfigMap
5+
metadata:
6+
name: redpanda
7+
namespace: "kafka"
8+
labels:
9+
app.kubernetes.io/component: redpanda
10+
app.kubernetes.io/instance: redpanda
11+
app.kubernetes.io/managed-by: Helm
12+
app.kubernetes.io/name: redpanda
13+
helm.sh/chart: redpanda-4.0.47
14+
data:
15+
bootstrap.yaml: |
16+
kafka_enable_authorization: false
17+
enable_sasl: false
18+
auto_create_topics_enabled: false
19+
compacted_log_segment_size: 67108864
20+
group_topic_partitions: 16
21+
kafka_batch_max_bytes: 1048576
22+
kafka_connection_rate_limit: 1000
23+
log_segment_size: 134217728
24+
log_segment_size_max: 268435456
25+
log_segment_size_min: 16777216
26+
max_compacted_log_segment_size: 536870912
27+
topic_partitions_per_shard: 1000
28+
storage_min_free_bytes: 1073741824
29+
redpanda.yaml: |
30+
config_file: /etc/redpanda/redpanda.yaml
31+
redpanda:
32+
empty_seed_starts_cluster: false
33+
kafka_enable_authorization: false
34+
enable_sasl: false
35+
auto_create_topics_enabled: false
36+
compacted_log_segment_size: 67108864
37+
group_topic_partitions: 16
38+
kafka_batch_max_bytes: 1048576
39+
kafka_connection_rate_limit: 1000
40+
log_segment_size: 134217728
41+
log_segment_size_max: 268435456
42+
log_segment_size_min: 16777216
43+
max_compacted_log_segment_size: 536870912
44+
topic_partitions_per_shard: 1000
45+
storage_min_free_bytes: 1073741824
46+
admin:
47+
- name: internal
48+
address: 0.0.0.0
49+
port: 9644
50+
- name: default
51+
address: 0.0.0.0
52+
port: 9645
53+
admin_api_tls:
54+
kafka_api:
55+
- name: internal
56+
address: 0.0.0.0
57+
port: 9092
58+
- name: default
59+
address: 0.0.0.0
60+
port: 9094
61+
kafka_api_tls:
62+
rpc_server:
63+
address: 0.0.0.0
64+
port: 33145
65+
seed_servers:
66+
- host:
67+
address: redpanda-0.redpanda.kafka.svc.cluster.local.
68+
port: 33145
69+
schema_registry:
70+
schema_registry_api:
71+
- name: internal
72+
address: 0.0.0.0
73+
port: 8081
74+
- name: default
75+
address: 0.0.0.0
76+
port: 8084
77+
schema_registry_api_tls:
78+
pandaproxy:
79+
pandaproxy_api:
80+
- name: internal
81+
address: 0.0.0.0
82+
port: 8082
83+
- name: default
84+
address: 0.0.0.0
85+
port: 8083
86+
pandaproxy_api_tls:
87+
88+
rpk:
89+
enable_usage_stats: false
90+
overprovisioned: false
91+
enable_memory_locking: false
92+
tune_aio_events: false
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
# Source: redpanda/templates/secrets.yaml
3+
apiVersion: v1
4+
kind: Secret
5+
metadata:
6+
name: redpanda-sts-lifecycle
7+
namespace: "kafka"
8+
labels:
9+
app.kubernetes.io/component: redpanda
10+
app.kubernetes.io/instance: redpanda
11+
app.kubernetes.io/managed-by: Helm
12+
app.kubernetes.io/name: redpanda
13+
helm.sh/chart: redpanda-4.0.47
14+
type: Opaque
15+
stringData:
16+
common.sh: |-
17+
#!/usr/bin/env bash
18+
19+
# the SERVICE_NAME comes from the metadata.name of the pod, essentially the POD_NAME
20+
CURL_URL="http://${SERVICE_NAME}.redpanda.kafka.svc.cluster.local:9644"
21+
22+
# commands used throughout
23+
CURL_NODE_ID_CMD="curl --silent --fail ${CURL_URL}/v1/node_config"
24+
25+
CURL_MAINTENANCE_DELETE_CMD_PREFIX='curl -X DELETE --silent -o /dev/null -w "%{http_code}"'
26+
CURL_MAINTENANCE_PUT_CMD_PREFIX='curl -X PUT --silent -o /dev/null -w "%{http_code}"'
27+
CURL_MAINTENANCE_GET_CMD="curl -X GET --silent ${CURL_URL}/v1/maintenance"
28+
29+
postStart.sh: |-
30+
#!/usr/bin/env bash
31+
# This code should be similar if not exactly the same as that found in the panda-operator, see
32+
# https://github.com/redpanda-data/redpanda/blob/e51d5b7f2ef76d5160ca01b8c7a8cf07593d29b6/src/go/k8s/pkg/resources/secret.go
33+
34+
# path below should match the path defined on the statefulset
35+
source /var/lifecycle/common.sh
36+
37+
preStop.sh: |-
38+
#!/usr/bin/env bash
39+
# This code should be similar if not exactly the same as that found in the panda-operator, see
40+
# https://github.com/redpanda-data/redpanda/blob/e51d5b7f2ef76d5160ca01b8c7a8cf07593d29b6/src/go/k8s/pkg/resources/secret.go
41+
42+
# path below should match the path defined on the statefulset
43+
source /var/lifecycle/common.sh
44+
45+
set -x
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
# Source: redpanda/templates/service.internal.yaml
3+
# This service is only used to create the DNS enteries for each pod in
4+
# the stateful set and allow the serviceMonitor to target the pods.
5+
# This service should not be used by any client application
6+
apiVersion: v1
7+
kind: Service
8+
metadata:
9+
name: redpanda
10+
namespace: "kafka"
11+
labels:
12+
monitoring.redpanda.com/enabled: "false"
13+
app.kubernetes.io/component: redpanda
14+
app.kubernetes.io/instance: redpanda
15+
app.kubernetes.io/managed-by: Helm
16+
app.kubernetes.io/name: redpanda
17+
helm.sh/chart: redpanda-4.0.47
18+
spec:
19+
type: ClusterIP
20+
publishNotReadyAddresses: true
21+
clusterIP: None
22+
selector:
23+
app.kubernetes.io/name: redpanda
24+
app.kubernetes.io/instance: "redpanda"
25+
ports:
26+
- name: admin
27+
protocol: TCP
28+
targetPort: 9644
29+
port: 9644

0 commit comments

Comments
 (0)