Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions lfx_one/deploy-previews.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,61 @@ graph TB
8. **Deployment:** ArgoCD deploys the application with the PR-specific container image
9. **Access:** Preview available at `ui-pr-{number}.dev.v2.cluster.linuxfound.info`

## Values Override Mechanism

Deploy previews use ArgoCD's multi-source feature to layer Helm values
from multiple sources. The ApplicationSet
(`apps/dev/lfx-v2-ui-branch.yaml`) defines two sources that work
together to configure each `ui-pr-{number}` deployment.

### Values Hierarchy (lowest to highest priority)

1. **Chart defaults** (`charts/lfx-v2-ui/values.yaml` in the PR branch)
— The Helm chart's built-in defaults from the `lfx-v2-ui` repository.
Since the chart source is `pull/{number}/head`, developers can modify
chart defaults in their PR branch.

2. **Branch deployment values**
(`values/dev/lfx-v2-ui-branch.yaml` in `lfx-v2-argocd`) — Shared
configuration for all deploy previews including resource limits,
environment variables, and ingress settings. This file is referenced
via the `$values` multi-source reference.

3. **ApplicationSet parameters** (inline in
`apps/dev/lfx-v2-ui-branch.yaml`) — PR-specific overrides injected
by the ApplicationSet template using `{{.number}}` templating:
- `ingress.hosts[0].host` and `ingress.tls[0].hosts[0]` — sets the
preview domain to `ui-pr-{number}.dev.v2.cluster.linuxfound.info`
- `environment.PCC_BASE_URL.value` — sets the base URL for
authentication callbacks
- `image.tag` — pins the container image to `ui-pr-{number}`

Comment on lines +182 to +200
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use 2-space continuation indent in list items.

The continuation lines under the numbered items are indented with 3 spaces; repo docs standard requires 2 spaces.

Suggested fix
-1. **Chart defaults** (`charts/lfx-v2-ui/values.yaml` in the PR branch)
-   — The Helm chart's built-in defaults from the `lfx-v2-ui` repository.
-   Since the chart source is `pull/{number}/head`, developers can modify
-   chart defaults in their PR branch.
+1. **Chart defaults** (`charts/lfx-v2-ui/values.yaml` in the PR branch)
+  — The Helm chart's built-in defaults from the `lfx-v2-ui` repository.
+  Since the chart source is `pull/{number}/head`, developers can modify
+  chart defaults in their PR branch.
 
-2. **Branch deployment values**
-   (`values/dev/lfx-v2-ui-branch.yaml` in `lfx-v2-argocd`) — Shared
-   configuration for all deploy previews including resource limits,
-   environment variables, and ingress settings. This file is referenced
-   via the `$values` multi-source reference.
+2. **Branch deployment values**
+  (`values/dev/lfx-v2-ui-branch.yaml` in `lfx-v2-argocd`) — Shared
+  configuration for all deploy previews including resource limits,
+  environment variables, and ingress settings. This file is referenced
+  via the `$values` multi-source reference.
 
-3. **ApplicationSet parameters** (inline in
-   `apps/dev/lfx-v2-ui-branch.yaml`) — PR-specific overrides injected
-   by the ApplicationSet template using `{{.number}}` templating:
-   - `ingress.hosts[0].host` and `ingress.tls[0].hosts[0]` — sets the
-     preview domain to `ui-pr-{number}.dev.v2.cluster.linuxfound.info`
-   - `environment.PCC_BASE_URL.value` — sets the base URL for
-     authentication callbacks
-   - `image.tag` — pins the container image to `ui-pr-{number}`
+3. **ApplicationSet parameters** (inline in
+  `apps/dev/lfx-v2-ui-branch.yaml`) — PR-specific overrides injected
+  by the ApplicationSet template using `{{.number}}` templating:
+  - `ingress.hosts[0].host` and `ingress.tls[0].hosts[0]` — sets the
+    preview domain to `ui-pr-{number}.dev.v2.cluster.linuxfound.info`
+  - `environment.PCC_BASE_URL.value` — sets the base URL for
+    authentication callbacks
+  - `image.tag` — pins the container image to `ui-pr-{number}`

As per coding guidelines, "Indent lists with 2 spaces in Markdown".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lfx_one/deploy-previews.md` around lines 182 - 200, The Markdown list
continuation lines are indented with 3 spaces instead of the repo standard 2;
update the continuation lines under the numbered items so each wrapped line uses
2-space continuation indentation (e.g., under the "Branch deployment values
(`values/dev/lfx-v2-ui-branch.yaml`)" and "ApplicationSet parameters (inline in
`apps/dev/lfx-v2-ui-branch.yaml`)" bullets), ensuring all wrapped lines in those
list items are aligned with a 2-space indent to match repository guidelines.

### Branch Deployment Values

The `values/dev/lfx-v2-ui-branch.yaml` file in `lfx-v2-argocd`
configures deploy previews with reduced resources compared to the main
development environment:

- **Resources:** 100m/128Mi requests, 500m/512Mi limits
- **Scaling:** Single replica, autoscaling disabled
- **Environment:** Shared backend API endpoints, Auth0 dev tenant,
Snowflake analytics, LaunchDarkly feature flags, and Datadog RUM
- **Secrets:** Referenced from `pcc-secrets` (replicated from PCC
namespace via kubernetes-replicator)
- **Ingress:** Traefik with TLS via cert-manager and external-dns

### Modifying Deploy Preview Configuration

To change the shared configuration for **all** deploy previews, update
`values/dev/lfx-v2-ui-branch.yaml` in the `lfx-v2-argocd` repository.
Common modifications include adding new environment variables, adjusting
resource limits, or updating service endpoints.

To change configuration for a **single** deploy preview, modify the
chart's `values.yaml` in the PR branch of `lfx-v2-ui`. Note that values
from `lfx-v2-ui-branch.yaml` and ApplicationSet parameters take
precedence over chart defaults.
Comment on lines +224 to +225
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

The last paragraph refers to lfx-v2-ui-branch.yaml without its directory, while earlier sections consistently use the full path values/dev/lfx-v2-ui-branch.yaml. Using the full path here too would avoid ambiguity (especially since values.yaml is also referenced nearby).

Suggested change
from `lfx-v2-ui-branch.yaml` and ApplicationSet parameters take
precedence over chart defaults.
from `values/dev/lfx-v2-ui-branch.yaml` and ApplicationSet parameters
take precedence over chart defaults.

Copilot uses AI. Check for mistakes.

## Security Considerations

- All deploy previews use the same Auth0 tenant with wildcard configurations
Expand Down
Loading