-
Notifications
You must be signed in to change notification settings - Fork 0
[LFXV2-1150] Add deploy preview values override docs #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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}` | ||||||||||
|
|
||||||||||
| ### 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
|
||||||||||
| 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. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
As per coding guidelines, "Indent lists with 2 spaces in Markdown".
🤖 Prompt for AI Agents