|
| 1 | +# Cluster Applications |
| 2 | + |
| 3 | +See [initial migration outline](../proposal.md) for main HOT OSM applications. |
| 4 | + |
| 5 | +Relevant Docs: |
| 6 | +- [kubectl] |
| 7 | +- [Helm] |
| 8 | + |
| 9 | +## Global |
| 10 | + |
| 11 | +### ClusterIssuer |
| 12 | + |
| 13 | +Issue TLS certificates for the cluster via [cert-manager]. See also [eoAPI TLS section](#transport-layer-security-tls). |
| 14 | + |
| 15 | +Install: |
| 16 | +```sh |
| 17 | +# ** See helm/eoapi-values.yaml for initial setup ** |
| 18 | +$ kubectl apply -f kubernetes/manifests/cluster-issuer.yaml |
| 19 | +``` |
| 20 | + |
| 21 | +## eoAPI |
| 22 | + |
| 23 | +Open source Earth Observation (EO) backend supporting Open Aerial Map (OAM). |
| 24 | + |
| 25 | +Site: https://eoapi.dev/ |
| 26 | +Chart: https://github.com/developmentseed/eoapi-k8s |
| 27 | + |
| 28 | +Install: |
| 29 | +```sh |
| 30 | +$ helm upgrade --install --set disable_check_for_upgrades=true pgo oci://registry.developers.crunchydata.com/crunchydata/pgo --version $PGO_VERSION |
| 31 | +$ helm repo add eoapi https://devseed.com/eoapi-k8s/ |
| 32 | +$ helm upgrade --install --namespace eoapi --create-namespace eoapi eoapi/eoapi \ |
| 33 | + --version $EOAPI_CHART_VERSION \ |
| 34 | + -f kubernetes/helm/eoapi-values.yaml \ |
| 35 | + --set previousVersion=$EOAPI_CHART_VERSION \ |
| 36 | + --set postgrescluster.metadata.annotations."eks\.amazonaws\.com/role-arn"=$S3_BACKUP_ROLE |
| 37 | +``` |
| 38 | + |
| 39 | +#### helmfile |
| 40 | + |
| 41 | +A basic [helmfile] has been added for GitHub Actions, but its recommended to use outside of CI workflows to maintain consistency. |
| 42 | + |
| 43 | +```sh |
| 44 | +$ helmfile apply |
| 45 | +``` |
| 46 | + |
| 47 | +Provided the values match, a similar workflow can be achieved with the Makefile commands if the additional install isn't desired. |
| 48 | + |
| 49 | +### Configuration |
| 50 | + |
| 51 | +See [eoAPI chart docs]. The following sections provide a basic outline of overlays, customizations, and considerations specific to HOT's initial implementation. |
| 52 | + |
| 53 | +#### Transport Layer Security (TLS) |
| 54 | + |
| 55 | +See [cert-manager docs] and [eoAPI guidance on cert-manager setup]. |
| 56 | + |
| 57 | +- Requires a domain controlled by HOT |
| 58 | +- Issuer manifests and chart settings have been made available to provision certificates using [ingress annotations] and Let's Encrypt/[ACME] |
| 59 | +- Recommend going through staging issuer first to avoid hitting rate limits |
| 60 | + |
| 61 | +#### Backups |
| 62 | + |
| 63 | +Enabled with default settings, see the [PostgresOperator docs] for further customization. |
| 64 | + |
| 65 | +Uses an [OIDC auth setup] to access S3, which requires propagating TF-managed information to K8s. |
| 66 | + |
| 67 | +> [!NOTE] |
| 68 | +> 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. |
| 69 | +
|
| 70 | +#### Monitoring / Observability / Autoscaling |
| 71 | + |
| 72 | +The eoAPI support chart adds Prometheus and Grafana tooling to enable systems analysis, visualization, and custom metrics for autoscaling. |
| 73 | + |
| 74 | +- [eoAPI support chart setup]: in-depth walkthrough |
| 75 | +- [eoAPI chart configuration]: set HPA behavior for services |
| 76 | +- [eoAPI support chart dependencies]: explore further customization, provider documentation |
| 77 | + |
| 78 | +_Currently set to install once TLS is enabled in eoAPI._ |
| 79 | + |
| 80 | +## Tips + Commands |
| 81 | + |
| 82 | +### Setup |
| 83 | + |
| 84 | +#### Local Context |
| 85 | + |
| 86 | +```sh |
| 87 | +$ aws eks update-kubeconfig --name <cluster_name> |
| 88 | +``` |
| 89 | + |
| 90 | +### Debugging |
| 91 | + |
| 92 | +CLI manual will be most helpful: |
| 93 | +```sh |
| 94 | +$ kubectl --help |
| 95 | +``` |
| 96 | + |
| 97 | +#### Examples |
| 98 | + |
| 99 | +Basic cluster overview: |
| 100 | +```sh |
| 101 | +$ kubectl get pod,svc,deploy -A |
| 102 | +``` |
| 103 | + |
| 104 | +Shell into default container on pod: |
| 105 | +```sh |
| 106 | +$ kubectl -n <ns> exec -it <pod> -- bash |
| 107 | +# $ |
| 108 | +``` |
| 109 | + |
| 110 | +Inspect ingress details: |
| 111 | +```sh |
| 112 | +$ kubectl -n <ns> describe ingress/<ingress> |
| 113 | +``` |
| 114 | + |
| 115 | +Redirect pod log output to file: |
| 116 | +```sh |
| 117 | +$ kubectl -n <ns> logs <pod> --all-containers=true >> file.log |
| 118 | +``` |
| 119 | + |
| 120 | +[kubectl]: |
| 121 | + https://kubernetes.io/docs/reference/kubectl/ |
| 122 | +[Helm]: |
| 123 | + https://helm.sh/docs/ |
| 124 | +[Let's Encrypt]: |
| 125 | + https://letsencrypt.org/ |
| 126 | +[cert-manager]: |
| 127 | + https://cert-manager.io/ |
| 128 | +[cert-manager docs]: |
| 129 | + https://cert-manager.io/docs/configuration/ |
| 130 | +[helmfile]: |
| 131 | + https://github.com/helmfile/helmfile |
| 132 | +[eoAPI chart docs]: |
| 133 | + https://github.com/developmentseed/eoapi-k8s/tree/975a26639fa3b8be7d3338220d6ea9c4470d8d15/docs |
| 134 | +[iframing]: |
| 135 | + https://developmentseed.slack.com/archives/C08B8L61QTT/p1747740182369159?thread_ts=1747314980.658339&cid=C08B8L61QTT |
| 136 | +[eoAPI guidance on cert-manager setup]: |
| 137 | + https://github.com/developmentseed/eoapi-k8s/blob/main/docs/unified-ingress.md#setting-up-tls-with-cert-manager |
| 138 | +[ingress annotations]: |
| 139 | + https://cert-manager.io/docs/usage/ingress/ |
| 140 | +[ACME]: |
| 141 | + https://cert-manager.io/docs/configuration/acme/ |
| 142 | +[PostgresOperator docs]: |
| 143 | + https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/backups-disaster-recovery/backups |
| 144 | +[OIDC auth setup]: |
| 145 | + https://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/backups-disaster-recovery/backups#using-an-aws-integrated-identity-provider-and-role |
| 146 | +[eoAPI support chart setup]: |
| 147 | + https://github.com/developmentseed/eoapi-k8s/blob/975a26639fa3b8be7d3338220d6ea9c4470d8d15/docs/autoscaling.md |
| 148 | +[eoAPI chart configuration]: |
| 149 | + https://github.com/developmentseed/eoapi-k8s/blob/975a26639fa3b8be7d3338220d6ea9c4470d8d15/docs/configuration.md |
| 150 | +[eoAPI support chart dependencies]: |
| 151 | + https://github.com/developmentseed/eoapi-k8s/blob/975a26639fa3b8be7d3338220d6ea9c4470d8d15/helm-chart/eoapi-support/Chart.yaml |
0 commit comments