fix: add named port 'http' to vin-decoder Service and container for ServiceMonitor compatibility
Validate Flux manifests / kustomize-build (pull_request) Failing after 20s

The ServiceMonitor at flux/vin-decoder/servicemonitor.yaml references port
by name ('http'), but the Service had anonymous port 80 -> 3000 and the
container had no named port. Prometheus ServiceMonitor port matching requires
the port name to match between the Service and the ServiceMonitor spec.

Adds:
- name: http to the containerPort (port 3000)
- name: http to the Service port (port 80 -> targetPort 3000)

This allows the kube-prometheus-stack ServiceMonitor to correctly scrape
/metrics from vin-decoder pods.

Closes leeworks-agents/api-company#174
This commit is contained in:
AI-Agent
2026-06-07 05:06:10 +00:00
parent 695dac91c4
commit cc7172d563
+4 -2
View File
@@ -37,7 +37,8 @@ spec:
- name: vin-decoder - name: vin-decoder
image: registry.leeworks.dev/vin-decoder/api:latest # {"$imagepolicy": "flux-system:vin-decoder"} image: registry.leeworks.dev/vin-decoder/api:latest # {"$imagepolicy": "flux-system:vin-decoder"}
ports: ports:
- containerPort: 3000 - name: http
containerPort: 3000
env: env:
- name: RAPIDAPI_PROXY_SECRET - name: RAPIDAPI_PROXY_SECRET
valueFrom: valueFrom:
@@ -72,7 +73,8 @@ spec:
selector: selector:
app: vin-decoder app: vin-decoder
ports: ports:
- port: 80 - name: http
port: 80
targetPort: 3000 targetPort: 3000
- apiVersion: networking.k8s.io/v1 - apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress