Skip to content

Implement HTTP Headers Support for Health Probes #172

@simple-container-forge

Description

@simple-container-forge

Implementation Request

Parent Issue: #168
Base Branch: simple-forge/issue-168-support-httpheaders-in-health-tb2lry

Description

Add httpHeaders field to health probe configuration to support custom HTTP headers in readiness, liveness, and startup probes. This involves adding new types, updating data structures, modifying the probe conversion logic, and ensuring backward compatibility.

Technical Notes

  • Maintain 100% backward compatibility - existing configs must work without changes
  • Follow existing code patterns in pkg/clouds/k8s/types.go and pkg/clouds/pulumi/kubernetes/deployment.go
  • Use omitempty JSON tags for new fields to preserve existing behavior
  • Add comprehensive unit tests for header conversion logic
  • Update JSON schemas for validation
  • Ensure proper pointer handling with Pulumi's sdk.String()

Files/Areas

  • pkg/clouds/k8s/types.go - Add HTTPHeader type and update ProbeHttpGet struct (lines ~110-113)
  • pkg/clouds/pulumi/kubernetes/deployment.go - Update toProbeArgs() function to convert headers (lines ~279-314)
  • docs/schemas/ - Update JSON schemas for probe configurations
  • pkg/clouds/k8s/types_test.go - Add unit tests for HTTPHeader validation

Acceptance Criteria

  • HTTPHeader type defined with Name and Value fields
  • ProbeHttpGet struct includes optional HTTPHeaders field with omitempty tag
  • toProbeArgs() function converts []HTTPHeader to corev1.HTTPHeaderArray
  • Headers are properly set on HTTPGetActionArgs when specified
  • All existing tests pass without modification (backward compatibility)
  • Unit tests added for header conversion logic including edge cases
  • Documentation includes YAML examples with httpHeaders
  • JSON schemas updated to validate httpHeaders structure
  • Code comments document the new fields with examples

Design Documentation

  • docs/design/2026-02-26/health-probe-http-headers/design.md

Notes

Design includes detailed data model changes, Kubernetes integration approach, validation rules, testing strategy, and comprehensive examples. The implementation is additive only - no breaking changes to existing APIs.

Priority: medium


This issue was automatically created by the Multi-Role Orchestration system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    devTriggers Simple Forge's Software Developer role to start working on the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions