fix: add named port 'http' to vin-decoder Service and container for ServiceMonitor compatibility
Validate Flux manifests / kustomize-build (pull_request) Failing after 20s
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:
@@ -37,7 +37,8 @@ spec:
|
||||
- name: vin-decoder
|
||||
image: registry.leeworks.dev/vin-decoder/api:latest # {"$imagepolicy": "flux-system:vin-decoder"}
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
- name: http
|
||||
containerPort: 3000
|
||||
env:
|
||||
- name: RAPIDAPI_PROXY_SECRET
|
||||
valueFrom:
|
||||
@@ -72,7 +73,8 @@ spec:
|
||||
selector:
|
||||
app: vin-decoder
|
||||
ports:
|
||||
- port: 80
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 3000
|
||||
- apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
|
||||
Reference in New Issue
Block a user