Skip to content

Add a Claude generated OVERVIEW.md file#17

Open
nicklathe wants to merge 1 commit into
mainfrom
nicklathe/add-overview
Open

Add a Claude generated OVERVIEW.md file#17
nicklathe wants to merge 1 commit into
mainfrom
nicklathe/add-overview

Conversation

@nicklathe

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Nick Lathe <nick.lathe@code.org>
Comment thread OVERVIEW.md
**Key UIs:**

- ArgoCD: https://argocd.k8s.code.org
- Kargo: https://kargo.k8s.code.org

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I encountered an error on google.com attempting to Single Sign On here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I got in successfully

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Image

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

works now! 😅

Comment thread OVERVIEW.md
| Deployment | Environment | RAILS_ENV | DNS | Notes |
|---|---|---|---|---|
| **staging** | staging | staging | studio.staging.k8s.code.org | Auto-promoted by Kargo |
| **test** | test | staging | — | Manual promote from staging |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why does test env use staging rails env?

@nicklathe nicklathe Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks like Claude hallucinated this. Test env uses test rails env, not staging https://github.com/code-dot-org/k8s-gitops/blob/main/apps/codeai/envTypes/test/deployment.patch.yaml#L11-L12

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Think that might be an error - the actual env has RAILS_ENV set to test: https://github.com/code-dot-org/k8s-gitops/blob/main/apps/codeai/envTypes/test.values.yaml

Comment thread OVERVIEW.md

Secrets follow a consistent pattern:

1. **Bootstrap**: secrets are created in AWS Secrets Manager by the OpenTofu `cluster-infra` module, prefixed with `k8s/tofu/<cluster>/`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Are secrets for an application defined in this repo or in the application's repo?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Secrets are handled by the External Secrets Operator, which pulls in secrets from AWS secrets manager. The secrets referenced here are the ones necessary for actually bootstrapping the cluster.

Comment thread OVERVIEW.md
- **mimic/** — A small replica of the real `apps/` tree structure. Use it to test ArgoCD behavior (app-of-apps recursion, ApplicationSet wrappers, Ingress) without affecting production. All resource names start with `mimic-`.
- **argo-trace-stress-test/** — A broader stress harness for `argo-trace` covering edge cases: broken workloads, finalizer stalls, Crossplane resources, hook Jobs.

When modifying `apps/app-of-apps/*`, make a parallel edit in `bootstrap/apptrees/mimic/apps/app-of-apps/*` to prevent bitrot.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is there a way to automatically enforce this? Like a commit/ci hook that errors if there is an edit of a file in one directory but not the other?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good question - I'm not sure how much we will need mimic long-term

Comment thread OVERVIEW.md
Comment on lines +73 to +74
| **staging** | staging | staging | studio.staging.k8s.code.org | Auto-promoted by Kargo |
| **test** | test | staging | — | Manual promote from staging |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

From a security perspective, I prefer non-production systems to use a different base domain name:
staging --> k8s.staging-code.org
test --> k8s.test-code.org

@sureshc

sureshc commented Jul 21, 2026

Copy link
Copy Markdown

high level thought ... I'm not sure we're ready to adopt this new infrastructure framework before the school year starts in 3-4 weeks. Could we start out with Solid Queue running as an ECS Service while we build out this infrastructure?

Comment thread OVERVIEW.md
Comment on lines +73 to +75
| **staging** | staging | staging | studio.staging.k8s.code.org | Auto-promoted by Kargo |
| **test** | test | staging | — | Manual promote from staging |
| **production** | production | production | studio.production.k8s.code.org | Manual promote from test |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Opportunity to clean up the TLD?

Comment thread OVERVIEW.md
Values are layered (later overrides earlier):

1. **Base chart** — from `code-dot-org/code-dot-org` repo at `k8s/helm`
2. **Environment type** — `apps/codeai/envTypes/<envType>.values.yaml` (sets `RAILS_ENV`, health checks, scheduling, autoscaling defaults)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Opportunity to rename test? (Although we don't need to if we don't want to couple it)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

will migrating to k8s make it any easier to change the name later?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Possibly, we can do it later too as long as we design it so that an environment can be rebuilt from scratch.

Comment thread OVERVIEW.md

Kargo handles progressive delivery of new container images through environments.

### How it works

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It is unclear how images are built and how it flows into Argo. Depending on the direction, we will probably need a patcher which adds a "private" layer to the open source image for security hot fixes.

Comment thread OVERVIEW.md
cd bootstrap/codeai-k8s/cluster
tofu init && AWS_PROFILE=codeorg-admin tofu apply
```
Creates the EKS Auto Mode cluster, VPC, subnets, NAT gateways, security groups, KMS key, and OIDC provider.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What networking provider are we choosing here? AWS defaults? Or are we interested in something like Cillium and establishing defense-in-depth? Might be worth looking into if we're starting a new cluster.

That may be a way to address @cat5inthecradle concern of "do we want all k8's application environments in the same cluster" - we can namespace the environments and Cilllium can firewall them (if we choose a single cluster). Caveat being that AWS may provide the same functionality that Cillium does, but I do know optionality may be something to look at

Comment thread OVERVIEW.md

### Log files

When `log-cluster-events` is running, it writes three logs:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Send to Cloudwatch instead perhaps?

Comment thread OVERVIEW.md
Automatic — Kargo promotes new images from the warehouse to staging as soon as they appear.

### Promote an image from staging to test (or test to production)
Use the [Kargo UI](https://kargo.k8s.code.org) to manually promote freight between stages.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What would it take to automate? UI Tests?

Comment thread OVERVIEW.md
3. Merge to `main`

### Bump an app Helm chart
When modifying an app's Helm chart under `apps/`, always bump the `version:` field in its `Chart.yaml` so ArgoCD detects the change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we automate this or make it reconcile based on an image being published on GHCR?

Comment thread OVERVIEW.md
```
Creates secrets in AWS Secrets Manager, IAM roles, and generates `apps/infra/codeai-cluster-config.values.yaml` (cluster facts consumed by Helm charts).

First-time bootstrap requires setting `dex_google_client_secret`, `kargo_k8s_gitops_repo_username`, and `kargo_k8s_gitops_repo_password` in `terraform.tfvars`. Remove secrets from tfvars after the first apply.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The reliance on "remove secrets from tfvars after the first apply" may unintentionally result in secrets leakage in PR.

@sureshc

sureshc commented Jul 21, 2026

Copy link
Copy Markdown

Do we need to reproduce the staging --> test --> production pipeline that the monorepo uses? Could we just treat the test branch on the monorepo as main?

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.

7 participants