-
Notifications
You must be signed in to change notification settings - Fork 12
Refactor Helm Chart to Service-Specific Templates #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Introduced a unified PostgreSQL configuration structure in values.yaml, replacing the old db configuration. - Added new helper functions for managing PostgreSQL environment variables and secrets based on the selected configuration type (postgrescluster, external-plaintext, external-secret). - Removed old database-related templates (ConfigMap, Deployment, PVC, Secrets, Service) that are no longer needed. - Updated the pgstacbootstrap job and configmap templates to align with the new PostgreSQL configuration. - Implemented validation for PostgreSQL settings to ensure required fields are set based on the selected type.
…ude DATABASE_URL for connection string
…he external secret (host, port, database) will override the corresponding values defined in external.host, external.port, and external.database.
Confirmed that the conditional blocks in deployment.yaml were already consolidated to eliminate redundancy. The file was already using a single include statement for PostgreSQL environment variables:
env:
{{- include "eoapi.postgresqlEnv" $ | nindent 12 }}
Removed the unused eoapi.mapLegacyPostgresql helper function from _helpers.tpl as it wasn't being referenced anywhere in the codebase.
…ik, streamline values.yaml, and update related documentation and tests
…ansformation annotations
…S support and remove deprecated middleware
|
need #219 to be merged |
…for raster, stac, vector, and multidim services; update deployment and configmap tests for backward compatibility; adjust ingress and HPA tests; clean up unused configurations in test.yaml.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the Helm chart structure into service-specific templates to enhance clarity, maintainability, and extensibility. Key changes include the introduction of dedicated service directories with their own templates, the creation of common helper functions, and updates to tests and documentation.
Reviewed Changes
Copilot reviewed 37 out of 46 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| helm-chart/eoapi/templates/services/raster/configmap.yaml | Added service-specific configmap for raster. |
| helm-chart/eoapi/templates/services/multidim/service.yaml | Introduced a dedicated service template for multidim. |
| helm-chart/eoapi/templates/services/multidim/hpa.yaml | Added HPA spec for multidim with autoscaling configuration. |
| helm-chart/eoapi/templates/services/multidim/deployment.yaml | New deployment template for multidim with common helpers integrated. |
| helm-chart/eoapi/templates/services/multidim/configmap.yaml | Added configmap template for multidim environment variables. |
| helm-chart/eoapi/templates/services/ingress.yaml | Updated ingress template with unified rules for multiple services. |
| helm-chart/eoapi/templates/services/doc-server.yaml | Refactored doc-server configmap naming and content. |
| helm-chart/eoapi/templates/services/README.md | Provided documentation for the new service-specific templates. |
| helm-chart/eoapi/templates/pgstacbootstrap/job.yaml | Modified hook-delete-policy for bootstrap jobs. |
| docs/unified-ingress.md | New documentation for the unified ingress configuration. |
| .github/workflows/helm-tests.yml | Updated test workflow script to reflect new endpoints and enhanced failure handling. |
Files not reviewed (9)
- helm-chart/eoapi/.helmignore: Language not supported
- helm-chart/eoapi/ingress.bkup: Language not supported
- helm-chart/eoapi/templates/_helpers.tpl: Language not supported
- helm-chart/eoapi/templates/services/_common.tpl: Language not supported
- helm-chart/eoapi/templates/services/configmap.yaml: Language not supported
- helm-chart/eoapi/templates/services/deployment.yaml: Language not supported
- helm-chart/eoapi/templates/services/hpa.yaml: Language not supported
- helm-chart/eoapi/templates/services/ingress-nginx.yaml: Language not supported
- helm-chart/eoapi/templates/services/ingress-traefik.yaml: Language not supported
Comments suppressed due to low confidence (3)
helm-chart/eoapi/templates/services/multidim/hpa.yaml:16
- The values key uses 'behaviour' (British spelling) while the output YAML key is 'behavior' (American spelling). Consider aligning the spelling to avoid potential confusion.
{{- with .Values.multidim.autoscaling.behaviour }}
helm-chart/eoapi/templates/pgstacbootstrap/job.yaml:32
- Removing the 'hook-succeeded' option from the hook-delete-policy might leave hook objects lingering. Verify that this change is intentional and that it won't lead to stale resources.
helm.sh/hook-delete-policy: "before-hook-creation"
.github/workflows/helm-tests.yml:208
- Appending to /etc/hosts requires elevated privileges; ensure the CI environment permits this change or consider an alternative approach to updating host entries during tests.
echo "$PUBLICIP_VALUE eoapi.local" | sudo tee -a /etc/hosts
…s for raster, stac, vector, and multidim services; enhance readability and maintainability.
Co-authored-by: Tarashish Mishra <sunu@users.noreply.github.com>
Co-authored-by: Tarashish Mishra <sunu@users.noreply.github.com>
Co-authored-by: Tarashish Mishra <sunu@users.noreply.github.com>
…ific ingress control - Added documentation for STAC Auth Proxy integration - Configured service-specific ingress settings in values.yaml - Updated ingress template to conditionally include STAC service paths - Provided deployment guide and network flow diagram - Included testing and troubleshooting sections for configuration verification
Co-authored-by: Tarashish Mishra <sunu@users.noreply.github.com>
sunu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
Overview
This PR refactors our Helm chart structure from a loop-based approach to service-specific templates. The primary goal is to improve readability, maintainability, and flexibility of our Kubernetes resource definitions.
Fixes #211
Changes Made
Service-Specific Directory Structure:
raster,stac,vector,multidim)deployment.yaml,service.yaml,configmap.yaml,hpa.yaml)Common Helper Functions:
_common.tplwith focused helper functions:eoapi.mountServiceSecrets- For mounting service secretseoapi.commonEnvVars- For common environment variableseoapi.pgstacInitContainers- For init containers that wait for pgstac jobsIntegration with Existing Helpers:
eoapi.postgresqlEnvhelper for database environment variablesUpdated Test Suites:
raster_tests.yaml,stac_tests.yaml, etc.)Documentation:
Backward Compatibility
This refactoring maintains full backward compatibility with existing values files and deployments. No changes to values.yaml structure were required, and the chart can be upgraded in-place without disruption.