diff --git a/.github/workflows/build-helm-release.yaml b/.github/workflows/build-helm-release.yaml new file mode 100644 index 0000000..b0c7223 --- /dev/null +++ b/.github/workflows/build-helm-release.yaml @@ -0,0 +1,170 @@ +name: Helm Release + +on: + workflow_dispatch: + push: + branches: + - main + tags: + - "v*" + paths: + - charts/ascend-device-plugin/Chart.yaml + +env: + HELM_VERSION: "v3.20.0" + CHART_PATH: charts/ascend-device-plugin + CHART_NAME: ascend-device-plugin + +concurrency: + group: helm-release + cancel-in-progress: false + +jobs: + detect-chart-version: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + outputs: + version_changed: ${{ steps.compare.outputs.version_changed }} + previous_version: ${{ steps.compare.outputs.previous_version }} + current_version: ${{ steps.compare.outputs.current_version }} + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Compare chart version + id: compare + shell: bash + run: | + set -euo pipefail + + before_sha="${{ github.event.before }}" + if [[ -z "${before_sha}" || "${before_sha}" == "0000000000000000000000000000000000000000" ]]; then + echo "github.event.before is not available for this push" >&2 + exit 1 + fi + + current_version="$(awk '$1 == "version:" { print $2; exit }' "${{ env.CHART_PATH }}/Chart.yaml")" + if [[ -z "${current_version}" ]]; then + echo "failed to resolve current chart version from ${{ env.CHART_PATH }}/Chart.yaml" >&2 + exit 1 + fi + + if git cat-file -e "${before_sha}:${{ env.CHART_PATH }}/Chart.yaml" 2>/dev/null; then + previous_version="$(git show "${before_sha}:${{ env.CHART_PATH }}/Chart.yaml" | awk '$1 == "version:" { print $2; exit }')" + else + previous_version="" + fi + + if [[ -z "${previous_version}" || "${previous_version}" != "${current_version}" ]]; then + version_changed=true + else + version_changed=false + fi + + { + echo "previous_version=${previous_version}" + echo "current_version=${current_version}" + echo "version_changed=${version_changed}" + } >>"$GITHUB_OUTPUT" + + helm-release: + needs: + - detect-chart-version + if: >- + always() && + (github.event_name == 'workflow_dispatch' || + startsWith(github.ref, 'refs/tags/') || + needs.detect-chart-version.outputs.version_changed == 'true') + permissions: + contents: write + packages: write + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Ensure gh-pages branch exists + shell: bash + run: | + set -euo pipefail + + if git ls-remote --exit-code --heads origin gh-pages >/dev/null 2>&1; then + echo "origin/gh-pages already exists" + exit 0 + fi + + workdir="$(mktemp -d)" + git worktree add --detach "${workdir}" HEAD + + pushd "${workdir}" + git switch --orphan gh-pages + git rm -rf . >/dev/null 2>&1 || true + touch .nojekyll + git add .nojekyll + git commit -m "chore: initialize gh-pages branch" + git push origin gh-pages + popd + + git worktree remove --force "${workdir}" + git fetch origin gh-pages + + - name: Set up Helm + uses: azure/setup-helm@v5.0.0 + with: + version: ${{ env.HELM_VERSION }} + + - name: Package Helm chart + run: | + mkdir -p .cr-release-packages + helm package "${{ env.CHART_PATH }}" --destination .cr-release-packages + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.6.0 + with: + charts_dir: charts + skip_existing: true + skip_packaging: true + env: + CR_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish Helm chart to GHCR + shell: bash + env: + GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -euo pipefail + + namespace="${GITHUB_REPOSITORY_OWNER,,}" + chart_version="$(awk '$1 == "version:" { print $2; exit }' "${{ env.CHART_PATH }}/Chart.yaml")" + package_path=".cr-release-packages/${{ env.CHART_NAME }}-${chart_version}.tgz" + + if [[ -z "${chart_version}" || ! -f "${package_path}" ]]; then + echo "failed to resolve packaged chart for ${{ env.CHART_NAME }}" >&2 + exit 1 + fi + + echo "${GHCR_TOKEN}" | helm registry login ghcr.io --username "${GITHUB_ACTOR}" --password-stdin + chart_ref="oci://ghcr.io/${namespace}/charts/${{ env.CHART_NAME }}" + lookup_error="$(mktemp)" + + if helm show chart "${chart_ref}" --version "${chart_version}" >/dev/null 2>"${lookup_error}"; then + echo "${chart_ref}:${chart_version} already exists; skipping GHCR push" + exit 0 + fi + + if ! grep -Eqi 'not found|manifest unknown' "${lookup_error}"; then + echo "failed to query ${chart_ref}:${chart_version}" >&2 + cat "${lookup_error}" >&2 + exit 1 + fi + + helm push "${package_path}" "oci://ghcr.io/${namespace}/charts" diff --git a/.github/workflows/helm-lint.yaml b/.github/workflows/helm-lint.yaml new file mode 100644 index 0000000..6d69046 --- /dev/null +++ b/.github/workflows/helm-lint.yaml @@ -0,0 +1,85 @@ +name: Helm Lint + +on: + pull_request: + branches: + - main + +env: + HELM_VERSION: "v3.20.0" + +permissions: + contents: read + pull-requests: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + changes: + runs-on: ubuntu-latest + outputs: + helm: ${{ steps.filter.outputs.helm }} + steps: + - name: Detect Helm changes + uses: dorny/paths-filter@v4 + id: filter + with: + filters: | + helm: + - 'charts/ascend-device-plugin/**' + - 'Makefile' + - '.github/workflows/helm-lint.yaml' + - '.github/workflows/build-helm-release.yaml' + + lint-test: + runs-on: ubuntu-latest + needs: changes + if: needs.changes.outputs.helm == 'true' + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Set up Helm + uses: azure/setup-helm@v5.0.0 + with: + version: ${{ env.HELM_VERSION }} + + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version-file: go.mod + + - name: Set up helm-docs + uses: gabe565/setup-helm-docs-action@v1 + with: + version: v1.14.2 + + - name: Run Helm chart verification + run: make verify-helm-chart + + helm-lint-required: + runs-on: ubuntu-latest + needs: + - changes + - lint-test + if: always() + steps: + - name: Check Helm workflow result + shell: bash + run: | + if [[ "${{ needs.changes.result }}" != "success" ]]; then + echo "Helm change detection did not complete successfully: ${{ needs.changes.result }}" + exit 1 + fi + + if [[ "${{ needs.changes.outputs.helm }}" != "true" ]]; then + echo "No Helm-relevant changes." + exit 0 + fi + + if [[ "${{ needs.lint-test.result }}" != "success" ]]; then + echo "Helm verification did not complete successfully: ${{ needs.lint-test.result }}" + exit 1 + fi diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6144afb --- /dev/null +++ b/.gitignore @@ -0,0 +1,75 @@ +### Linux template +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### Go template +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work +go.work.sum + +# env file +.env + +### macOS template +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + + +### Custom +.idea/ +.vscode/ +.worktree/ diff --git a/Makefile b/Makefile index 1bb2037..163dde8 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,19 @@ lint: ascend-device-plugin: $(GO) build $(BUILDARGS) -o ./ascend-device-plugin ./cmd/main.go +.PHONY: update-chart-docs +update-chart-docs: + cd charts/ascend-device-plugin && helm-docs --skip-version-footer + cd charts/ascend-device-plugin && $(GO) run github.com/losisin/helm-values-schema-json@v1.9.2 -input values.yaml -output values.schema.json + +.PHONY: verify-helm-chart +verify-helm-chart: + $(MAKE) update-chart-docs + git diff --exit-code -- charts/ascend-device-plugin/README.md charts/ascend-device-plugin/values.schema.json + helm lint charts/ascend-device-plugin + helm template ascend-device-plugin charts/ascend-device-plugin >/dev/null + clean: rm -rf ./ascend-device-plugin -.PHONY: all tidy test lint clean \ No newline at end of file +.PHONY: all tidy test lint clean update-chart-docs verify-helm-chart diff --git a/charts/ascend-device-plugin/README.md b/charts/ascend-device-plugin/README.md index d2c1e75..3dc9001 100644 --- a/charts/ascend-device-plugin/README.md +++ b/charts/ascend-device-plugin/README.md @@ -1,4 +1,8 @@ -# Ascend Device Plugin Helm Chart +# ascend-device-plugin + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.0](https://img.shields.io/badge/AppVersion-v1.3.0-informational?style=flat-square) + +HAMi Ascend device plugin This chart deploys the standalone HAMi Ascend device plugin manifests: @@ -78,3 +82,49 @@ nodeConfig: |- hami-vnpu-core: true vDeviceCount: 8 ``` + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| config.create | bool | `true` | Create the device configuration ConfigMap. | +| config.deviceConfigMapName | string | `"hami-scheduler-device"` | Name of the chart-managed device configuration ConfigMap. | +| config.existingDeviceConfigMapName | string | `""` | Existing device configuration ConfigMap to mount instead of the chart-managed ConfigMap. | +| daemonSet.name | string | `"hami-ascend-device-plugin"` | Device plugin DaemonSet name. | +| fullnameOverride | string | `""` | Override the fully qualified resource name. | +| hamiVnpuCore.enabled | bool | `false` | Enable hami-vnpu-core in the generated global device configuration. | +| image.pullPolicy | string | `"IfNotPresent"` | Kubernetes image pull policy. | +| image.repository | string | `"projecthami/ascend-device-plugin"` | Container image repository. | +| image.tag | string | `""` | Container image tag. Defaults to the chart `appVersion` when empty. | +| nameOverride | string | `""` | Override the chart name used in resource names. | +| nodeConfig | string | `"nodes: []"` | Per-node hami-vnpu-core configuration written to the node ConfigMap. | +| nodeConfigMap.create | bool | `true` | Create the per-node configuration ConfigMap. | +| nodeConfigMap.name | string | `"hami-device-node-config"` | Per-node configuration ConfigMap name. | +| nodeSelector.ascend | string | `"on"` | Node label value used to schedule the device plugin. | +| rbac.name | string | `"hami-ascend"` | Name shared by the chart-managed RBAC resources. | +| resources.limits.cpu | string | `"500m"` | CPU limit for the device plugin container. | +| resources.limits.memory | string | `"500Mi"` | Memory limit for the device plugin container. | +| resources.requests.cpu | string | `"500m"` | Requested CPU for the device plugin container. | +| resources.requests.memory | string | `"500Mi"` | Requested memory for the device plugin container. | +| runtimeClass.create | bool | `true` | Create the Ascend RuntimeClass. | +| runtimeClass.handler | string | `"ascend"` | Container runtime handler used by the RuntimeClass. | +| runtimeClass.name | string | `"ascend"` | RuntimeClass resource name. | +| serviceAccount.create | bool | `true` | Create a ServiceAccount for the device plugin. | +| serviceAccount.name | string | `"hami-ascend"` | ServiceAccount name. Defaults to the chart fullname when empty and creation is enabled. | +| vnpuMonitor.enabled | bool | `false` | Create vNPU monitoring integration resources. | +| vnpuMonitor.prometheusRule.create | bool | `true` | Create a Prometheus Operator PrometheusRule. | +| vnpuMonitor.prometheusRule.groupLabels.vendor | string | `"ascend"` | Vendor label applied to the Prometheus rule group. | +| vnpuMonitor.prometheusRule.groupName | string | `"ascend-vnpu"` | Prometheus rule group name. | +| vnpuMonitor.prometheusRule.interval | string | `"15s"` | Prometheus rule evaluation interval. | +| vnpuMonitor.prometheusRule.labels.release | string | `"prometheus"` | Prometheus release label applied to the PrometheusRule. | +| vnpuMonitor.prometheusRule.labels.role | string | `"recording-rules"` | Role label applied to the PrometheusRule. | +| vnpuMonitor.prometheusRule.labels.vendor | string | `"ascend"` | Vendor label applied to the PrometheusRule. | +| vnpuMonitor.prometheusRule.name | string | `"hami-ascend-vnpu-monitor"` | PrometheusRule name. | +| vnpuMonitor.prometheusRule.namespace | string | `"monitoring"` | Namespace in which to create the PrometheusRule. | +| vnpuMonitor.service.name | string | `"hami-ascend-device-plugin-metrics"` | Metrics Service name. | +| vnpuMonitor.serviceMonitor.create | bool | `true` | Create a Prometheus Operator ServiceMonitor. | +| vnpuMonitor.serviceMonitor.interval | string | `"15s"` | Metrics scrape interval. | +| vnpuMonitor.serviceMonitor.labels.release | string | `"prometheus"` | Prometheus release label applied to the ServiceMonitor. | +| vnpuMonitor.serviceMonitor.name | string | `"hami-ascend-vnpu-monitor"` | ServiceMonitor name. | +| vnpuMonitor.serviceMonitor.namespace | string | `"monitoring"` | Namespace in which to create the ServiceMonitor. | +| vnpuMonitor.serviceMonitor.path | string | `"/metrics"` | Metrics HTTP path. | diff --git a/charts/ascend-device-plugin/README.md.gotmpl b/charts/ascend-device-plugin/README.md.gotmpl new file mode 100644 index 0000000..0e46e8b --- /dev/null +++ b/charts/ascend-device-plugin/README.md.gotmpl @@ -0,0 +1,86 @@ +{{ template "chart.header" . }} + +{{ template "chart.versionBadge" . }} {{ template "chart.typeBadge" . }} {{ template "chart.appVersionBadge" . }} + +{{ template "chart.description" . }} + +This chart deploys the standalone HAMi Ascend device plugin manifests: + +- RuntimeClass +- ConfigMaps +- RBAC and ServiceAccount +- Device plugin DaemonSet +- (Optional) vNPU monitor integration resources (Service, ServiceMonitor, PrometheusRule) + +## Install + +Label Ascend nodes before installing: + +```bash +kubectl label node ascend=on --overwrite +``` + +Install the chart: + +```bash +helm install ascend-device-plugin ./charts/ascend-device-plugin \ + --namespace kube-system \ + --set image.tag=v1.3.0 +``` + +If the HAMi chart already manages the Ascend device plugin DaemonSet, related ConfigMaps, RBAC, or RuntimeClass, do not deploy this standalone chart at the same time. + +## Existing Device Configuration + +If another chart, such as the HAMi chart, already owns the shared `hami-scheduler-device` ConfigMap, reuse it instead of creating another one: + +```bash +helm install ascend-device-plugin ./charts/ascend-device-plugin \ + --namespace kube-system \ + --set image.tag=v1.3.0 \ + --set config.create=false \ + --set config.existingDeviceConfigMapName=hami-scheduler-device +``` + +With this mode, the chart mounts the existing device config and still manages `hami-device-node-config` by default. + +## hami-vnpu-core + +Enable the global `vnpus.hamiVnpuCore` switch in the generated device config: + +```bash +helm install ascend-device-plugin ./charts/ascend-device-plugin \ + --namespace kube-system \ + --set image.tag=v1.3.0 \ + --set hamiVnpuCore.enabled=true +``` + +## vNPU Monitor Integration + +The chart can also create the resources from `ascend-vnpu-monitor-integration.yaml`. + +- `vnpuMonitor.enabled=true` creates the metrics `Service`. +- `ServiceMonitor` and `PrometheusRule` are created by default; ensure Prometheus Operator CRDs are installed first. +- You can disable either one with `vnpuMonitor.serviceMonitor.create=false` or `vnpuMonitor.prometheusRule.create=false`. + +```bash +helm install ascend-device-plugin ./charts/ascend-device-plugin \ + --namespace kube-system \ + --set image.tag=v1.3.0 \ + --set hamiVnpuCore.enabled=true \ + --set vnpuMonitor.enabled=true +``` + +## Node Configuration + +Override `nodeConfig` to enable or customize `hami-vnpu-core` per node: + +```yaml +nodeConfig: |- + nodes: + - name: "ascend-node-1" + hami-vnpu-core: true + vDeviceCount: 8 +``` + +{{ template "chart.valuesSection" . }} diff --git a/charts/ascend-device-plugin/values.schema.json b/charts/ascend-device-plugin/values.schema.json new file mode 100644 index 0000000..000a010 --- /dev/null +++ b/charts/ascend-device-plugin/values.schema.json @@ -0,0 +1,227 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "config": { + "type": "object", + "properties": { + "create": { + "type": "boolean" + }, + "deviceConfigMapName": { + "type": "string" + }, + "existingDeviceConfigMapName": { + "type": "string" + } + } + }, + "daemonSet": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "deviceConfig": { + "type": "string" + }, + "fullnameOverride": { + "type": "string" + }, + "hamiVnpuCore": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "image": { + "type": "object", + "properties": { + "pullPolicy": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "nameOverride": { + "type": "string" + }, + "nodeConfig": { + "type": "string" + }, + "nodeConfigMap": { + "type": "object", + "properties": { + "create": { + "type": "boolean" + }, + "name": { + "type": "string" + } + } + }, + "nodeSelector": { + "type": "object", + "properties": { + "ascend": { + "type": "string" + } + } + }, + "rbac": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "resources": { + "type": "object", + "properties": { + "limits": { + "type": "object", + "properties": { + "cpu": { + "type": "string" + }, + "memory": { + "type": "string" + } + } + }, + "requests": { + "type": "object", + "properties": { + "cpu": { + "type": "string" + }, + "memory": { + "type": "string" + } + } + } + } + }, + "runtimeClass": { + "type": "object", + "properties": { + "create": { + "type": "boolean" + }, + "handler": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "create": { + "type": "boolean" + }, + "name": { + "type": "string" + } + } + }, + "vnpuMonitor": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "prometheusRule": { + "type": "object", + "properties": { + "create": { + "type": "boolean" + }, + "groupLabels": { + "type": "object", + "properties": { + "vendor": { + "type": "string" + } + } + }, + "groupName": { + "type": "string" + }, + "interval": { + "type": "string" + }, + "labels": { + "type": "object", + "properties": { + "release": { + "type": "string" + }, + "role": { + "type": "string" + }, + "vendor": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + } + }, + "service": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "serviceMonitor": { + "type": "object", + "properties": { + "create": { + "type": "boolean" + }, + "interval": { + "type": "string" + }, + "labels": { + "type": "object", + "properties": { + "release": { + "type": "string" + } + } + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "path": { + "type": "string" + } + } + } + } + } + } +} diff --git a/charts/ascend-device-plugin/values.yaml b/charts/ascend-device-plugin/values.yaml index b4e3c58..7b15e51 100644 --- a/charts/ascend-device-plugin/values.yaml +++ b/charts/ascend-device-plugin/values.yaml @@ -1,12 +1,21 @@ image: + # image.repository -- Container image repository. repository: projecthami/ascend-device-plugin + + # image.tag -- Container image tag. Defaults to the chart `appVersion` when empty. tag: "" + + # image.pullPolicy -- Kubernetes image pull policy. pullPolicy: IfNotPresent +# nameOverride -- Override the chart name used in resource names. nameOverride: "" + +# fullnameOverride -- Override the fully qualified resource name. fullnameOverride: "" daemonSet: + # daemonSet.name -- Device plugin DaemonSet name. name: hami-ascend-device-plugin args: - --config_file @@ -14,18 +23,28 @@ daemonSet: - --v=4 rbac: + # rbac.name -- Name shared by the chart-managed RBAC resources. name: hami-ascend runtimeClass: + # runtimeClass.create -- Create the Ascend RuntimeClass. create: true + + # runtimeClass.name -- RuntimeClass resource name. name: ascend + + # runtimeClass.handler -- Container runtime handler used by the RuntimeClass. handler: ascend serviceAccount: + # serviceAccount.create -- Create a ServiceAccount for the device plugin. create: true + + # serviceAccount.name -- ServiceAccount name. Defaults to the chart fullname when empty and creation is enabled. name: hami-ascend nodeSelector: + # nodeSelector.ascend -- Node label value used to schedule the device plugin. ascend: "on" resources: @@ -37,42 +56,79 @@ resources: cpu: 500m config: + # config.create -- Create the device configuration ConfigMap. create: true + + # config.existingDeviceConfigMapName -- Existing device configuration ConfigMap to mount instead of the chart-managed ConfigMap. existingDeviceConfigMapName: "" + + # config.deviceConfigMapName -- Name of the chart-managed device configuration ConfigMap. deviceConfigMapName: hami-scheduler-device nodeConfigMap: + # nodeConfigMap.create -- Create the per-node configuration ConfigMap. create: true + + # nodeConfigMap.name -- Per-node configuration ConfigMap name. name: hami-device-node-config hamiVnpuCore: + # hamiVnpuCore.enabled -- Enable hami-vnpu-core in the generated global device configuration. enabled: false vnpuMonitor: + # vnpuMonitor.enabled -- Create vNPU monitoring integration resources. enabled: false service: + # vnpuMonitor.service.name -- Metrics Service name. name: hami-ascend-device-plugin-metrics serviceMonitor: + # vnpuMonitor.serviceMonitor.create -- Create a Prometheus Operator ServiceMonitor. create: true + + # vnpuMonitor.serviceMonitor.name -- ServiceMonitor name. name: hami-ascend-vnpu-monitor + + # vnpuMonitor.serviceMonitor.namespace -- Namespace in which to create the ServiceMonitor. namespace: monitoring labels: + # vnpuMonitor.serviceMonitor.labels.release -- Prometheus release label applied to the ServiceMonitor. release: prometheus + + # vnpuMonitor.serviceMonitor.interval -- Metrics scrape interval. interval: 15s + + # vnpuMonitor.serviceMonitor.path -- Metrics HTTP path. path: /metrics prometheusRule: + # vnpuMonitor.prometheusRule.create -- Create a Prometheus Operator PrometheusRule. create: true + + # vnpuMonitor.prometheusRule.name -- PrometheusRule name. name: hami-ascend-vnpu-monitor + + # vnpuMonitor.prometheusRule.namespace -- Namespace in which to create the PrometheusRule. namespace: monitoring labels: + # vnpuMonitor.prometheusRule.labels.release -- Prometheus release label applied to the PrometheusRule. release: prometheus + + # vnpuMonitor.prometheusRule.labels.role -- Role label applied to the PrometheusRule. role: recording-rules + + # vnpuMonitor.prometheusRule.labels.vendor -- Vendor label applied to the PrometheusRule. vendor: ascend + + # vnpuMonitor.prometheusRule.groupName -- Prometheus rule group name. groupName: ascend-vnpu + + # vnpuMonitor.prometheusRule.interval -- Prometheus rule evaluation interval. interval: 15s groupLabels: + # vnpuMonitor.prometheusRule.groupLabels.vendor -- Vendor label applied to the Prometheus rule group. vendor: ascend +# @ignored deviceConfig: |- vnpus: hamiVnpuCore: {{ .Values.hamiVnpuCore.enabled }} @@ -201,5 +257,6 @@ deviceConfig: |- aiCore: 20 aiCPU: 7 +# nodeConfig -- Per-node hami-vnpu-core configuration written to the node ConfigMap. nodeConfig: |- nodes: []