P6.2: Fix peer discovery DNS SRV service name and add POD_IP
Fixes the peer discovery service name mismatch that caused SRV lookups to fail. The headless Service is named "<fullname>-headless" but the config was using ".Release.Name-headless", which didn't match. Also adds POD_IP to the Downward API env vars (was missing). Changes: - _helpers.tpl: Use miroir.fullname instead of Release.Name for service_name default - values.yaml: Document service_name default as auto-derived - miroir-deployment.yaml: Add POD_IP env var via Downward API - verify_p6_2_peer_discovery.sh: Add POD_IP verification step Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
e6cdd05f30
commit
26c9521ba9
4 changed files with 16 additions and 3 deletions
|
|
@ -178,7 +178,7 @@ resharding:
|
|||
retain_old_index_hours: {{ .Values.miroir.resharding.retain_old_index_hours | default 48 }}
|
||||
allowed_windows: {{ .Values.miroir.resharding.allowed_windows | default list | toJson }}
|
||||
peer_discovery:
|
||||
service_name: {{ .Values.miroir.peer_discovery.service_name | default .Release.Name }}-headless
|
||||
service_name: {{ .Values.miroir.peer_discovery.service_name | default (printf "%s-headless" (include "miroir.fullname" .)) }}
|
||||
refresh_interval_s: {{ .Values.miroir.peer_discovery.refresh_interval_s | default 15 }}
|
||||
leader_election:
|
||||
enabled: {{ .Values.miroir.leader_election.enabled | default true }}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,10 @@ spec:
|
|||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: MIROIR_CONFIG_PATH
|
||||
value: /config/miroir.yaml
|
||||
- name: MIROIR_MASTER_KEY
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ miroir:
|
|||
retain_old_index_hours: 48
|
||||
allowed_windows: [] # e.g., ["22:00-04:00 UTC"]
|
||||
peer_discovery:
|
||||
service_name: miroir-headless
|
||||
service_name: "" # default: "<fullname>-headless" (auto-derived from release name)
|
||||
refresh_interval_s: 15
|
||||
leader_election:
|
||||
enabled: true # auto-true when replicas > 1
|
||||
|
|
|
|||
|
|
@ -62,7 +62,16 @@ else
|
|||
fi
|
||||
|
||||
echo ""
|
||||
echo "6. Checking peer_discovery configuration..."
|
||||
echo "6. Verifying POD_IP env var is set (if running in K8s)..."
|
||||
POD_IP="${POD_IP:-unknown}"
|
||||
if [ "$POD_IP" != "unknown" ]; then
|
||||
echo " ✓ POD_IP=$POD_IP"
|
||||
else
|
||||
echo " ⚠ POD_IP not set (not running in Kubernetes)"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "7. Checking peer_discovery configuration..."
|
||||
# The peer_discovery config is internal, but we can check the log for the refresh loop starting
|
||||
# For local dev, peer discovery may be disabled if POD_NAME=unknown
|
||||
if [ "$POD_NAME" = "unknown" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue