-
Notifications
You must be signed in to change notification settings - Fork 5
build: install eoAPI chart #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
ccb55c5
fix cidr collision
aliziel 836d9d5
build: add helmfile, certificate issuer manifests, CI deploy
aliziel 7ce0525
build: add eoAPI support chart
aliziel e771def
build: add backend parameters, local vars to avoid accidental state cβ¦
aliziel 0640437
docs: overviews on initial implementation
aliziel 666a9f4
chore: add PR template
aliziel 9539b4a
fix: rm echo in tofu output cmd
aliziel 0e1303e
docs: misc formatting for readability
aliziel d24df79
build: update bucket name
aliziel f67c7b1
fix: remove conditional exec based on modified files
aliziel d53d075
build: add admin arns for cluster access, use variadic in second arg
aliziel 974d271
fix: use alternative email for certs https://github.com/hotosm/k8s-inβ¦
aliziel a21775a
feat: use STAC API container from OpenAerialMap (#19)
ceholden abd4803
build: rm access entries, add host to helm config, set certificate anβ¦
aliziel d1ba341
build: hold on support chart
aliziel 4f8e5ad
build: reset hostname deploy
aliziel 01ac20b
fix: override STAC API command and disable vector (TiPG) (#20)
ceholden 68970a4
build: rm label-pr workaround (fixed), reset hostname deploy
aliziel 99158c1
build: retry with Route 53 fixes + new subdomain
aliziel 3ddcda1
build: switch to prod ClusterIssuer, cleanup
aliziel 2215638
build: revert support chart condition
aliziel 5afd118
build: add cron manifests
aliziel 808dbaf
build: start on staging certs for support services
aliziel 6b21130
build: switch to prod issuer
aliziel dfcbdb4
build: ingress gate on prometheus
aliziel c38e0e2
build: pause crons
aliziel ce52162
build: replan with addtl admins
aliziel 27e5bdf
build: reapply addtl admins
aliziel dc900ae
build: diff revrt stac image
aliziel 526e6c5
build: revrt stac image
aliziel 5377c20
build: reset stac image
aliziel 388c527
build: swap stac image
aliziel ee6bb2e
build: reset stac image
aliziel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| ## What type of PR is this? (check all applicable) | ||
|
|
||
| - [ ] π Feature | ||
| - [ ] π Bug Fix | ||
| - [ ] π Documentation | ||
| - [ ] π§βπ» Refactor | ||
| - [ ] β Test | ||
| - [ ] π€ Build or CI | ||
| - [ ] β Other (please specify) | ||
|
|
||
| ## Related Issue | ||
|
|
||
| Example: Fixes #123 | ||
|
|
||
| ## Describe this PR | ||
|
|
||
| A brief description of how this solves the issue. | ||
|
|
||
| ## Screenshots | ||
|
|
||
| Please provide screenshots of the change. | ||
|
|
||
| ## Alternative Approaches Considered | ||
|
|
||
| Did you attempt any other approaches that are not documented in code? | ||
|
|
||
| ## Review Guide | ||
|
|
||
| Notes for the reviewer. How to test this change? | ||
|
|
||
| ## Checklist before requesting a review | ||
|
|
||
| - π Read the HOT Contributing Guide: <https://docs.hotosm.org/become-a-contributor/> | ||
| - π Read the HOT Code of Conduct: <https://docs.hotosm.org/code-of-conduct> | ||
| - π·ββοΈ Create small PRs. In most cases, this will be possible. | ||
| - β Provide tests for your changes. | ||
| - π Use descriptive commit messages. | ||
| - π Update any related documentation and include any relevant screenshots. | ||
| - π Does this PR introduce or change any environment variables? If so, make sure to specify this change in the description. | ||
|
|
||
| ## [optional] What gif best describes this PR or how it makes you feel? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,151 @@ | ||
| # Cluster Applications | ||
|
|
||
| See [initial migration outline](../proposal.md) for main HOT OSM applications. | ||
|
|
||
| Relevant Docs: | ||
| - [kubectl] | ||
| - [Helm] | ||
|
|
||
| ## Global | ||
|
|
||
| ### ClusterIssuer | ||
|
|
||
| Issue TLS certificates for the cluster via [cert-manager]. See also [eoAPI TLS section](#transport-layer-security-tls). | ||
|
|
||
| Install: | ||
| ```sh | ||
| # ** See helm/eoapi-values.yaml for initial setup ** | ||
| $ kubectl apply -f kubernetes/manifests/cluster-issuer.yaml | ||
| ``` | ||
|
|
||
| ## eoAPI | ||
|
|
||
| Open source Earth Observation (EO) backend supporting Open Aerial Map (OAM). | ||
|
|
||
| Site: https://eoapi.dev/ | ||
| Chart: https://github.com/developmentseed/eoapi-k8s | ||
|
|
||
| Install: | ||
| ```sh | ||
| $ helm upgrade --install --set disable_check_for_upgrades=true pgo oci://registry.developers.crunchydata.com/crunchydata/pgo --version $PGO_VERSION | ||
| $ helm repo add eoapi https://devseed.com/eoapi-k8s/ | ||
| $ helm upgrade --install --namespace eoapi --create-namespace eoapi eoapi/eoapi \ | ||
| --version $EOAPI_CHART_VERSION \ | ||
| -f kubernetes/helm/eoapi-values.yaml \ | ||
| --set previousVersion=$EOAPI_CHART_VERSION \ | ||
| --set postgrescluster.metadata.annotations."eks\.amazonaws\.com/role-arn"=$S3_BACKUP_ROLE | ||
| ``` | ||
|
|
||
| #### helmfile | ||
|
|
||
| A basic [helmfile] has been added for GitHub Actions, but its recommended to use outside of CI workflows to maintain consistency. | ||
|
|
||
| ```sh | ||
| $ helmfile apply | ||
| ``` | ||
|
|
||
| Provided the values match, a similar workflow can be achieved with the Makefile commands if the additional install isn't desired. | ||
|
|
||
| ### Configuration | ||
|
|
||
| See [eoAPI chart docs]. The following sections provide a basic outline of overlays, customizations, and considerations specific to HOT's initial implementation. | ||
|
|
||
| #### Transport Layer Security (TLS) | ||
|
|
||
| See [cert-manager docs] and [eoAPI guidance on cert-manager setup]. | ||
|
|
||
| - Requires a domain controlled by HOT | ||
| - Issuer manifests and chart settings have been made available to provision certificates using [ingress annotations] and Let's Encrypt/[ACME] | ||
| - Recommend going through staging issuer first to avoid hitting rate limits | ||
|
|
||
| #### Backups | ||
|
|
||
| Enabled with default settings, see the [PostgresOperator docs] for further customization. | ||
|
|
||
| Uses an [OIDC auth setup] to access S3, which requires propagating TF-managed information to K8s. | ||
|
|
||
| > [!NOTE] | ||
| > Further development to bridge and/or reorganize TF and K8s-provisioned resources may remove the need to set a `role-arn` annotation on each release. | ||
|
|
||
| #### Monitoring / Observability / Autoscaling | ||
|
|
||
| The eoAPI support chart adds Prometheus and Grafana tooling to enable systems analysis, visualization, and custom metrics for autoscaling. | ||
|
|
||
| - [eoAPI support chart setup]: in-depth walkthrough | ||
| - [eoAPI chart configuration]: set HPA behavior for services | ||
| - [eoAPI support chart dependencies]: explore further customization, provider documentation | ||
|
|
||
| _Currently set to install once TLS is enabled in eoAPI._ | ||
|
|
||
| ## Tips + Commands | ||
|
|
||
| ### Setup | ||
|
|
||
| #### Local Context | ||
|
|
||
| ```sh | ||
| $ aws eks update-kubeconfig --name <cluster_name> | ||
| ``` | ||
|
|
||
| ### Debugging | ||
|
|
||
| CLI manual will be most helpful: | ||
| ```sh | ||
| $ kubectl --help | ||
| ``` | ||
|
|
||
| #### Examples | ||
|
|
||
| Basic cluster overview: | ||
| ```sh | ||
| $ kubectl get pod,svc,deploy -A | ||
| ``` | ||
|
|
||
| Shell into default container on pod: | ||
| ```sh | ||
| $ kubectl -n <ns> exec -it <pod> -- bash | ||
| # $ | ||
| ``` | ||
|
|
||
| Inspect ingress details: | ||
| ```sh | ||
| $ kubectl -n <ns> describe ingress/<ingress> | ||
| ``` | ||
|
|
||
| Redirect pod log output to file: | ||
| ```sh | ||
| $ kubectl -n <ns> logs <pod> --all-containers=true >> file.log | ||
| ``` | ||
|
|
||
| [kubectl]: | ||
| https://kubernetes.io/docs/reference/kubectl/ | ||
| [Helm]: | ||
| https://helm.sh/docs/ | ||
| [Let's Encrypt]: | ||
| https://letsencrypt.org/ | ||
| [cert-manager]: | ||
| https://cert-manager.io/ | ||
| [cert-manager docs]: | ||
| https://cert-manager.io/docs/configuration/ | ||
| [helmfile]: | ||
| https://github.com/helmfile/helmfile | ||
| [eoAPI chart docs]: | ||
| https://github.com/developmentseed/eoapi-k8s/tree/975a26639fa3b8be7d3338220d6ea9c4470d8d15/docs | ||
| [iframing]: | ||
| https://developmentseed.slack.com/archives/C08B8L61QTT/p1747740182369159?thread_ts=1747314980.658339&cid=C08B8L61QTT | ||
| [eoAPI guidance on cert-manager setup]: | ||
| https://github.com/developmentseed/eoapi-k8s/blob/main/docs/unified-ingress.md#setting-up-tls-with-cert-manager | ||
| [ingress annotations]: | ||
| https://cert-manager.io/docs/usage/ingress/ | ||
| [ACME]: | ||
| https://cert-manager.io/docs/configuration/acme/ | ||
| [PostgresOperator docs]: | ||
| https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/backups-disaster-recovery/backups | ||
| [OIDC auth setup]: | ||
| https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/backups-disaster-recovery/backups#using-an-aws-integrated-identity-provider-and-role | ||
| [eoAPI support chart setup]: | ||
| https://github.com/developmentseed/eoapi-k8s/blob/975a26639fa3b8be7d3338220d6ea9c4470d8d15/docs/autoscaling.md | ||
| [eoAPI chart configuration]: | ||
| https://github.com/developmentseed/eoapi-k8s/blob/975a26639fa3b8be7d3338220d6ea9c4470d8d15/docs/configuration.md | ||
| [eoAPI support chart dependencies]: | ||
| https://github.com/developmentseed/eoapi-k8s/blob/975a26639fa3b8be7d3338220d6ea9c4470d8d15/helm-chart/eoapi-support/Chart.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| prometheus-adapter: | ||
| prometheus: | ||
| url: http://eoapi-support-prometheus-server.eoapi-support.svc.cluster.local | ||
|
|
||
| prometheus: | ||
| server: | ||
| service: | ||
| type: ClusterIP | ||
| annotations: { } | ||
| ingress: | ||
| annotations: | ||
| nginx.ingress.kubernetes.io/auth-type: basic | ||
| nginx.ingress.kubernetes.io/auth-secret: eoapi-support-prometheus | ||
| nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required' | ||
| nginx.ingress.kubernetes.io/enable-cors: "true" | ||
| nginx.ingress.kubernetes.io/enable-access-log: "true" | ||
| cert-manager.io/cluster-issuer: "letsencrypt-prod" | ||
| enabled: true | ||
| ingressClassName: nginx | ||
| hosts: | ||
| - metrics.k8s-prod.hotosm.org | ||
| tls: | ||
| - secretName: prometheus-server-tls | ||
| hosts: | ||
| - metrics.k8s-prod.hotosm.org | ||
| persistentVolume: | ||
| storageClass: gp2 | ||
|
|
||
| grafana: | ||
| service: | ||
| type: ClusterIP | ||
| annotations: { } | ||
| ingress: | ||
| annotations: | ||
| nginx.ingress.kubernetes.io/enable-cors: "true" | ||
| nginx.ingress.kubernetes.io/enable-access-log: "true" | ||
| cert-manager.io/cluster-issuer: "letsencrypt-prod" | ||
| enabled: true | ||
| ingressClassName: nginx | ||
| hosts: | ||
| - dashboard.k8s-prod.hotosm.org | ||
| tls: | ||
| - secretName: grafana-tls | ||
| hosts: | ||
| - dashboard.k8s-prod.hotosm.org | ||
| datasources: | ||
| datasources.yaml: | ||
| datasources: | ||
| - name: prometheus | ||
| orgId: 1 | ||
| type: prometheus | ||
| url: http://eoapi-support-prometheus-server.eoapi-support.svc.cluster.local | ||
| access: proxy | ||
| jsonData: | ||
| timeInterval: "5s" | ||
| isDefault: true | ||
| editable: true | ||
| version: 1 # This number should be increased when changes are made to update the datasource |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is useful to have for manual deploy π
I have been having a lot of success with a GitOps approach in my homelab - using ArgoCD to pull deployments from a public repo (rather than having to deploy everything manually, or via a CI/CD push). I think I can configure the same after this PR is merged @dakotabenjamin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And just as a heads up it might be even safer to do
helmfile applyfor manual as well. That'll include all of the params above, plus make sure the PostgresOperator CRDs are installed and Ready.