fix: Kubernetes 플랫폼 설정 정비 - #761
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e14e85f4f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - alert: PrometheusUnavailable | ||
| expr: (sum(max by (pod) (kube_pod_status_ready{namespace="monitoring", condition="true", pod=~"prometheus-kube-prometheus-stack-prometheus-[0-9]+"})) < 1) or absent(kube_pod_status_ready{namespace="monitoring", condition="true", pod=~"prometheus-kube-prometheus-stack-prometheus-[0-9]+"}) |
There was a problem hiding this comment.
Monitor the sole Prometheus instance externally
When the only Prometheus Pod crashes, loses its node, or otherwise stops evaluating rules, this expression cannot be evaluated and therefore cannot send PrometheusUnavailable to Alertmanager. The previous two-replica setup allowed the surviving replica to detect this condition; with one replica, this rule only works while that same instance remains healthy enough to scrape kube-state-metrics and evaluate alerts. An independent watchdog or external Prometheus is required for the advertised unavailable alert.
Useful? React with 👍 / 👎.
| replicaExternalLabelNameClear: true | ||
| # A second Prometheus replica stores an independent full TSDB copy. This | ||
| # cluster uses one durable Longhorn-backed instance to keep metric storage bounded. | ||
| replicas: 1 |
There was a problem hiding this comment.
Update the dashboard's Prometheus replica target
After setting the desired replica count to one, the CodePlace Monitoring Stack dashboard still labels the panel Prometheus ready replicas / 2, sets its maximum to 2, and only turns green at 2 (grafana-dashboard-monitoring-stack.yaml:249-264). Consequently, a completely healthy deployment now appears orange and degraded to operators; update that panel's title, range, and thresholds to use one replica.
Useful? React with 👍 / 👎.
| # A second Prometheus replica stores an independent full TSDB copy. This | ||
| # cluster uses one durable Longhorn-backed instance to keep metric storage bounded. | ||
| replicas: 1 |
There was a problem hiding this comment.
Reclaim the scaled-down Prometheus PVC
On an upgrade of the existing two-replica installation, reducing the StatefulSet to one replica does not remove the second replica's PVC because no persistentVolumeClaimRetentionPolicy or cleanup migration is configured. The unused Longhorn volume retains its TSDB indefinitely, so this change does not actually reclaim the storage it is intended to save; include a safe cleanup step or an explicit scale-down retention policy.
Useful? React with 👍 / 👎.
변경 사항