|
| 1 | +# Unified Ingress Configuration |
| 2 | + |
| 3 | +This document describes the unified ingress approach implemented in the eoAPI Helm chart. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +As of version 0.7.0, eoAPI uses a consolidated, controller-agnostic ingress configuration. This approach: |
| 8 | + |
| 9 | +- Eliminates code duplication between different ingress controller implementations |
| 10 | +- Provides consistent behavior across controllers |
| 11 | +- Simplifies testing and maintainability |
| 12 | +- Removes artificial restrictions on using certain ingress controllers in specific environments |
| 13 | +- Makes it easier to add support for additional ingress controllers in the future |
| 14 | + |
| 15 | +## Configuration |
| 16 | + |
| 17 | +The ingress configuration has been streamlined and generalized in the `values.yaml` file: |
| 18 | + |
| 19 | +```yaml |
| 20 | +ingress: |
| 21 | + # Unified ingress configuration for both nginx and traefik |
| 22 | + enabled: true |
| 23 | + # ingressClassName: "nginx" or "traefik" |
| 24 | + className: "nginx" |
| 25 | + # Path configuration |
| 26 | + pathType: "Prefix" # Can be "Prefix" or "ImplementationSpecific" based on controller |
| 27 | + pathSuffix: "" # Add a suffix to service paths (e.g. "(/|$)(.*)" for nginx regex) |
| 28 | + rootPath: "" # Root path for doc server |
| 29 | + # Host configuration |
| 30 | + host: "" |
| 31 | + # Custom annotations to add to the ingress |
| 32 | + annotations: {} |
| 33 | + # TLS configuration |
| 34 | + tls: |
| 35 | + enabled: false |
| 36 | + secretName: eoapi-tls |
| 37 | + certManager: false |
| 38 | + certManagerIssuer: letsencrypt-prod |
| 39 | + certManagerEmail: "" |
| 40 | +``` |
| 41 | +
|
| 42 | +## Controller-Specific Configurations |
| 43 | +
|
| 44 | +### NGINX Ingress Controller |
| 45 | +
|
| 46 | +For NGINX, use the following configuration: |
| 47 | +
|
| 48 | +```yaml |
| 49 | +ingress: |
| 50 | + enabled: true |
| 51 | + className: "nginx" |
| 52 | + pathType: "Prefix" |
| 53 | + annotations: |
| 54 | + nginx.ingress.kubernetes.io/use-regex: "true" |
| 55 | + nginx.ingress.kubernetes.io/enable-cors: "true" |
| 56 | + nginx.ingress.kubernetes.io/enable-access-log: "true" |
| 57 | +``` |
| 58 | +
|
| 59 | +### Traefik Ingress Controller |
| 60 | +
|
| 61 | +When using Traefik, the system automatically includes the Traefik middleware to strip prefixes (e.g., `/stac`, `/raster`) from requests before forwarding them to services. This is handled by the `traefik-middleware.yaml` template. |
| 62 | + |
| 63 | +For basic Traefik configuration: |
| 64 | + |
| 65 | +```yaml |
| 66 | +ingress: |
| 67 | + enabled: true |
| 68 | + className: "traefik" |
| 69 | + pathType: "Prefix" |
| 70 | + # When using TLS, setting host is required to avoid "No domain found" warnings |
| 71 | + host: "example.domain.com" # Required to work properly with TLS |
| 72 | + annotations: |
| 73 | + traefik.ingress.kubernetes.io/router.entrypoints: web |
| 74 | +``` |
| 75 | + |
| 76 | +For Traefik with TLS: |
| 77 | + |
| 78 | +```yaml |
| 79 | +ingress: |
| 80 | + enabled: true |
| 81 | + className: "traefik" |
| 82 | + pathType: "Prefix" |
| 83 | + # Host is required when using TLS with Traefik |
| 84 | + host: "example.domain.com" |
| 85 | + annotations: |
| 86 | + traefik.ingress.kubernetes.io/router.entrypoints: websecure |
| 87 | + tls: |
| 88 | + enabled: true |
| 89 | + secretName: eoapi-tls |
| 90 | +``` |
| 91 | + |
| 92 | +## Migration |
| 93 | + |
| 94 | +If you're migrating from a version 0.6.0 or earlier, follow these guidelines: |
| 95 | + |
| 96 | +1. Update your values to use the new unified configuration |
| 97 | +2. Ensure your ingress controller-specific annotations are set correctly |
| 98 | +3. Set the appropriate `pathType` for your controller |
| 99 | +4. Test the configuration before deploying to production |
| 100 | + |
| 101 | +## Note for Traefik Users |
| 102 | + |
| 103 | +Traefik is now fully supported in all environments, including production. The previous restriction limiting Traefik to testing environments has been removed. |
| 104 | + |
| 105 | +## Document Server |
| 106 | + |
| 107 | +The document server implementation has also been unified. It now works with both NGINX and Traefik controllers using the same configuration. |
0 commit comments