mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 08:57:17 +00:00
fix: parent-child httpproxy health checking (#25714)
Signed-off-by: Greg Barasch <gregbarasch@gmail.com>
This commit is contained in:
parent
b85887fc3a
commit
401b1a8b3c
3 changed files with 36 additions and 1 deletions
|
|
@ -15,6 +15,9 @@ if obj.status then
|
|||
hs.status = "Healthy"
|
||||
hs.message = obj.status.description
|
||||
return hs
|
||||
elseif obj.spec.includes ~= nil and cond.status == "False" then
|
||||
hs.status = "Healthy"
|
||||
hs.message = "HTTPProxy inclusions cannot be health checked" -- Parent/child pairs depend on each other circularly. This means that, without this check here, we block deployments. Either we flag orphans as valid/unknown, risking a successful deploy followed by subsequent failures once adopted, or we mark proxies with inclusions (parents) as healthy.
|
||||
elseif cond.type == "Valid" and cond.status == "False" then
|
||||
hs.status = "Degraded"
|
||||
hs.message = obj.status.description
|
||||
|
|
|
|||
|
|
@ -18,4 +18,8 @@ tests:
|
|||
- healthStatus:
|
||||
status: Progressing
|
||||
message: 'Waiting for status'
|
||||
inputPath: testdata/generation.yaml
|
||||
inputPath: testdata/generation.yaml
|
||||
- healthStatus:
|
||||
status: Healthy
|
||||
message: 'HTTPProxy inclusions cannot be health checked'
|
||||
inputPath: testdata/parent_child.yaml
|
||||
|
|
|
|||
28
resource_customizations/projectcontour.io/HTTPProxy/testdata/parent_child.yaml
vendored
Normal file
28
resource_customizations/projectcontour.io/HTTPProxy/testdata/parent_child.yaml
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
apiVersion: projectcontour.io/v1
|
||||
kind: HTTPProxy
|
||||
metadata:
|
||||
generation: 1
|
||||
name: basic
|
||||
spec:
|
||||
virtualhost:
|
||||
fqdn: foo-basic.bar.com
|
||||
includes:
|
||||
- name: unimportant
|
||||
status:
|
||||
conditions:
|
||||
- errors:
|
||||
- message: include unimportant not found
|
||||
reason: IncludeNotFound
|
||||
status: "True"
|
||||
type: IncludeError
|
||||
type: Valid
|
||||
status: "False"
|
||||
observedGeneration: 1
|
||||
lastTransitionTime: "2025-04-07T10:00:00Z"
|
||||
reason: ErrorPresent
|
||||
message: At least one error present, see Errors for details
|
||||
currentStatus: invalid
|
||||
description: At least one error present, see Errors for details
|
||||
loadBalancer:
|
||||
ingress:
|
||||
- hostname: www.example.com
|
||||
Loading…
Reference in a new issue