Skip to content

Conversation

@emmanuelmathot
Copy link
Contributor

What I am changing

  • Added support for ConfigMap reference-based queryables configuration in addition to file-based queryables
  • Queryables can now be sourced from external ConfigMaps or chart files, or a combination of both
  • Added comprehensive test coverage at both the Helm unit test and integration test levels

How I did it

  • Modified charts/eoapi/templates/database/pgstacbootstrap/configmap.yaml to support both file-based and configMapRef queryables using a mandatory name field
  • Updated charts/eoapi/templates/database/pgstacbootstrap/job.yaml to properly mount queryables from both sources and generate appropriate pypgstac load-queryables commands
  • Enhanced charts/eoapi/values.yaml with clear documentation and examples for both configuration modes
  • Created charts/eoapi/tests/queryables_tests.yaml with 18 Helm unit tests covering all scenarios (file-based, configMapRef, mixed, optional parameters, edge cases)
  • Added test_stac_queryables() integration test in .github/workflows/tests/test_stac.py to validate the /queryables endpoint returns expected data
  • Updated scripts/test.sh to automatically run the queryables integration test as part of the test suite

How you can test it

Helm Unit Tests:

cd charts/eoapi
helm unittest -f 'tests/queryables_tests.yaml' .

Integration Test (requires deployed eoAPI):

./scripts/test.sh integration

Configuration Examples:

queryables:
  # File from the chart
  - name: "common-queryables.json"
    file: "initdb-data/queryables/test-queryables.json"
    indexFields: ["platform", "instruments"]
    deleteMissing: true
    
  # External ConfigMap reference
  - name: "custom-queryables.json"
    configMapRef:
      name: my-custom-queryables-configmap
      key: queryables.json
    indexFields: ["custom:field1"]
    collections: ["collection-1"]

Related Issues

@emmanuelmathot emmanuelmathot changed the title refactor: Remove unused STAC endpoint argument from integration tests feat: Added support for ConfigMap reference-based queryables configuration Nov 19, 2025
@emmanuelmathot
Copy link
Contributor Author

@pantierra My integration tests wont work because of a wrong stac_endpoint setup in the integration tests. Can you please help me find out?

@pantierra
Copy link
Contributor

Thanks for the PR! I would like to look into this after streamlining the test scripts #359.

@pantierra
Copy link
Contributor

I think the stac endpoint has been fixed with the refactoring of the testing scripts. I rebased this PR and fixed the tests. Please have a look @emmanuelmathot and maybe we want to discuss the json input vs. output.

@emmanuelmathot
Copy link
Contributor Author

Thank you very much @pantierra for the test adjustment. Indeed, there is no reason to test the id nor the title. The most important is to check each properties of the queryables.

@emmanuelmathot emmanuelmathot marked this pull request as ready for review November 23, 2025 21:50
@emmanuelmathot
Copy link
Contributor Author

@batpad with this PR we should be able to configure queryables from argocd for Monty.

@batpad
Copy link
Member

batpad commented Nov 24, 2025

@emmanuelmathot this looks super, thank you!

Just curious on the rationale to support mounting a JSON file as well as specifying a ConfigMap reference. Supporting both seems to add a bit of complexity and just curious what scenarios you imagine specifying a file would be better than a ConfigMap reference.

The ConfigMap reference to me seems clean and flexible, and am just double-checking that we do need to support multiple ways of doing this.

Of course, the PR looks great to me and seems perfect to try out on the Monty setup, ty!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants