sillsdev / web-languageforge

Language Forge: Online Collaborative Dictionary Building on the Web and Phone.
https://languageforge.org
MIT License
44 stars 29 forks source link

use kustomize instead of sed for environment configuration #1785

Closed hahn-kev closed 8 months ago

hahn-kev commented 8 months ago

Fixes #1783

Description

refactored our k8s resources to use kustomize to simplify having different configs per environment

Checklist

to test this I used kubectl --context dallas-rke diff -k . in the staging folder (and similar for prod) to verify that nothing unexpected changes.

github-actions[bot] commented 8 months ago

Unit Test Results

362 tests   362 :heavy_check_mark:  12s :stopwatch:   37 suites      0 :zzz:     1 files        0 :x:

Results for commit 05c4242f.

rmunn commented 8 months ago

Still reading through this, but one comment I have is that you have commands like kubectl --context aws-rke in the Makefile. That's a good idea, but we'll need to add something to the README saying "You need to name your kubectl contexts by these names" or else people who have a different name in their .kubectl will have the command fail by default. And I'd also suggest changing the context names to something that includes "languageforge" or "lf" in it, because in my .kubectl I have the following:

- context:
    cluster: aws-rke
    namespace: languagedepot
    user: aws-rke
  name: languagedepot-rke
- context:
    cluster: aws-rke
    namespace: languageforge
    user: aws-rke
  name: languageforge-rke

I should actually rename those to something like language{forge,depot}-prod or {lf,ld}-prod but haven't gotten around to it. The point is that the kubectl context can carry a default namespace along with it, and I use that so I don't see languageforge pods when I'm deploying languagedepot, and vice versa.

hahn-kev commented 8 months ago

That's a good point about the context names. I'll update the readme.