File tree Expand file tree Collapse file tree 6 files changed +122
-0
lines changed
resource_customizations/projectcontour.io/HTTPProxy Expand file tree Collapse file tree 6 files changed +122
-0
lines changed Original file line number Diff line number Diff line change 1+ -- Status reporting information detailed here
2+ -- https://projectcontour.io/docs/main/config/fundamentals/#status-reporting
3+ hs = {
4+ status = " Progressing" ,
5+ message = " Waiting for status" ,
6+ }
7+
8+ if obj .status ~= nil then
9+ if obj .status .currentStatus ~= nil then
10+ if obj .status .currentStatus == " valid" then
11+ hs .status = " Healthy"
12+ elseif obj .status .currentStatus == " invalid" then
13+ hs .status = " Degraded"
14+ end
15+ hs .message = obj .status .description
16+ end
17+ end
18+
19+ return hs
Original file line number Diff line number Diff line change 1+ tests :
2+ - healthStatus :
3+ status : Healthy
4+ message : " Valid HTTPProxy"
5+ inputPath : testdata/healthy.yaml
6+ - healthStatus :
7+ status : Progressing
8+ message : ' Waiting for status'
9+ inputPath : testdata/progressing.yaml
10+ - healthStatus :
11+ status : Progressing
12+ message : ' Waiting for controller'
13+ inputPath : testdata/not_reconciled.yaml
14+ - healthStatus :
15+ status : Degraded
16+ message : ' At least one error present, see Errors for details'
17+ inputPath : testdata/degraded.yaml
Original file line number Diff line number Diff line change 1+ apiVersion : projectcontour.io/v1
2+ kind : HTTPProxy
3+ metadata :
4+ name : basic
5+ spec :
6+ virtualhost :
7+ fqdn : foo-basic.bar.com
8+ routes :
9+ - conditions :
10+ - prefix : /
11+ services :
12+ - name : s1
13+ port : 80
14+ status :
15+ conditions :
16+ - errors :
17+ - message : ' Spec.Routes unresolved service reference: service "default/s1" not found'
18+ reason : ServiceUnresolvedReference
19+ status : " True"
20+ type : ServiceError
21+ lastTransitionTime : " 2025-04-07T10:00:00Z"
22+ message : ' At least one error present, see Errors for details'
23+ observedGeneration : 1
24+ reason : ErrorPresent
25+ status : " False"
26+ type : Valid
27+ currentStatus : invalid
28+ description : ' At least one error present, see Errors for details'
29+ loadBalancer :
30+ ingress :
31+ - hostname : abc-123.elb.us-east-1.amazonaws.com
Original file line number Diff line number Diff line change 1+ apiVersion : projectcontour.io/v1
2+ kind : HTTPProxy
3+ metadata :
4+ name : basic
5+ spec :
6+ virtualhost :
7+ fqdn : foo-basic.bar.com
8+ routes :
9+ - conditions :
10+ - prefix : /
11+ services :
12+ - name : s1
13+ port : 80
14+ status :
15+ conditions :
16+ - type : Valid
17+ status : " True"
18+ observedGeneration : 1
19+ lastTransitionTime : " 2025-04-07T10:00:00Z"
20+ reason : Valid
21+ message : Valid HTTPProxy
22+ currentStatus : valid
23+ description : Valid HTTPProxy
24+ loadBalancer :
25+ ingress :
26+ - hostname : www.example.com
Original file line number Diff line number Diff line change 1+ apiVersion : projectcontour.io/v1
2+ kind : HTTPProxy
3+ metadata :
4+ name : basic
5+ spec :
6+ virtualhost :
7+ fqdn : foo-basic.bar.com
8+ routes :
9+ - conditions :
10+ - prefix : /
11+ services :
12+ - name : s1
13+ port : 80
14+ status :
15+ currentStatus : NotReconciled
16+ description : Waiting for controller
Original file line number Diff line number Diff line change 1+ apiVersion : projectcontour.io/v1
2+ kind : HTTPProxy
3+ metadata :
4+ name : basic
5+ spec :
6+ virtualhost :
7+ fqdn : foo-basic.bar.com
8+ routes :
9+ - conditions :
10+ - prefix : /
11+ services :
12+ - name : s1
13+ port : 80
You can’t perform that action at this time.
0 commit comments