Skip to content

Conversation

@agnish7
Copy link

@agnish7 agnish7 commented Jul 19, 2025

This PR adds a PostgREST service to the treetracker-query-api deployment to enable a read-only API endpoint for accessing tree data.

Changes:

  • New Kubernetes service and deployment configs for PostgREST (postgrest-service.yaml, postgrest-deployment.yaml, etc.)
  • Ingress configuration to expose the service at /query-postgrest.
  • Uses the same readonly DB credentials defined in the sealed secret
  • Integrated with existing kustomization and base deployment files

Testing:
Deployed on local dev cluster at http://localhost:8080/query-postgrest/trees
Confirmed /health route returns version
Confirmed /trees endpoint returns expected tree list using the PostgREST route

Goal:
Deploy to https://[env]-k8s.treetracker.org/query-postgrest for lightweight, readonly access to tree data via a standardized REST interface.

@agnish7 agnish7 force-pushed the add-postgrest-service branch from 62cf492 to 39d31fc Compare July 19, 2025 04:15
@agnish7
Copy link
Author

agnish7 commented Jul 19, 2025

@dadiorchen @dagmawig could you please review this PR? Thanks!

@@ -1,3 +1,4 @@
import exp from 'constants';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is irrelevant to your work right? Why you are uploading this? How do you folk the repo?

containers:
- name: treetracker-query-api
image: greenstand/treetracker-query-api:TAG
image: greenstand/treetracker-query-api:v1.2.3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you need to change this?
I thought you shouldn’t touch this existing deployment, you can create a new deployment for just postgrest service, right?

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