Skip to content

feat: Add Traefik option for ingress values.yaml; Add condition for t…#131

Merged
dantech2000 merged 2 commits into
mainfrom
CCINFRA-12482
Mar 17, 2026
Merged

feat: Add Traefik option for ingress values.yaml; Add condition for t…#131
dantech2000 merged 2 commits into
mainfrom
CCINFRA-12482

Conversation

@dantech2000
Copy link
Copy Markdown
Contributor

Summary

This PR adds optional Traefik ingress controller support to the generic service Helm chart while maintaining full backward compatibility with the existing nginx-nlb ingress configuration.

Changes

  1. templates/ingress.yaml- Added conditional rendering based on ingress.class:

    • Uses spec.ingressClassName field for Traefik (vs annotation for nginx-nlb)
    • Uses Prefix pathType for Traefik (vs ImplementationSpecific for nginx-nlb)
    • Uses numeric port 80 for Traefik (vs named port http for nginx-nlb)
  2. values.yaml - Added new configuration options:

    • ingress.class: Choose ingress controller (nginx-nlb or traefik)
    • ingress.traefik: Traefik-specific settings (annotations, ingressClassName)
    • ci/traefik-ingress-values.yaml - Added CI test configuration

Usage

Default (nginx-nlb) - unchanged:


ingress:
  enabled: true
  hosts:
    - host: myapp.codecademy.com
      paths: ['/']
      

Opt-in to Traefik:

ingress:
  enabled: true
  class: traefik
  hosts:
    - host: myapp.codecademy.com
      paths: ['/']
  traefik:
    annotations:
      traefik.ingress.kubernetes.io/router.middlewares: my-middleware@kubernetescrd

Backward Compatibility

  • Existing configurations continue to work without changes
  • Default remains nginx-nlb when ingress.class is not specified
  • No breaking changes to existing deployments

Testing

  • helm lint passes
  • Template rendering verified for both nginx-nlb and Traefik modes

@dantech2000 dantech2000 requested a review from a team March 17, 2026 00:16
@dantech2000 dantech2000 self-assigned this Mar 17, 2026
@dantech2000 dantech2000 added the enhancement New feature or request label Mar 17, 2026
@dantech2000 dantech2000 merged commit 65ecdd7 into main Mar 17, 2026
1 check passed
@dantech2000 dantech2000 deleted the CCINFRA-12482 branch March 17, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants