feat: Implement health checks for Service resources#41
Conversation
Add custom health check logic for Services in Argo CD.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||
There was a problem hiding this comment.
Pull Request Overview
This PR adds custom health check logic for Kubernetes Service resources in Argo CD. The implementation evaluates Service health based on the service type and configuration, specifically handling LoadBalancer services and services with external IPs.
Key Changes:
- Added Lua-based health check function for Service resources
- Implemented health status evaluation for LoadBalancer type services
- Added support for services with externalIPs configuration
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| hs.message = "Waiting for LoadBalancer to be provisioned" | ||
| end | ||
| else | ||
| hs.status = "Healthy" |
There was a problem hiding this comment.
Does this default to healthy?
User description
Add custom health check logic for Services in Argo CD.
PR Type
Enhancement
Description
Add custom health check logic for Kubernetes Service resources
Evaluate service exposure via externalIPs or LoadBalancer type
Return appropriate health status based on provisioning state
Support LoadBalancer ingress detection for health assessment
Diagram Walkthrough
flowchart LR A["Service Resource"] --> B{"Has externalIPs?"} B -->|Yes| C["Status: Healthy"] B -->|No| D{"Type: LoadBalancer?"} D -->|Yes| E{"Ingress provisioned?"} E -->|Yes| F["Status: Healthy"] E -->|No| G["Status: Progressing"] D -->|No| H["Status: Healthy"]File Walkthrough
argocd.yaml.tpl
Implement Service resource health check logicargocd.yaml.tpl
configuration
status