Skip to content

Conversation

@mvandenburgh
Copy link
Member

Adds some documentation for the cloud infrastructure, particularly Terraform and how Flux works.

- Pushes the requisite Flux manifests to the spack-infrastructure github repository (internally, via the Terraform github provider). This is done via a personal access token (PAT) associated with the `spackbot` github account that is stored in AWS Secrets Manager and dynamically retrieved by Terraform at runtime. See [here for an example commit](https://github.com/spack/spack-infrastructure/commit/dd42896897b7c0c0e3e2bca66ae58433fcf734fa).
- **Kubernetes**: Kubernetes yaml manifests for the EKS cluster
- For this we use the kubectl provider (https://registry.terraform.io/providers/alekc/kubectl/latest/docs) and the helm provider (https://registry.terraform.io/providers/hashicorp/helm/latest/docs).
- We try to use Flux/GitOps to manage the Kubernetes cluster (i.e., by committing k8s yaml manifests to `k8s/`) as much as possible, but sometimes it is cleaner to manage some manifests with the Terraform kubectl provider. This is true mainly for manifests that have to reference resources that are managed by Terraform. A concrete examples of this is using [the `kubectl_manifest` resource to deploy a `Secret` resource for RDS credentials](./modules/spack_aws_k8s/gitlab_db.tf), which enables us to reference the RDS credentials using Terraform interpolation instead of hardcoding them in a manifest.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link doesn't seem to resolve. It tries to open the repo on a branch called modules/spack_aws_k8s/gitlab_db.tf, instead of a file. Is that just because it's still a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants