88 lines
2.6 KiB
YAML
88 lines
2.6 KiB
YAML
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
kind: Kustomization
|
|
|
|
namespace: infra # <-- Add this here instead insidde of benthos-deployment.yaml
|
|
|
|
# 1. List your static YAML files here
|
|
resources:
|
|
#- nats-cluster.yaml
|
|
- benthos/benthos-deployment.yaml
|
|
#- benthos-service.yaml
|
|
|
|
helmCharts:
|
|
- name: nats
|
|
repo: https://nats-io.github.io/k8s/helm/charts/
|
|
releaseName: nats-cluster
|
|
#namespace: infra
|
|
#valuesFile: nats-values.yaml # It will look for this file in the same folder
|
|
valuesInline:
|
|
namespaceOverride: "infra" # if not there got created in default namespaces
|
|
replicaCount: 3
|
|
config:
|
|
cluster:
|
|
enabled: true
|
|
jetstream:
|
|
enabled: true
|
|
fileStore:
|
|
pvc:
|
|
enabled: true
|
|
storageClassName: "longhorn" # Use Longhorn for replication!
|
|
size: 5Gi
|
|
# Add the nodeSelector directly here instead of using a patch!
|
|
nodeSelector:
|
|
node-role.kubernetes.io/nworker: "true"
|
|
|
|
# 2. List your config sources here
|
|
# This tells K8s: "Take every file in these folders and make ConfigMaps"
|
|
configMapGenerator:
|
|
- name: benthos-streams
|
|
files:
|
|
- benthos/streams/ingest_request_log_id_serial.yaml
|
|
- benthos/streams/ingest_transaction_log_id_serial.yaml
|
|
#- streams/poll_request_log_id_serial.yaml
|
|
#- streams/poll_transaction_id_serial.yaml
|
|
- name: benthos-templates
|
|
files:
|
|
- benthos/templates/ingest_template_id_serial.yaml
|
|
- benthos/templates/poll_template_id_serial.yaml
|
|
- name: benthos-resources
|
|
files:
|
|
- benthos/resources/resources.yaml
|
|
|
|
patches:
|
|
- target:
|
|
kind: Deployment
|
|
name: benthos # Ensure this matches the name inside benthos-deployment.yaml
|
|
patch: |-
|
|
- op: add
|
|
path: /spec/template/spec/nodeSelector
|
|
value:
|
|
node-role.kubernetes.io/nworker: "true"
|
|
|
|
# secretGenerator:
|
|
# - name: postgres-ha-app
|
|
# literals:
|
|
# - password=0lkzPxlwj6JVOXwwoLYROZJsONJoPK3MtrqkxnH3iaXUs0gFg0WL78RxyDdB86Sk
|
|
# - target:
|
|
# kind: StatefulSet
|
|
# name: nats-cluster # Ensure this matches the 'metadata.name' in nats-cluster.yaml
|
|
# patch: |-
|
|
# - op: add
|
|
# path: /spec/template/spec/nodeSelector
|
|
# value:
|
|
# node-role.kubernetes.io/nworker: "true"
|
|
|
|
# helmCharts:
|
|
# - name: nats
|
|
# repo: https://nats-io.github.io/k8s/helm/charts/
|
|
# releaseName: nats-cluster
|
|
# namespace: infra
|
|
# valuesInline:
|
|
# nats:
|
|
# jetstream:
|
|
# enabled: true
|
|
# cluster:
|
|
# enabled: true
|
|
# replicas: 3
|
|
|