feat: add Helmfile-managed k8s charts for tasks 10-13
Local charts: kafka-cluster (Strimzi Kafka+KafkaNodePool CRs, 3-replica KRaft
topology, 5Gi memory cap, Longhorn storage, pod anti-affinity), queue-crd
(Queue CRD + queue-operator Deployment/RBAC), management-service
(Deployment/Service/ConfigMap/HPA/Ingress, REST exposed externally via
cert-manager-issued TLS, raw gRPC kept cluster-internal per design.md §7a).
helmfile.yaml.gotmpl + releases.d/*.gotmpl wire strimzi-operator ->
kafka-cluster -> redis -> {queue-crd, management-service} via `needs:`.
Directory is releases.d, not helmfile.d as originally sketched in design.md
section 7b: Helmfile v1 treats a literal "helmfile.d" directory as a special
auto-discovery mode that conflicts with an explicit top-level helmfile.yaml.
Files use .gotmpl (required by Helmfile v1 for {{ }}-templated files) and
each declares its own environments: block, since nested helmfiles don't
inherit the parent's resolved values in this version.
Namespace is sqs throughout. environments/homelab.yaml carries no secrets.
Validated locally via helm lint/helm template (all 3 charts) and
`helmfile -e homelab build` (dependency ordering + value substitution) — no
cluster contact made. Live apply is a separate, explicitly-confirmed step.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
apiVersion: kafka.strimzi.io/v1beta2
|
||||
kind: Kafka
|
||||
metadata:
|
||||
name: {{ .Values.clusterName }}
|
||||
namespace: {{ .Values.namespace }}
|
||||
annotations:
|
||||
strimzi.io/node-pools: enabled
|
||||
strimzi.io/kraft: enabled
|
||||
spec:
|
||||
kafka:
|
||||
version: 4.0.0
|
||||
metadataVersion: 4.0-IV3
|
||||
listeners:
|
||||
- name: plain
|
||||
port: 9092
|
||||
type: internal
|
||||
tls: false
|
||||
- name: tls
|
||||
port: 9093
|
||||
type: internal
|
||||
tls: true
|
||||
config:
|
||||
default.replication.factor: {{ .Values.kafka.replicationFactor }}
|
||||
min.insync.replicas: {{ .Values.kafka.minInsyncReplicas }}
|
||||
offsets.topic.replication.factor: {{ .Values.kafka.replicationFactor }}
|
||||
transaction.state.log.replication.factor: {{ .Values.kafka.replicationFactor }}
|
||||
transaction.state.log.min.isr: {{ .Values.kafka.minInsyncReplicas }}
|
||||
entityOperator:
|
||||
topicOperator: {}
|
||||
userOperator: {}
|
||||
@@ -0,0 +1,39 @@
|
||||
apiVersion: kafka.strimzi.io/v1beta2
|
||||
kind: KafkaNodePool
|
||||
metadata:
|
||||
name: {{ .Values.clusterName }}-pool
|
||||
namespace: {{ .Values.namespace }}
|
||||
labels:
|
||||
strimzi.io/cluster: {{ .Values.clusterName }}
|
||||
spec:
|
||||
replicas: {{ .Values.nodePool.replicas }}
|
||||
roles:
|
||||
- controller
|
||||
- broker
|
||||
storage:
|
||||
type: persistent-claim
|
||||
size: {{ .Values.nodePool.storage.sizeGi }}Gi
|
||||
class: {{ .Values.nodePool.storage.class }}
|
||||
deleteClaim: false
|
||||
resources:
|
||||
limits:
|
||||
memory: {{ .Values.nodePool.resources.memory }}
|
||||
cpu: {{ .Values.nodePool.resources.cpu | quote }}
|
||||
requests:
|
||||
memory: {{ .Values.nodePool.resources.memory }}
|
||||
cpu: {{ .Values.nodePool.resources.cpu | quote }}
|
||||
template:
|
||||
pod:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
podAffinityTerm:
|
||||
topologyKey: {{ .Values.nodePool.antiAffinityTopologyKey }}
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
strimzi.io/cluster: {{ .Values.clusterName }}
|
||||
kafkaContainer:
|
||||
env:
|
||||
- name: KAFKA_HEAP_OPTS
|
||||
value: {{ .Values.nodePool.heapOpts | quote }}
|
||||
Reference in New Issue
Block a user