-
Notifications
You must be signed in to change notification settings - Fork 8
Simplify PgSTAC Bootstrap Process #208
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 new SQL file for PgSTAC settings to improve maintainability. - Updated the PgSTAC bootstrap process to utilize Kubernetes jobs for database initialization and sample data loading. - Replaced custom Python script with the pypgstac migrate command for schema initialization. - Enhanced configuration structure for better clarity and control over sample data loading. - Deprecated the legacy environment variable approach in favor of a more structured settings approach.
…res in CI workflow
…ervice boot watch
…tions for enhanced privileges
…abase initialization
…ole and search_path
…n verification in pgstac bootstrap job
…tension registration and permission settings
…ntinuation on error
…g multiple pod retrieval methods
…p and job for improved flexibility
…ainer from pgstac-load-samples job
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.
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Files not reviewed (1)
- helm-chart/eoapi/initdb-data/settings/pgstac-settings.sql: Language not supported
Comments suppressed due to low confidence (2)
helm-chart/eoapi/templates/pgstacboostrap/job.yaml:25
- [nitpick] The file path and metadata refer to 'pgstacboostrap', which appears to be a misspelling. Consider renaming it to 'pgstacbootstrap' for consistency.
name: pgstacbootstrap
helm-chart/eoapi/templates/pgstacboostrap/configmap.yaml:9
- [nitpick] There is an inconsistency in the naming of configmaps (e.g., 'pgstac-settings-config', 'initdb-sql-config', and 'initdb-json-config') that could be confusing. Clarify and standardize these names to better reflect their purpose in the bootstrap process.
name: pgstac-settings-config-{{ $.Release.Name }}
@@ -0,0 +1,12 @@ | |||
-- Apply pgstac settings |
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.
@emmanuelmathot is there a reference for what this is doing exactly / what settings these are, etc? If these are settings, do we need to make them configurable in values
? Am guessing this is something just a bit silly to get things to work, but might be nice to have a comment with a link to what these settings are or so?
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.
Yes, the idea is to have them in the values. I actually want to have a proper mechanism via pypgstac cli with something like pypgstac load settings that may be used not only in this chart. PR to come in pgstac.
@emmanuelmathot left a small question around the SQL to update the |
Description
This PR streamlines the PgSTAC bootstrap process by leveraging standard tools, simplifying the configuration, and creating a more maintainable structure. It removes unnecessary complexity by utilizing the built-in pypgstac migrate command directly rather than through custom Python scripts.
Key Changes
1. Reorganized File Structure
initdb-data/settings/
: Contains PgSTAC configuration settingsinitdb-data/samples/
: Contains sample STAC data files that are loaded conditionally2. Simplified Bootstrap Process
pgstac-setup.py
) with direct use of the pypgstac migrate commandpgstac-migrate
): Always runs to set up schema and settingspgstac-load-samples
): Only runs when enabled3. Improved Configuration Options
pgstacBootstrap.settings.loadSamples
option to control sample data loading4. Updated Templates
5. Enhanced Documentation
Benefits
Testing
The changes have been tested to ensure:
Implementation Notes
All changes have been made with backward compatibility in mind. Users can continue to use existing configurations, but are encouraged to adopt the new structure for clarity and maintainability.