docs(openshift): add openshift installation guide - #765
Conversation
✅ Deploy Preview for project-hami ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: FouoF The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe pull request adds an OpenShift installation guide and sidebar entry. It also updates English and Chinese AMD GPU sharing guides with released chart installation steps, registration checks, glibc requirements, and troubleshooting details. ChangesGPU deployment documentation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Jifei Wang <jifei.wang@dynamia.ai>
39ddbf9 to
06a4a39
Compare
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/installation/openshift-installation.md`:
- Around line 204-211: Update the SELinux verification command in
docs/installation/openshift-installation.md:204-211 to include /tmp/vgpulock
alongside the existing shared directories. Apply the same command update in
i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md:204-211
so both localized installation documents verify all HAMi shared directories.
- Around line 63-65: Align the OpenShift Service port documentation in
docs/installation/openshift-installation.md:63-65 and
i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md:63-65
with the chart’s scheduler listener and ConfigMap URL by documenting
httpTargetPort as 443, unless the chart is simultaneously updated to support
9443 end to end. Apply the same correction consistently in both guides.
- Around line 160-166: Update the driver-root mount statements in
docs/installation/openshift-installation.md:160-166 and
i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md:160-166
to state that /run/nvidia/driver is mounted read-only at /driver-root only in
device-plugin; explicitly remove the claim that vgpu-monitor has a corresponding
mount.
- Around line 47-58: Update the OpenShift configuration sections at
docs/installation/openshift-installation.md:47-58 and
i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md:47-58
to remove unsupported securityContextConstraints and SELinux Helm values; either
document a chart version that supports and renders these resources with the
release pinned, or describe the required OpenShift resources separately in both
guides.
In `@docs/userguide/amd-device/enable-amd-gpu-sharing.md`:
- Around line 128-129: Pin the ROCm workload image to a tested immutable version
tag or digest instead of rocm/pytorch:latest, ensuring it satisfies the
documented GLIBC_2.34 and ROCm requirements. Apply the same image pin in both
language versions: docs/userguide/amd-device/enable-amd-gpu-sharing.md lines
128-129 and
i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/enable-amd-gpu-sharing.md
lines 129-130.
- Around line 76-83: Update the Helm install examples in
docs/userguide/amd-device/enable-amd-gpu-sharing.md (lines 76-83) and
i18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/enable-amd-gpu-sharing.md
(lines 77-84) to include --set node_selector_enabled=true, and document that AMD
nodes must have the required labels or an explicit selector/affinity configured.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: c9b95312-3b1a-4aec-ba45-7b2df53de51a
📒 Files selected for processing (5)
docs/installation/openshift-installation.mddocs/userguide/amd-device/enable-amd-gpu-sharing.mdi18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.mdi18n/zh/docusaurus-plugin-content-docs/current/userguide/amd-device/enable-amd-gpu-sharing.mdsidebars.js
| platform: | ||
| openshift: true | ||
|
|
||
| openshift: | ||
| securityContextConstraints: | ||
| create: true | ||
| name: hami-device-plugin | ||
|
|
||
| selinux: | ||
| enabled: true | ||
| type: container_file_t | ||
| level: s0 |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- relevant files ---'
git ls-files | rg '(^|/)(openshift-installation\.md|values\.yaml|templates/.*scc|templates/.*selinux|Chart\.yaml)$' | head -200
printf '%s\n' '--- English guide ---'
sed -n '35,105p' docs/installation/openshift-installation.md
sed -n '145,220p' docs/installation/openshift-installation.md
printf '%s\n' '--- Chinese guide ---'
sed -n '35,105p' i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md
sed -n '145,220p' i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md
printf '%s\n' '--- chart references ---'
rg -n --glob 'values.yaml' --glob 'Chart.yaml' --glob '*.tpl' --glob '*.yaml' \
'securityContextConstraints|selinux|driverRoot|openshift|hami-device-plugin|container_file_t' .Repository: Project-HAMi/website
Length of output: 5684
🏁 Script executed:
#!/bin/bash
set -eu
base='https://raw.githubusercontent.com/Project-HAMi/HAMi/master/charts/hami'
printf '%s\n' '--- upstream values.yaml ---'
curl -fsSL "$base/values.yaml" |
rg -n -C 5 'platform:|openshift:|securityContextConstraints|selinux:|nvidiaDriverRoot|runtimeClassName|httpPort|httpTargetPort'
printf '%s\n' '--- upstream chart metadata ---'
curl -fsSL "$base/Chart.yaml" |
rg -n '^(apiVersion|name|version|appVersion):'
printf '%s\n' '--- upstream template paths ---'
curl -fsSL 'https://api.github.com/repos/Project-HAMi/HAMi/contents/charts/hami/templates' |
jq -r '.[].name' |
rg -i 'scc|selinux|security|scheduler|device'
printf '%s\n' '--- published chart index ---'
curl -fsSL 'https://project-hami.github.io/HAMi/index.yaml' |
sed -n '1,100p'Repository: Project-HAMi/website
Length of output: 2453
🏁 Script executed:
#!/bin/bash
set -u
index_url='https://project-hami.github.io/HAMi/index.yaml'
index="$(curl -fsSL "$index_url")" || {
echo 'index fetch failed'
exit 1
}
printf '%s\n' '--- chart index entries ---'
printf '%s\n' "$index" | rg -n -m 20 '^( - version:| urls:| - )'
url="$(printf '%s\n' "$index" | awk '
/^ - version:/ { if (!seen++) keep=1; else keep=0 }
keep && /^ - / { sub(/^ - /, ""); print; exit }
')"
case "$url" in
http*) ;;
*) url="https://project-hami.github.io/HAMi/$url" ;;
esac
printf '%s\n' "--- selected package: $url ---"
printf '%s\n' '--- package file list ---'
curl -fsSL "$url" | tar -tzf - | rg '(^|/)(values.yaml|Chart.yaml|templates/)' | head -200
printf '%s\n' '--- packaged values ---'
curl -fsSL "$url" |
tar -xzO --wildcards '*/values.yaml' |
rg -n -C 4 'platform:|openshift:|securityContextConstraints|selinux:|nvidiaDriverRoot|runtimeClassName|httpPort|httpTargetPort'Repository: Project-HAMi/website
Length of output: 509
🏁 Script executed:
#!/bin/bash
set -u
printf '%s\n' '--- chart index header ---'
curl -fsSL 'https://project-hami.github.io/HAMi/index.yaml' | sed -n '1,80p'
archive='/tmp/hami-master.tar.gz'
curl -fsSL 'https://codeload.github.com/Project-HAMi/HAMi/tar.gz/refs/heads/master' -o "$archive"
printf '%s\n' '--- upstream chart files ---'
tar -tzf "$archive" |
rg '/charts/hami/(Chart.yaml|values.yaml|templates/)' |
head -250
printf '%s\n' '--- upstream chart metadata ---'
tar -xOzf "$archive" --wildcards '*/charts/hami/Chart.yaml' |
rg -n '^(apiVersion|name|version|appVersion):'
printf '%s\n' '--- upstream chart values ---'
tar -xOzf "$archive" --wildcards '*/charts/hami/values.yaml' |
rg -n -C 5 'platform:|openshift:|securityContextConstraints|selinux:|nvidiaDriverRoot|runtimeClassName|httpPort|httpTargetPort'Repository: Project-HAMi/website
Length of output: 7060
🏁 Script executed:
#!/bin/bash
set -eu
python3 - <<'PY'
import io
import re
import tarfile
import urllib.request
index_url = "https://project-hami.github.io/HAMi/index.yaml"
index = urllib.request.urlopen(index_url).read().decode()
urls = re.findall(r'^\s+- (https?://\S+\.tgz)$', index, re.MULTILINE)
keys = (
"platform",
"openshift",
"securityContextConstraints",
"selinux",
"container_file_t",
"SecurityContextConstraints",
)
print(f"published chart archives: {len(urls)}")
for url in urls:
version = re.search(r"hami-([^/]+)\.tgz$", url).group(1)
try:
data = urllib.request.urlopen(url).read()
with tarfile.open(fileobj=io.BytesIO(data), mode="r:gz") as archive:
files = {}
for member in archive.getmembers():
if member.isfile() and (
member.name.endswith("/values.yaml")
or "/templates/" in member.name
):
files[member.name] = archive.extractfile(member).read().decode(
errors="replace"
)
matches = {
key: [
name for name, text in files.items() if key in text
]
for key in keys
}
supported = {key: names for key, names in matches.items() if names}
print(f"{version}: {supported or 'no documented OpenShift/SELinux keys/resources'}")
except Exception as exc:
print(f"{version}: ERROR {exc}")
PYRepository: Project-HAMi/website
Length of output: 2444
🏁 Script executed:
#!/bin/bash
set -eu
python3 - <<'PY'
import io
import re
import tarfile
import urllib.request
index_url = "https://project-hami.github.io/HAMi/index.yaml"
index = urllib.request.urlopen(index_url).read().decode()
urls = re.findall(r'^\s+- (https?://\S+\.tgz)$', index, re.MULTILINE)
keys = (
"platform",
"openshift",
"securityContextConstraints",
"selinux",
"container_file_t",
"SecurityContextConstraints",
)
print(f"published chart archives: {len(urls)}")
for url in urls:
version = re.search(r"hami-([^/]+)\.tgz$", url).group(1)
try:
data = urllib.request.urlopen(url).read()
with tarfile.open(fileobj=io.BytesIO(data), mode="r:gz") as archive:
files = {}
for member in archive.getmembers():
if member.isfile() and (
member.name.endswith("/values.yaml")
or "/templates/" in member.name
):
files[member.name] = archive.extractfile(member).read().decode(
errors="replace"
)
matches = {
key: [
name for name, text in files.items() if key in text
]
for key in keys
}
supported = {key: names for key, names in matches.items() if names}
print(f"{version}: {supported or 'no documented OpenShift/SELinux keys/resources'}")
except Exception as exc:
print(f"{version}: ERROR {exc}")
PYRepository: Project-HAMi/website
Length of output: 2444
🏁 Script executed:
#!/bin/bash
set -u
tmp_index=/tmp/hami-index.yaml
curl -k -fsSL 'https://project-hami.github.io/HAMi/index.yaml' -o "$tmp_index"
urls="$(
rg -o 'https?://[^[:space:]]+/hami-[^[:space:]]+\.tgz' "$tmp_index" |
sort -u
)"
printf '%s\n' "--- published archives: $(printf '%s\n' "$urls" | sed '/^$/d' | wc -l) ---"
while IFS= read -r url; do
[ -n "$url" ] || continue
version="${url##*/hami-}"
version="${version%.tgz}"
archive="/tmp/hami-${version}.tgz"
curl -k -fsSL "$url" -o "$archive"
matches="$(
tar -xOzf "$archive" --wildcards '*/values.yaml' '*/templates/*' 2>/dev/null |
rg -n 'platform:|openshift:|securityContextConstraints|selinux:|container_file_t|SecurityContextConstraints' ||
true
)"
if [ -n "$matches" ]; then
printf '%s: MATCH\n%s\n' "$version" "$matches"
else
printf '%s: no OpenShift/SELinux keys or resources\n' "$version"
fi
done <<EOF
$urls
EOFRepository: Project-HAMi/website
Length of output: 833
Do not document unsupported Helm values
Chart versions 2.4.0 through 2.9.0 do not define these values or render SCC and SELinux resources. Helm therefore ignores this configuration.
Update both guides at #L47-L58. Add chart support and pin that release, or document the required OpenShift resources separately.
📍 Affects 2 files
docs/installation/openshift-installation.md#L47-L58(this comment)i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md#L47-L58
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/installation/openshift-installation.md` around lines 47 - 58, Update the
OpenShift configuration sections at
docs/installation/openshift-installation.md:47-58 and
i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md:47-58
to remove unsupported securityContextConstraints and SELinux Helm values; either
document a chart version that supports and renders these resources with the
release pinned, or describe the required OpenShift resources separately in both
guides.
Source: MCP tools
| service: | ||
| httpPort: 443 | ||
| httpTargetPort: 9443 |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- candidate files ---'
git ls-files | rg '(^|/)(docs/installation/openshift-installation\.md|i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation\.md|charts/hami/.*scheduler.*|charts/hami/.*values.*)$' || true
printf '%s\n' '--- English guide relevant sections ---'
sed -n '40,75p;150,175p;195,220p' docs/installation/openshift-installation.md
printf '%s\n' '--- Chinese guide relevant sections ---'
sed -n '40,75p;150,175p;195,220p' i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md
printf '%s\n' '--- chart scheduler references ---'
rg -n -S 'bind|targetPort|containerPort|scheduler.*port|httpPort|httpTargetPort|9443|scheduler.*url|scheduler.*URL' charts/hami charts 2>/dev/null | head -250
printf '%s\n' '--- chart tree ---'
git ls-files charts/hami | head -200Repository: Project-HAMi/website
Length of output: 3611
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- repository references to the chart and scheduler ports ---'
rg -n -S 'hami-charts/hami|scheduler extender|httpTargetPort|httpPort|9443|scheduler.*bind|bind.*port|scheduler.*url|scheduler.*URL' . \
-g '!node_modules' -g '!build' -g '!dist' | head -300
printf '%s\n' '--- guide headings and links ---'
rg -n -S 'helm|chart|scheduler|Service|service|9443|443|GitHub|github' \
docs/installation/openshift-installation.md \
i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md
printf '%s\n' '--- upstream chart repository metadata (read-only remote queries) ---'
for url in \
'https://raw.githubusercontent.com/Project-HAMi/HAMi/master/charts/hami/values.yaml' \
'https://raw.githubusercontent.com/Project-HAMi/HAMi/master/charts/hami/templates/scheduler/deployment.yaml' \
'https://raw.githubusercontent.com/Project-HAMi/HAMi/master/charts/hami/templates/scheduler/service.yaml' \
'https://raw.githubusercontent.com/Project-HAMi/HAMi/master/charts/hami/templates/scheduler/configmap.yaml'
do
printf '\n--- %s ---\n' "$url"
curl -L --fail --silent --show-error "$url" | \
rg -n -C 4 '9443|httpPort|httpTargetPort|containerPort|bind|url|URL|scheduler' | head -160 || true
doneRepository: Project-HAMi/website
Length of output: 50376
🏁 Script executed:
#!/bin/bash
set -eu
log=/tmp/coderabbit-shell-logs/shell-output-WySvM9
printf '%s\n' '--- upstream query sections from the prior result ---'
rg -n -C 2 '^--- https://raw.githubusercontent.com/Project-HAMi/HAMi/master/charts/hami' "$log" || true
printf '%s\n' '--- exact guide context around the port contract ---'
sed -n '108,130p' docs/installation/openshift-installation.md
sed -n '108,130p' i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md
printf '%s\n' '--- current upstream chart files, reduced to relevant keys ---'
for file in values.yaml templates/scheduler/deployment.yaml templates/scheduler/service.yaml templates/scheduler/configmap.yaml; do
url="https://raw.githubusercontent.com/Project-HAMi/HAMi/master/charts/hami/$file"
printf '\n--- %s ---\n' "$file"
curl -L --fail --silent --show-error "$url" |
awk 'BEGIN{p=0} /9443|httpPort|httpTargetPort|containerPort|bind|url|URL|scheduler/{p=1} p{print} p && NR>0{c++} c>=80{exit}' |
head -100
doneRepository: Project-HAMi/website
Length of output: 13215
🏁 Script executed:
#!/bin/bash
set -eu
for file in values.yaml templates/scheduler/deployment.yaml templates/scheduler/service.yaml templates/scheduler/configmap.yaml; do
url="https://raw.githubusercontent.com/Project-HAMi/HAMi/master/charts/hami/$file"
tmp=$(mktemp)
curl -L --fail --silent --show-error "$url" > "$tmp"
printf '\n--- %s: matching lines ---\n' "$file"
rg -n -C 8 '9443|httpTargetPort|httpPort|containerPort|targetPort|urlPrefix|--port|port:|bind|listen|LISTEN|admissionWebhook' "$tmp" | head -240
rm -f "$tmp"
doneRepository: Project-HAMi/website
Length of output: 10955
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- installation command and chart version context ---'
sed -n '82,100p' docs/installation/openshift-installation.md
sed -n '82,100p' i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md
printf '%s\n' '--- read-only behavioral verifier for the documented values ---'
python3 - <<'PY'
import re
import urllib.request
base = "https://raw.githubusercontent.com/Project-HAMi/HAMi/master/charts/hami/"
files = {}
for name in (
"templates/scheduler/deployment.yaml",
"templates/scheduler/service.yaml",
"templates/scheduler/configmap.yaml",
):
with urllib.request.urlopen(base + name) as response:
files[name] = response.read().decode()
deployment = files["templates/scheduler/deployment.yaml"]
service = files["templates/scheduler/service.yaml"]
configmap = files["templates/scheduler/configmap.yaml"]
# The documented values leave admissionWebhook.enabled at its chart default: true.
assert "admissionWebhook:\n enabled: true" in urllib.request.urlopen(
base + "values.yaml"
).read().decode()
bind = re.search(r"--http_bind=0\.0\.0\.0:(\d+)", deployment)
container = re.search(r"containerPort: (\d+)", deployment)
target = re.search(r"targetPort: \{\{ \.Values\.scheduler\.service\.httpTargetPort \| default 443 \}\}", service)
url = re.search(r'urlPrefix: "https://127\.0\.0\.1:(\d+)"', configmap)
print({
"scheduler_bind_port": bind.group(1) if bind else None,
"container_port": container.group(1) if container else None,
"service_target_port": "documented override: 9443",
"configmap_url_port": url.group(1) if url else None,
})
assert bind and bind.group(1) == "443"
assert container and container.group(1) == "443"
assert target
assert url and url.group(1) == "443"
print("Documented targetPort 9443 does not match the chart listener or extender URL.")
PYRepository: Project-HAMi/website
Length of output: 3297
🏁 Script executed:
#!/bin/bash
set -eu
tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
for file in values.yaml templates/scheduler/deployment.yaml templates/scheduler/service.yaml templates/scheduler/configmap.yaml; do
mkdir -p "$tmpdir/$(dirname "$file")"
curl -L --fail --silent --show-error \
"https://raw.githubusercontent.com/Project-HAMi/HAMi/master/charts/hami/$file" \
-o "$tmpdir/$file"
done
python3 - "$tmpdir" <<'PY'
import pathlib
import re
import sys
root = pathlib.Path(sys.argv[1])
values = (root / "values.yaml").read_text()
deployment = (root / "templates/scheduler/deployment.yaml").read_text()
service = (root / "templates/scheduler/service.yaml").read_text()
configmap = (root / "templates/scheduler/configmap.yaml").read_text()
assert re.search(r"admissionWebhook:\s*\n\s*enabled:\s*true", values)
bind = re.search(r"--http_bind=0\.0\.0\.0:(\d+)", deployment)
container = re.search(r"containerPort:\s*(\d+)", deployment)
target = re.search(r"targetPort:\s*\{\{\s*\.Values\.scheduler\.service\.httpTargetPort", service)
url = re.search(r'urlPrefix:\s*"https://127\.0\.0\.1:(\d+)"', configmap)
result = {
"documented_service_port": 443,
"documented_service_target_port": 9443,
"chart_scheduler_bind_port": bind.group(1) if bind else None,
"chart_container_port": container.group(1) if container else None,
"chart_configmap_url_port": url.group(1) if url else None,
"service_target_is_configurable": bool(target),
}
print(result)
assert result["chart_scheduler_bind_port"] == "443"
assert result["chart_container_port"] == "443"
assert result["chart_configmap_url_port"] == "443"
assert result["service_target_is_configurable"]
assert result["documented_service_target_port"] != int(result["chart_scheduler_bind_port"])
print("The documented 443 -> 9443 mapping is inconsistent with the chart's 443 listener and extender URL.")
PYRepository: Project-HAMi/website
Length of output: 247
🏁 Script executed:
#!/bin/bash
set -eu
tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
for file in values.yaml templates/scheduler/deployment.yaml templates/scheduler/service.yaml templates/scheduler/configmap.yaml; do
mkdir -p "$tmpdir/$(dirname "$file")"
curl -L --fail --silent --show-error \
"https://raw.githubusercontent.com/Project-HAMi/HAMi/master/charts/hami/$file" \
-o "$tmpdir/$file"
done
python3 - "$tmpdir" <<'PY'
import pathlib
import re
import sys
root = pathlib.Path(sys.argv[1])
values = (root / "values.yaml").read_text()
deployment = (root / "templates/scheduler/deployment.yaml").read_text()
service = (root / "templates/scheduler/service.yaml").read_text()
configmap = (root / "templates/scheduler/configmap.yaml").read_text()
# The chart default enables the TLS scheduler endpoint; comments may occur
# between the key and its value.
admission_enabled = bool(re.search(
r"admissionWebhook:\s*(?:\n\s*#.*)*\n\s*enabled:\s*true", values
))
bind = re.search(r"--http_bind=0\.0\.0\.0:(\d+)", deployment)
container = re.search(r"containerPort:\s*(\d+)", deployment)
target = re.search(
r"targetPort:\s*\{\{\s*\.Values\.scheduler\.service\.httpTargetPort", service
)
url = re.search(r'urlPrefix:\s*"https://127\.0\.0\.1:(\d+)"', configmap)
result = {
"admission_webhook_default_enabled": admission_enabled,
"documented_service_port": 443,
"documented_service_target_port": 9443,
"chart_scheduler_bind_port": bind.group(1) if bind else None,
"chart_container_port": container.group(1) if container else None,
"chart_configmap_url_port": url.group(1) if url else None,
"service_target_is_configurable": bool(target),
}
print(result)
assert admission_enabled
assert result["chart_scheduler_bind_port"] == "443"
assert result["chart_container_port"] == "443"
assert result["chart_configmap_url_port"] == "443"
assert result["service_target_is_configurable"]
assert result["documented_service_target_port"] != int(result["chart_scheduler_bind_port"])
print("The documented 443 -> 9443 mapping is inconsistent with the chart's 443 listener and extender URL.")
PYRepository: Project-HAMi/website
Length of output: 515
Align the OpenShift scheduler port contract
The chart binds the scheduler extender and container to 443, and the scheduler ConfigMap uses https://127.0.0.1:443. A Service target port of 9443 has no listener. Update the chart and both guides, or document httpTargetPort: 443 until the chart supports the complete port change.
📍 Affects 2 files
docs/installation/openshift-installation.md#L63-L65(this comment)i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md#L63-L65
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/installation/openshift-installation.md` around lines 63 - 65, Align the
OpenShift Service port documentation in
docs/installation/openshift-installation.md:63-65 and
i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md:63-65
with the chart’s scheduler listener and ConfigMap URL by documenting
httpTargetPort as 443, unless the chart is simultaneously updated to support
9443 end to end. Apply the same correction consistently in both guides.
Source: MCP tools
| The NVIDIA driver root is managed by the GPU Operator and mounted read-only into the device plugin and monitor: | ||
|
|
||
| ```text | ||
| /run/nvidia/driver | ||
| ``` | ||
|
|
||
| HAMi does not change the SELinux label of that path. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- English guide ---'
sed -n '150,175p' docs/installation/openshift-installation.md
printf '%s\n' '--- Chinese guide ---'
sed -n '150,175p' i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md
printf '%s\n' '--- NVIDIA chart templates and references ---'
rg -n -C 5 'driver-root|vgpu-monitor|device-plugin' charts/hami/templates charts/hami/values.yaml charts/hami/Chart.yaml 2>/dev/null || true
printf '%s\n' '--- Relevant tracked files ---'
git ls-files | rg '(^|/)(device-plugin|vgpu-monitor|openshift-installation|hami)' | head -200Repository: Project-HAMi/website
Length of output: 12386
🏁 Script executed:
#!/bin/bash
set -eu
api='https://api.github.com/repos/Project-HAMi/HAMi/git/trees/master?recursive=1'
tree="$(curl -fsSL "$api")"
printf '%s\n' '--- Matching upstream chart paths ---'
printf '%s' "$tree" |
jq -r '.tree[] | select(.path | test("charts/hami/templates|driver-root|vgpu-monitor|device-plugin")) | .path' |
head -200
printf '%s\n' '--- Device-plugin NVIDIA daemonset ---'
curl -fsSL 'https://raw.githubusercontent.com/Project-HAMi/HAMi/master/charts/hami/templates/device-plugin/daemonsetnvidia.yaml' |
nl -ba | sed -n '1,240p'
printf '%s\n' '--- Monitor-related templates ---'
printf '%s' "$tree" |
jq -r '.tree[] | select(.path | test("charts/hami/templates.*(monitor|vgpu)")) | .path' |
while IFS= read -r path; do
[ -n "$path" ] || continue
printf '\n### %s\n' "$path"
curl -fsSL "https://raw.githubusercontent.com/Project-HAMi/HAMi/master/$path" |
nl -ba | rg -n -C 8 'driver-root|mountPath:|hostPath:|name:'
doneRepository: Project-HAMi/website
Length of output: 209
🌐 Web query:
site:github.com/Project-HAMi/HAMi "driver-root" "vgpu-monitor"
💡 Result:
In the context of the Project-HAMi (formerly known as HAMi) software, driver-root and vgpu-monitor are components of the device plugin deployment [1]. driver-root is a volume mount used to provide the container with access to the host's NVIDIA driver files [1]. In Kubernetes deployments, the host path for the driver (which is often configured via the nvidiaDriverRoot setting) is mounted to /driver-root inside the device plugin container [1]. This mounting is essential for enabling Container Device Interface (CDI) detection and ensuring that the plugin can correctly identify and interact with GPU resources on the node [1]. vgpu-monitor is a component container running within the HAMi device plugin pod, typically responsible for monitoring vGPU resources and collecting metrics [1][2]. It runs as a process (vGPUmonitor) that tracks GPU utilization and health, and it serves these metrics (often via a /metrics endpoint) for integration with tools like Prometheus and Grafana [1][2]. Key operational details include: - Mount Requirement: The driver-root is mounted at /driver-root in the container to allow the vgpu-monitor and the device plugin to generate correct CDI specifications and interact with the driver [1][3]. - Configuration: You can configure the container's view of the driver root using flags such as --container-driver-root (which usually defaults to /driver-root) and --nvidia-driver-root (which refers to the actual host path, often /) [4][3][5]. - Metrics: If metrics are not appearing in monitoring tools, it is standard practice to ensure the vgpu-monitor is running correctly and that a ServiceMonitor is properly configured to scrape the /metrics endpoint [2]. Issues with vgpu-monitor can sometimes arise from cache file parsing errors or configuration mismatches after upgrades, which are often addressed by restarting pods or updating to a version that includes fixes for the specific parsing logic [6][7].
Citations:
- 1: https://github.com/Project-HAMi/HAMi/blob/c005cbd1/charts/hami/templates/device-plugin/daemonsetnvidia.yaml
- 2: vgpu-monitor-metrics does not show in grafana HAMi#410
- 3: Dynamic MIG not work on H100 HAMi#1014
- 4: How to install HAMI for enflame I20 device ? HAMi#1566
- 5: Failed to initialize NVML: ERROR_UNKNOWN HAMi#452
- 6: Bug: vgpu-monitor fails to parse cache file in v2.8.1 - "not valid UTF-8" HAMi#1811
- 7: vgpu-monitor panic HAMi#318
🌐 Web query:
site:github.com/Project-HAMi/HAMi/blob/master/charts/hami/templates "daemonsetnvidia.yaml"
💡 Result:
There is no standard or official file named daemonsetnvidia.yaml in Kubernetes or NVIDIA GPU documentation. It is likely a custom or user-defined filename used for deploying an NVIDIA-related DaemonSet, such as the NVIDIA Device Plugin. To deploy the official NVIDIA device plugin on a Kubernetes cluster, the standard approach is to use the NVIDIA GPU Operator or the official device plugin manifest provided by NVIDIA. You can typically apply the official manifest directly from their repository using kubectl: kubectl apply -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/v0.15.0/deployments/static/nvidia-device-plugin.yml The search results for queries related to this specific filename only returned unrelated configuration templates from the HAMi project, which manages GPU sharing and does not use a file named daemonsetnvidia.yaml [1].
Citations:
🏁 Script executed:
#!/bin/bash
set -eu
for ref in c005cbd1 master; do
url="https://raw.githubusercontent.com/Project-HAMi/HAMi/$ref/charts/hami/templates/device-plugin/daemonsetnvidia.yaml"
printf '\n--- %s ---\n' "$url"
if curl -fsSL "$url" -o "/tmp/daemonsetnvidia-$ref.yaml"; then
nl -ba "/tmp/daemonsetnvidia-$ref.yaml" |
rg -n -C 12 'vgpu-monitor|driver-root|volumeMounts:|volumes:|mountPath:|hostPath:'
else
printf 'unavailable\n'
fi
doneRepository: Project-HAMi/website
Length of output: 321
🏁 Script executed:
#!/bin/bash
set -u
for ref in c005cbd1 master; do
file="/tmp/daemonsetnvidia-$ref.yaml"
printf '\n--- %s ---\n' "$file"
if [ -f "$file" ]; then
awk '{printf "%6d %s\n", NR, $0}' "$file" |
grep -E -C 12 'vgpu-monitor|driver-root|volumeMounts:|volumes:|mountPath:|hostPath:'
else
printf 'manifest not downloaded\n'
fi
doneRepository: Project-HAMi/website
Length of output: 7634
Correct the driver-root mount statement in both guides.
The chart mounts /run/nvidia/driver read-only at /driver-root only in device-plugin. vgpu-monitor has no corresponding mount.
📍 Affects 2 files
docs/installation/openshift-installation.md#L160-L166(this comment)i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md#L160-L166
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/installation/openshift-installation.md` around lines 160 - 166, Update
the driver-root mount statements in
docs/installation/openshift-installation.md:160-166 and
i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md:160-166
to state that /run/nvidia/driver is mounted read-only at /driver-root only in
device-plugin; explicitly remove the claim that vgpu-monitor has a corresponding
mount.
Source: MCP tools
| Check SELinux labels on the node: | ||
|
|
||
| ```bash | ||
| oc debug node/<gpu-node> -- chroot /host \ | ||
| ls -Zd /usr/local/vgpu /usr/local/vgpu/containers | ||
| ``` | ||
|
|
||
| HAMi shared directories should use the configured `container_file_t`. |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win
Both SELinux verification commands omit /tmp/vgpulock.
docs/installation/openshift-installation.md#L204-L211: Add/tmp/vgpulockto thels -Zdcommand.i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md#L204-L211: Add/tmp/vgpulockto the corresponding command.
📍 Affects 2 files
docs/installation/openshift-installation.md#L204-L211(this comment)i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md#L204-L211
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/installation/openshift-installation.md` around lines 204 - 211, Update
the SELinux verification command in
docs/installation/openshift-installation.md:204-211 to include /tmp/vgpulock
alongside the existing shared directories. Apply the same command update in
i18n/zh/docusaurus-plugin-content-docs/current/installation/openshift-installation.md:204-211
so both localized installation documents verify all HAMi shared directories.
|
It depends on Project-HAMi/HAMi#2208 |
What type of PR is this?
/kind documentation
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Checklist:
npm run lintandnpm run format:checkpassnpm run buildsucceeds for bothenandzhgit commit -s)Summary by CodeRabbit