application-research / autoretrieve

A server to make GraphSync data accessible on IPFS
22 stars 7 forks source link

Define application level manifests and dev deployment overlay #51

Closed masih closed 2 years ago

masih commented 2 years ago

Define the base K8S manifests along with placeholder for encrypted peer identity. Define an overlay for dev us-east-2 deployment to storetheindex cluster.

The Peer ID is randomly generated and encrypted using sops which is unencrypted on the fly at runtime by flux CD mechanism.

A service is defined to serve libp2p requests on port 6746. This service will use an AWS NLB with dns name autoretrieve.dev.cid.contact in the dev overlay.

Pods' /metrics HTTP endpoint is monitored over port 8080 and metrics are forwarded to storetheindex-dev Prometheus data source at PL grafana. Logs are also automatically forwarded and should be aviable at PL grafana provisioned Loki soruce, named grafanacloud-protocollabs-logs.

A CI job is introduced to automatically create a PR for any new images detected by flux CD. The automatic container image deployment flow is the following:

Note that the PR creation is engineered here on purpose to provide an approval process through which deployemt will happen when there is a new container release.

Changes to manifests located at deploy/manifests, however, will be automatically deployed upon merge to master.