-
Notifications
You must be signed in to change notification settings - Fork 0
MAF-19265: feat(helm): add MinIO, Loki, and Vector dependencies to the MoAI Inference Framework #64
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
Open
seongsu-dev
wants to merge
21
commits into
main
Choose a base branch
from
MAF-19265_loki_vector
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+969
−58
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
599f067
MAF-19265: feat(helm): add MinIO, Loki, and Vector dependencies to th…
seongsu-dev a91acbc
MAF-19265: feat(website): Update package-lock.json and enhance prereq…
seongsu-dev 05cd757
MAF-19265: docs(AGENTS): expand agent self-improvement and design pri…
seongsu-dev 2581b86
MAF-19265: feat(deploy): Update Helm chart dependencies for MoAI Infe…
seongsu-dev 31ed7fd
MAF-19265: chore(deploy): replace bitnami minio chart with official m…
seongsu-dev afc58e9
MAF-19265: refactor(deploy): update service names for Loki and MinIO …
seongsu-dev 24669ac
MAF-19265: feat(deploy): Update MinIO configuration in values.yaml an…
seongsu-dev c310d61
MAF-19265: feat(docs): create AGENTS.md files for test and helm direc…
seongsu-dev 97427bf
MAF-19265: refactor(helm): improve helm-lint command to handle multip…
seongsu-dev 67bc88b
MAF-19265: chore(docs): update README.md for MinIO configuration and …
seongsu-dev 53aa0a8
MAF-19265: feat(deploy): enhance log collection configuration in Helm…
seongsu-dev 0eb18f0
MAF-19265: docs(log-collection): enhance log collection documentation…
seongsu-dev 43550ca
MAF-19265: docs(prerequisites): update YAML configuration examples fo…
seongsu-dev f36206b
MAF-19265: docs(prerequisites): clarify storage-class requirements in…
seongsu-dev f5081ca
MAF-19265: feat(website): Update AGENTS.md and log-collection.mdx for…
seongsu-dev 32fafb6
MAF-19265: docs(AGENTS, log-collection): standardize output formattin…
seongsu-dev 3e60b77
MAF-19265: docs(log-collection): update log query language references…
seongsu-dev dda854f
MAF-19265: docs(values.yaml, prerequisites, log-collection): update c…
seongsu-dev d600e5c
MAF-19265: chore(values.yaml, log-collection): streamline resource co…
seongsu-dev 877b1e5
MAF-19265: chore(README.md, values.yaml): simplify configuration opti…
seongsu-dev 4e7a4ab
MAF-19265: docs(log-collection): improve output formatting for comman…
seongsu-dev 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
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
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 |
|---|---|---|
| @@ -0,0 +1,130 @@ | ||
| # Helm Charts — Agent Rules | ||
|
|
||
| Rules specific to the `deploy/helm/` directory. General contribution guidelines are in the root [`AGENTS.md`](/AGENTS.md). | ||
|
|
||
| ## Design Principles | ||
|
|
||
| ### Minimum Necessary Complexity | ||
|
|
||
| - **Do not add configuration options, fields, or abstractions for hypothetical future use cases.** Only add what the current task concretely requires. | ||
| - Before introducing a new value field, ask: "Is there a real, current use case that cannot be handled without it?" If the answer is no, omit the field and handle the edge case through documentation instead. | ||
| - Example: when considering whether to add a `minio.externalHost` field to support cross-namespace MinIO, the right answer was to document that users can point `loki.storage.s3.endpoint` to the external host directly — no new field needed. | ||
|
|
||
| ### Documentation over Code for Edge Cases | ||
|
|
||
| - When a behavior difference only arises in a non-default, edge-case configuration, prefer documenting the workaround over adding a dedicated code path or configuration key. | ||
| - Reserve code changes for cases where the default path is broken or the workaround is genuinely error-prone. | ||
|
|
||
| ### Reject Designs Before They Are Built | ||
|
|
||
| - If an initial design is heading in the wrong direction (e.g., standalone prerequisites instead of sub-chart dependencies, `enabled: false` defaults, nested config instead of top-level sections), raise the issue and redesign before writing code. Retrofitting a wrong structure is always more costly. | ||
|
|
||
| ## Helm Chart Development | ||
|
|
||
| ### Sub-chart Integration | ||
|
|
||
| - **All infrastructure components belong as sub-chart dependencies** of `moai-inference-framework`. Do not design them as standalone prerequisites that users install separately. | ||
| - **Enablement convention**: Every sub-chart dependency must have both a `condition:` entry in `Chart.yaml` AND `enabled: true` in the default `values.yaml`. Setting `enabled: false` as the default breaks the "install everything in one chart" philosophy. Follow the same pattern as existing components (`keda`, `lws`, `odin`, etc.). | ||
|
|
||
| ```yaml | ||
| # Chart.yaml — always add condition: and use the official repository | ||
| - name: vector | ||
| version: 0.39.0 | ||
| repository: https://helm.vector.dev | ||
| condition: vector.enabled | ||
|
|
||
| # values.yaml — always default to true | ||
| vector: | ||
| enabled: true | ||
| ``` | ||
|
|
||
| - **Official repositories**: Always use the chart's official upstream repository, not a mirror. | ||
| - loki: `https://grafana.github.io/helm-charts` | ||
| - vector: `https://helm.vector.dev` | ||
| - minio: `https://charts.min.io` | ||
|
|
||
| ### Dynamic Service Name References | ||
|
|
||
| - **Do not use `fullnameOverride`** to fix service names. Instead, build references using `.Release.Name` so that names are always consistent with whatever release name the user chooses. | ||
|
|
||
| ```yaml | ||
| # templates/grafana/datasource-loki.yaml | ||
| url: http://{{ .Release.Name }}-loki-gateway.{{ include "common.names.namespace" . }}.svc.cluster.local | ||
|
|
||
| # templates/loki/credentials.yaml | ||
| BUCKET_HOST: {{ printf "%s-minio" .Release.Name | quote }} | ||
| ``` | ||
|
|
||
| - In sub-chart `customConfig` values rendered through `tpl`, use `{{ .Release.Name }}` directly — it is evaluated by the sub-chart's `tpl` call and resolves to the parent release name. | ||
|
|
||
| ```yaml | ||
| # values.yaml (vector customConfig) — .Release.Name evaluated by tpl | ||
| endpoint: "http://{{ .Release.Name }}-loki-gateway" | ||
| ``` | ||
|
|
||
| ### Separation of Concerns in values.yaml | ||
|
|
||
| - **Large infrastructure components must be top-level sections**, not nested under their consumers. For example, MinIO configuration belongs at `minio:`, not at `loki.minio:`. This allows MinIO to be independently enabled/disabled and reused by other components in the future. | ||
|
|
||
| ### MinIO Provisioning Pattern | ||
|
|
||
| - Use the `minio/minio` chart (`https://charts.min.io`), not the bitnami chart. | ||
| - Create buckets, users, and policies directly via the chart's top-level `buckets`, `users`, and `policies` fields (not under a `provisioning` key). | ||
| - Create a **dedicated user per consuming service** with a policy scoped to only its bucket — do not use root credentials for service-to-service access. | ||
|
|
||
| ```yaml | ||
| minio: | ||
| policies: | ||
| - name: loki | ||
| statements: | ||
| - resources: ["arn:aws:s3:::loki/*"] | ||
| effect: Allow | ||
| actions: ["s3:*"] | ||
| users: | ||
| - accessKey: loki | ||
| secretKey: "loki123!" | ||
| policy: loki | ||
| buckets: | ||
| - name: loki | ||
| ``` | ||
|
|
||
| - Templates that read MinIO credentials must reference the `users` array directly: | ||
|
|
||
| ```yaml | ||
| # credentials.yaml | ||
| stringData: | ||
| AWS_ACCESS_KEY_ID: {{ (index .Values.minio.users 0).accessKey | quote }} | ||
| AWS_SECRET_ACCESS_KEY: {{ (index .Values.minio.users 0).secretKey | quote }} | ||
| ``` | ||
|
|
||
| ### Helm `tpl` Passthrough — Vector Label Syntax | ||
|
|
||
| - The vector chart renders `customConfig` through Helm's `tpl` function (`{{ tpl (toYaml .Values.customConfig) . | indent 4 }}`). This means any `{{ }}` expression in `customConfig` is evaluated as a Go template at render time. | ||
| - To pass **Vector's own field-template syntax** (`{{ field }}`) through `tpl` without evaluation, use Go raw string literals: | ||
|
|
||
| ```yaml | ||
| # values.yaml — correct | ||
| labels: | ||
| namespace: "{{`{{ namespace }}`}}" | ||
|
|
||
| # values.yaml — WRONG: tpl evaluates {{ namespace }} as a Go template function | ||
| labels: | ||
| namespace: "{{ namespace }}" | ||
| ``` | ||
|
|
||
| - **Before using `customConfig` with any sub-chart, always verify whether the chart applies `tpl` to it** by running `helm pull <chart> --version <ver> --untar` and inspecting the ConfigMap template. | ||
|
|
||
| ### YAML Anchors | ||
|
|
||
| - **Do not use YAML anchors at the root level of `values.yaml`** (e.g., `_defaults: &defaults`). Helm treats unknown root-level keys as invalid and may emit warnings or errors. Instead, duplicate shared configuration explicitly for each component. | ||
|
|
||
| ### MIF Pod Label Keys | ||
|
|
||
| When filtering or labeling logs, metrics, or other signals by MIF-specific pod attributes, use these label keys: | ||
|
|
||
| | Concept | Label key | Example value | | ||
| | :---------------- | :--------------------------- | :------------------ | | ||
| | Pool | `mif.moreh.io/pool` | `heimdall` | | ||
| | Role | `mif.moreh.io/role` | `prefill`, `decode` | | ||
| | App name | `app.kubernetes.io/name` | `vllm` | | ||
| | Inference service | `app.kubernetes.io/instance` | `llama-3-2-1b` | |
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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| AGENTS.md |
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.