Fix NATS URL service name mismatch and split combined ConfigMap+StatefulSet
- F8: Correct NATS_URLS, REDIS_URL, MINIO_ENDPOINT to use actual service names (nats, redis-master, minio) instead of fullname-prefixed names that don't exist - F9: Split combined ConfigMap+StatefulSet in nats/statefulset.yaml into separate configmap.yaml and statefulset.yaml files for maintainability
This commit is contained in:
parent
54f2f42710
commit
ac60dc5a51
3 changed files with 47 additions and 46 deletions
|
|
@ -11,9 +11,9 @@ data:
|
|||
DB_HOST: "{{ .Values.postgresql.clusterName }}-rw.{{ .Values.namespace }}.svc.cluster.local"
|
||||
DB_PORT: "{{ .Values.postgresql.port | default \"5432\" }}"
|
||||
DB_NAME: "{{ .Values.postgresql.database | default \"osint_data\" }}"
|
||||
NATS_URLS: "nats://{{ include \"osint-dashboard.fullname\" . }}-nats.{{ .Values.namespace }}.svc.cluster.local:{{ .Values.nats.ports.client }}"
|
||||
REDIS_URL: "redis://{{ include \"osint-dashboard.fullname\" . }}-redis.{{ .Values.namespace }}.svc.cluster.local:{{ .Values.redis.ports.redis }}/0"
|
||||
MINIO_ENDPOINT: "{{ include \"osint-dashboard.fullname\" . }}-minio.{{ .Values.namespace }}.svc.cluster.local:{{ .Values.minio.ports.api }}"
|
||||
NATS_URLS: "nats://nats.{{ .Values.namespace }}.svc.cluster.local:{{ .Values.nats.ports.client }}"
|
||||
REDIS_URL: "redis://redis-master.{{ .Values.namespace }}.svc.cluster.local:{{ .Values.redis.ports.redis }}/0"
|
||||
MINIO_ENDPOINT: "minio.{{ .Values.namespace }}.svc.cluster.local:{{ .Values.minio.ports.api }}"
|
||||
MINIO_BUCKET_VIDEO: "{{ .Values.minio.buckets.0.name | default \"osint-video-clips\" }}"
|
||||
MINIO_BUCKET_SATELLITE: "{{ .Values.minio.buckets.1.name | default \"osint-satellite-tiles\" }}"
|
||||
MINIO_BUCKET_DATA: "{{ .Values.minio.buckets.2.name | default \"osint-data-dumps\" }}"
|
||||
|
|
|
|||
44
apps/base/osint-dashboard/templates/nats/configmap.yaml
Normal file
44
apps/base/osint-dashboard/templates/nats/configmap.yaml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{{- if .Values.nats.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nats-config
|
||||
namespace: {{ .Values.namespace }}
|
||||
labels:
|
||||
{{- include "osint-dashboard.labels" . | nindent 4 }}
|
||||
data:
|
||||
nats-server.conf: |
|
||||
port: {{ .Values.nats.ports.client }}
|
||||
server_name: "osint-nats-${HOSTNAME}"
|
||||
|
||||
# Cluster
|
||||
cluster {
|
||||
port: {{ .Values.nats.ports.cluster }}
|
||||
routes: [
|
||||
nats-route://nats-0.nats-cluster.{{ .Values.namespace }}.svc:{{ .Values.nats.ports.cluster }},
|
||||
nats-route://nats-1.nats-cluster.{{ .Values.namespace }}.svc:{{ .Values.nats.ports.cluster }},
|
||||
nats-route://nats-2.nats-cluster.{{ .Values.namespace }}.svc:{{ .Values.nats.ports.cluster }}
|
||||
]
|
||||
cluster_advertise: "nats-${HOSTNAME}.nats-cluster.{{ .Values.namespace }}.svc:{{ .Values.nats.ports.cluster }}"
|
||||
}
|
||||
|
||||
# JetStream
|
||||
jetstream {
|
||||
store_dir: "{{ .Values.nats.jetstream.fileStore }}"
|
||||
max_mem_store: {{ .Values.nats.jetstream.maxMemory }}
|
||||
max_file_store: {{ .Values.nats.storage.size }}
|
||||
}
|
||||
|
||||
# Monitoring
|
||||
monitor: {{ .Values.nats.ports.monitor }}
|
||||
|
||||
# WebSocket
|
||||
websocket {
|
||||
port: {{ .Values.nats.ports.websocket }}
|
||||
no_tls: true
|
||||
}
|
||||
|
||||
# Logging
|
||||
logtime: true
|
||||
log_file: /var/log/nats/nats.log
|
||||
{{- end }}
|
||||
|
|
@ -1,47 +1,4 @@
|
|||
{{- if .Values.nats.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nats-config
|
||||
namespace: {{ .Values.namespace }}
|
||||
labels:
|
||||
{{- include "osint-dashboard.labels" . | nindent 4 }}
|
||||
data:
|
||||
nats-server.conf: |
|
||||
port: {{ .Values.nats.ports.client }}
|
||||
server_name: "osint-nats-${HOSTNAME}"
|
||||
|
||||
# Cluster
|
||||
cluster {
|
||||
port: {{ .Values.nats.ports.cluster }}
|
||||
routes: [
|
||||
nats-route://nats-0.nats-cluster.{{ .Values.namespace }}.svc:{{ .Values.nats.ports.cluster }},
|
||||
nats-route://nats-1.nats-cluster.{{ .Values.namespace }}.svc:{{ .Values.nats.ports.cluster }},
|
||||
nats-route://nats-2.nats-cluster.{{ .Values.namespace }}.svc:{{ .Values.nats.ports.cluster }}
|
||||
]
|
||||
cluster_advertise: "nats-${HOSTNAME}.nats-cluster.{{ .Values.namespace }}.svc:{{ .Values.nats.ports.cluster }}"
|
||||
}
|
||||
|
||||
# JetStream
|
||||
jetstream {
|
||||
store_dir: "{{ .Values.nats.jetstream.fileStore }}"
|
||||
max_mem_store: {{ .Values.nats.jetstream.maxMemory }}
|
||||
max_file_store: {{ .Values.nats.storage.size }}
|
||||
}
|
||||
|
||||
# Monitoring
|
||||
monitor: {{ .Values.nats.ports.monitor }}
|
||||
|
||||
# WebSocket
|
||||
websocket {
|
||||
port: {{ .Values.nats.ports.websocket }}
|
||||
no_tls: true
|
||||
}
|
||||
|
||||
# Logging
|
||||
logtime: true
|
||||
log_file: /var/log/nats/nats.log
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue