From a441b0046ce8dd4d1a34c245438b275c197ba5a5 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Wed, 21 Jun 2023 11:34:50 +0300 Subject: [PATCH 1/2] docs: fix building of docs Signed-off-by: Markus Lehtonen --- docs/conf.py | 2 +- docs/resource-policy/installation.md | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 3ba21d146..a321c0bc1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -224,7 +224,7 @@ def fixLocalMDAnchors(app, doctree, docname): for node in doctree.traverse(nodes.reference): uri = node.get('refuri') - if isHTTPLink(uri): + if uri == None or isHTTPLink(uri): continue filePath = normalizePath(docname,uri) diff --git a/docs/resource-policy/installation.md b/docs/resource-policy/installation.md index b8514f245..fc0bf2d1a 100644 --- a/docs/resource-policy/installation.md +++ b/docs/resource-policy/installation.md @@ -7,8 +7,8 @@ here can be applied to any other plugin hosted in this repository, regardless of Currently, there are two installation methods available. -1. [Helm](#Helm) -2. [Manual](#Manual) +1. [Helm](#installing-the-helm-chart) +2. [Manual](#manual-installation) Regardless of the chosen installation method, the NRI plugin installation includes the following components: DaemonSet, ConfigMap, CustomResourceDefinition, and RBAC-related objects. @@ -37,7 +37,12 @@ following components: DaemonSet, ConfigMap, CustomResourceDefinition, and RBAC-r cd nri-plugins ``` -1. Install the plugin using Helm. Replace release name with the desired name for your Helm release. In this example, we named it as topology-aware. The default values for topology-aware resource policy plugin are stored in [values.yaml](TODO) file. If you wish to provide custom values to the Helm chart, refer to the [table](#Helm-parameters) below, which describes the available parameters that can be modified before installation. +1. Install the plugin using Helm. Replace release name with the desired name + for your Helm release. In this example, we named it as topology-aware. The +default values for topology-aware resource policy plugin are stored in +values.yaml file. If you wish to provide custom values to the Helm +chart, refer to the [table](#helm-parameters) below, which describes the +available parameters that can be modified before installation. ```sh helm install topology-aware deployment/helm/resource-management-policies/topology-aware/ @@ -45,7 +50,7 @@ following components: DaemonSet, ConfigMap, CustomResourceDefinition, and RBAC-r 1. Verify the status of the daemonset to ensure that the plugin is running successfully - ```terminal + ```bash kubectl get daemonset -n kube-system nri-resource-policy NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE @@ -120,7 +125,7 @@ For the manual installation we will be using templating tool to generate Kuberne 1. Verify the status of the DaemonSet to ensure that the plugin is running successfully - ```terminal + ```bash kubectl get daemonset -n kube-system nri-resource-policy NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE From f7a2deffa52d08101e108322da63ccf103843d70 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Wed, 21 Jun 2023 11:59:50 +0300 Subject: [PATCH 2/2] github/workflows: add verification of building docs Signed-off-by: Markus Lehtonen --- .github/workflows/project-checks.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/project-checks.yaml b/.github/workflows/project-checks.yaml index 49d50b1c7..44a6196b3 100644 --- a/.github/workflows/project-checks.yaml +++ b/.github/workflows/project-checks.yaml @@ -37,3 +37,19 @@ jobs: run: | make verify working-directory: src/github.com/containerd/nri-plugin-collection + + - name: Build docs + run: | + make site-build + make clean-html + + - name: Install gh-pages build dependencies + run: | + pip3 install --user -r docs/requirements.txt + echo "`python3 -m site --user-base`/bin" >> $GITHUB_PATH + + - name: Verify update of gh-pages + run: | + git config user.name "Github" + git config user.email "no-reply@github.com" + ./scripts/build/update-gh-pages.sh