Skip to content

chore(eoapi): staging configs cleanups#154

Draft
thenav56 wants to merge 3 commits intodevelopfrom
chore/eoapi-config-cleanup
Draft

chore(eoapi): staging configs cleanups#154
thenav56 wants to merge 3 commits intodevelopfrom
chore/eoapi-config-cleanup

Conversation

@thenav56
Copy link
Member

@thenav56 thenav56 commented Feb 4, 2026

Depends on

Changes

  • Remove custom jobs (Needs confirmation from team)
  • Use chart configs to load queryables
  • Disable pgstacBootstrap loadSamples using chart config
  • Add additional verbose
  • Add argocd hooks for custom resources

Copy link
Member Author

@thenav56 thenav56 left a comment

Choose a reason for hiding this comment

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

Extra context related to changes

Comment on lines +5 to +8
annotations:
argocd.argoproj.io/hook: "PreSync"
argocd.argoproj.io/sync-wave: "-7"
argocd.argoproj.io/hook-delete-policy: "BeforeHookCreation"
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Disabling using eoAPI chart config

pgstacBootstrap:
  settings:
    loadSamples: false

Copy link
Member Author

Choose a reason for hiding this comment

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

Using job from eoAPI chart

This was removed, need to confirm why

psql -f /opt/settings/pgstac-settings.sql

https://github.com/developmentseed/eoapi-k8s/blob/main/charts/eoapi/data/initdb/settings/pgstac-settings.sql.tpl

Choose a reason for hiding this comment

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

We’re relying on the eoAPI chart’s built-in migrate job instead of a custom one. The chart job (see job.yaml) does:

pypgstac pgready
pypgstac migrate
psql -f /opt/settings/pgstac-settings.sql

So we’re not dropping the settings step. The chart applies pgstac-settings.sql from its ConfigMap (generated from pgstac-settings.sql.tpl). Removing the custom migrate job is intentional so we don’t duplicate or diverge from the chart’s bootstrap flow.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes,

eoapi-pgstac-migrate uses the ConfigMap generated from pgstac-settings.sql.tpl to apply the settings.
https://github.com/developmentseed/eoapi-k8s/blob/main/charts/eoapi/templates/database/pgstacbootstrap/job.yaml#L64

However, in our custom override job, that command is not included.
https://github.com/IFRCGo/go-deploy/blob/develop/applications/argocd/staging/applications/montandon-eoapi/internal/pgstac-migrate-job.yaml#L27-L38

Since the Job name is the same as the one defined in the eoapi chart, the custom Job takes precedence and overrides the original Job. Which is why we have this warning in argocd
image

That is the only difference in the script compared to the original eoapi-pgstac-migrate job.
If removing the command was not intentional, we can revert to using the original job and avoid maintaining a custom one.

Copy link
Member Author

Choose a reason for hiding this comment

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

Using job from eoAPI chart

kind: ConfigMap
metadata:
name: montandon-eoapi-stac-queryables
annotations:
Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines 94 to 100
queryables:
- name: "stac_queryables.json"
indexFields: ["monty:hazard_codes","monty:country_codes","roles"]
deleteMissing: true
configMapRef:
name: montandon-eoapi-stac-queryables
key: stac_queryables.json

Choose a reason for hiding this comment

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

Suggested change
queryables:
- name: "stac_queryables.json"
indexFields: ["monty:hazard_codes","monty:country_codes","roles"]
deleteMissing: true
configMapRef:
name: montandon-eoapi-stac-queryables
key: stac_queryables.json
settings:
loadSamples: false
queryables:
- name: "stac_queryables.json"
indexFields: ["monty:hazard_codes","monty:country_codes","roles"]
deleteMissing: true
configMapRef:
name: montandon-eoapi-stac-queryables
key: stac_queryables.json

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for noticing this.

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.

2 participants