5 Commits

Author SHA1 Message Date
Will Anderson 81c301f013 fix(neuron-prod): set neuron-marketing-hpa minReplicas to 1
Kubernetes rejects minReplicas=0 unless at least one Object or
External metric is configured. With only a Resource (CPU) metric,
the HPA is invalid:

  HorizontalPodAutoscaler.autoscaling "neuron-marketing-hpa"
  is invalid: [spec.minReplicas: Invalid value: 0: must be greater
  than or equal to 1, spec.metrics: Forbidden: must specify at
  least one Object or External metric to support scaling to zero
  replicas]

This was blocking the entire neuron-prod Argo CD sync — every
manifest in the directory had to be applied individually after
this single resource caused the multi-resource patch to fail.
The dharma NetworkPolicy applied today only because Argo retried
individually after the failure.

The file header already states "minReplicas=1 prevents unnecessary
idle waste" as the intent for this single-Legion-node period;
this brings the marketing HPA into line with the other two.
2026-05-04 16:21:01 -05:00
will.anderson a64860064b fix(neuron-prod): add allow-dharma-ingress NetworkPolicy (#6) 2026-05-04 21:16:01 +00:00
will.anderson cbb564ccf5 revert(ci): runner public URL — CF Access blocks registration (#4) 2026-05-04 21:05:29 +00:00
will.anderson be0508037a fix(dharma): drop letsencrypt certResolver from IngressRoute 2026-05-04 20:56:29 +00:00
will.anderson 6f5d041440 fix(ci): point Gitea Actions runners at public instance URL 2026-05-04 20:56:26 +00:00
2 changed files with 32 additions and 1 deletions
@@ -82,7 +82,12 @@ spec:
apiVersion: apps/v1
kind: Deployment
name: neuron-marketing
minReplicas: 0
# minReplicas=1 to match the file's own convention (see header comment).
# Kubernetes only allows minReplicas=0 when at least one Object or External
# metric is configured (queue depth, custom signal, etc.); with only a
# Resource (CPU) metric, scale-to-zero is rejected and the whole HPA is
# invalid — which was blocking neuron-prod's Argo CD sync.
minReplicas: 1
maxReplicas: 8
metrics:
- type: Resource
@@ -117,6 +117,32 @@ spec:
matchLabels:
kubernetes.io/metadata.name: neuron-prod
---
# ── dharma: accept from Traefik (kube-system) and neuron-prod namespace ──────
# The dharma pod was healthy and the IngressRoute was correct, but cross-
# namespace ingress from kube-system (Traefik) was denied by default-deny-all,
# so every external request landed at Traefik and bounced back as 502. This
# allow rule mirrors `allow-mcp-ingress` and brings dharma into line with the
# other neuron-prod services.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-dharma-ingress
namespace: neuron-prod
spec:
podSelector:
matchLabels:
app: dharma
policyTypes:
- Ingress
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: neuron-prod
---
# ── Egress: all prod pods may reach platform (postgres/redis), vault,
# monitoring (alloy OTLP), kube-dns, and the internet (external APIs) ─
apiVersion: networking.k8s.io/v1