Conversation
thenav56
left a comment
There was a problem hiding this comment.
Extra context related to changes
| annotations: | ||
| argocd.argoproj.io/hook: "PreSync" | ||
| argocd.argoproj.io/sync-wave: "-7" | ||
| argocd.argoproj.io/hook-delete-policy: "BeforeHookCreation" |
There was a problem hiding this comment.
Required for bootstrapper jobs: Used by job -pgstac-load-queryables: https://github.com/toggle-corp/eoapi-k8s/blob/feat/argocd-integration/charts/eoapi/templates/database/pgstacbootstrap/job.yaml
There was a problem hiding this comment.
Disabling using eoAPI chart config
pgstacBootstrap:
settings:
loadSamples: falseThere was a problem hiding this comment.
Using job from eoAPI chart
This was removed, need to confirm why
psql -f /opt/settings/pgstac-settings.sqlThere was a problem hiding this comment.
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.
There was a problem hiding this comment.
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

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.
There was a problem hiding this comment.
Using job from eoAPI chart
| kind: ConfigMap | ||
| metadata: | ||
| name: montandon-eoapi-stac-queryables | ||
| annotations: |
There was a problem hiding this comment.
Required by job -pgstac-load-queryables: https://github.com/toggle-corp/eoapi-k8s/blob/feat/argocd-integration/charts/eoapi/templates/database/pgstacbootstrap/job.yaml#L164-L174
| 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 |
There was a problem hiding this comment.
| 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 |
There was a problem hiding this comment.
Thanks for noticing this.
Depends on
Changes