1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-05 16:27:05 +00:00
node-feature-discovery/v0.10/advanced/developer-guide.html
Github Actions 9a5f8f7e9e Update documentation for v0.10
Auto-generated from v0.10.1-18-gdae4a787 by 'update-gh-pages.sh'
2023-07-21 08:38:37 +00:00

27 lines
No EOL
29 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html> <html lang="en" dir="auto"> <head><meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=no"> <meta name="description" content="Developer guide Table of contents Building from source Download the source code Docker build Docker multi-arch builds with buildx Deployment Buildi..."> <meta name="revised" content=""> <meta name="author" content="Kubernetes SIGs"> <meta name="generator" content="rundocs/jekyll-rtd-theme v2.0.10"><meta name="theme-color" content="#2980b9"> <title>Developer guide · Node Feature Discovery</title> <meta name="twitter:title" content="Developer guide · Node Feature Discovery"> <meta name="twitter:description" content="Developer guide Table of contents Building from source Download the source code Docker build Docker multi-arch builds with buildx Deployment Buildi..."> <meta name="twitter:card" content="summary"> <meta name="twitter:site" content="@Kubernetes SIGs"> <meta name="twitter:url" content="https://kubernetes-sigs.github.com/node-feature-discovery/v0.10/advanced/developer-guide.html"> <meta name="twitter:creator" content="@rundocs/jekyll-rtd-theme v2.0.10"> <meta property="og:title" content="Developer guide · Node Feature Discovery"> <meta property="og:description" content="Developer guide Table of contents Building from source Download the source code Docker build Docker multi-arch builds with buildx Deployment Buildi..."> <meta property="og:locale" content="en"> <meta property="og:url" content="https://kubernetes-sigs.github.com/node-feature-discovery/v0.10/advanced/developer-guide.html"> <meta property="og:type" content="article"> <meta property="article:author" content="Kubernetes SIGs"> <meta property="article:published_time" content="2016-07-23T00:07:52-05:00"> <meta property="article:modified_time" content="2023-07-21T03:38:26-05:00"> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "mainEntityOfPage": { "@type": "WebPage", "@id": "https://kubernetes-sigs.github.com/node-feature-discovery/v0.10/advanced/developer-guide.html" }, "headline": "Developer guide · Node Feature Discovery", "image": [], "author": { "@type": "Person", "name": "Kubernetes SIGs" }, "datePublished": "2016-07-23T00:07:52-05:00", "dateModified": "2023-07-21T03:38:26-05:00", "publisher": { "@type": "Organization", "name": "Kubernetes SIGs", "logo": { "@type": "ImageObject", "url": "https://avatars.githubusercontent.com/u/36015203?v=4" } }, "description": "Developer guide Table of contents Building from source Download the source code Docker build Docker multi-arch builds with buildx Deployment Buildi..." } </script> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net"><link rel="next" href="https://kubernetes-sigs.github.com/node-feature-discovery/v0.10/advanced/master-commandline-reference.html"><link rel="canonical" href="https://kubernetes-sigs.github.com/node-feature-discovery/v0.10/advanced/developer-guide.html"><link rel="icon" type="image/svg+xml" href="/node-feature-discovery/v0.10/assets/images/favicon.svg"><link rel="icon" type="image/png" href="/node-feature-discovery/v0.10/assets/images/favicon-16x16.png" sizes="16x16"> <link rel="icon" type="image/png" href="/node-feature-discovery/v0.10/assets/images/favicon-32x32.png" sizes="32x32"> <link rel="icon" type="image/png" href="/node-feature-discovery/v0.10/assets/images/favicon-96x96.png" sizes="96x96"><link rel="mask-icon" href="/node-feature-discovery/v0.10/assets/images/favicon.svg" color="#2980b9"><link rel="apple-touch-icon" href="/node-feature-discovery/v0.10/assets/images/apple-touch-icon-300x300.jpg"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@2.0.10/assets/css/theme.min.css"><style>@media (min-width: 1280px){.content-wrap{max-width:1200px}}</style><script> window.ui = { title: "Node Feature Discovery", baseurl: "/node-feature-discovery/v0.10", i18n: { search_results: "Search Results", search_results_found: "Search finished, found # page(s) matching the search query.", search_results_not_found: "Your search did not match any documents, please make sure that all characters are spelled correctly!" } }; </script> </head> <body class="container"><div class="sidebar-wrap overflow-hidden"> <div class="sidebar height-full overflow-y-scroll overflow-x-hidden"> <div class="header d-flex flex-column p-3 text-center"> <div class="title pb-1"> <a class="h4 no-underline py-1 px-2 rounded-1" href="/node-feature-discovery/v0.10/" title="Documentation of Node Feature Discovery - a Kubernetes add-on for discovering and advertising hardware features and system configuration in the cluster."> <i class="fa fa-home"></i> Node Feature Discovery </a> </div> <span class="version">v0.10.1</span> <form class="search pt-2" action="/node-feature-discovery/v0.10/search.html" method="get" autocomplete="off"> <input class="form-control input-block input-sm" type="text" name="q" placeholder="Search docs..."> </form> </div> <div class="toctree py-2" data-spy="affix" role="navigation" aria-label="main navigation"> <ul> </ul> <a class="caption d-block text-uppercase no-wrap px-2 py-0" href="/node-feature-discovery/v0.10/get-started/"> Get started </a><ul> <li class="toc level-1 " data-sort="1" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/v0.10/get-started/introduction.html">1. Introduction</a> </li> <li class="toc level-1 " data-sort="2" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/v0.10/get-started/quick-start.html">2. Quick start</a> </li> <li class="toc level-1 " data-sort="3" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/v0.10/get-started/deployment-and-usage.html">3. Deployment and usage</a> </li> <li class="toc level-1 " data-sort="4" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/v0.10/get-started/features.html">4. Feature labels</a> </li> <li class="toc level-1 " data-sort="5" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/v0.10/get-started/examples-and-demos.html">5. Examples and demos</a> </li></ul> <a class="caption d-block text-uppercase no-wrap px-2 py-0" href="/node-feature-discovery/v0.10/advanced/"> Advanced </a><ul> <li class="toc level-1 current" data-sort="1" data-level="1"> <a class="d-flex flex-items-baseline current" href="/node-feature-discovery/v0.10/advanced/developer-guide.html">1. Developer guide</a> </li> <li class="toc level-1 " data-sort="2" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/v0.10/advanced/master-commandline-reference.html">2. Master cmdline reference</a> </li> <li class="toc level-1 " data-sort="3" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/v0.10/advanced/worker-commandline-reference.html">3. Worker cmdline reference</a> </li> <li class="toc level-1 " data-sort="4" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/v0.10/advanced/worker-configuration-reference.html">4. Worker config reference</a> </li> <li class="toc level-1 " data-sort="5" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/v0.10/advanced/topology-updater-commandline-reference.html">5. Topology Updater Cmdline Reference</a> </li> <li class="toc level-1 " data-sort="5" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/v0.10/advanced/customization-guide.html">5. Customization guide</a> </li></ul> <a class="caption d-block text-uppercase no-wrap px-2 py-0" href="/node-feature-discovery/v0.10/contributing/"> Contributing </a><ul> </ul> </div> </div> </div> <div class="content-wrap"> <div class="header d-flex flex-justify-between p-2 hide-lg hide-xl" aria-label="top navigation"> <button id="toggle" aria-label="Toggle menu" class="btn-octicon p-2 m-0 text-white" type="button"> <i class="fa fa-bars"></i> </button> <div class="title flex-1 d-flex flex-justify-center"> <a class="h4 no-underline py-1 px-2 rounded-1" href="/node-feature-discovery/v0.10/">Node Feature Discovery</a> </div> </div> <div class="bg-red-2"> <div class="content p-3 px-sm-5"> This documentation is for Node Feature Discovery version that is no longer supported. Please upgrade and visit the <a class="no-underline" href="/node-feature-discovery/stable">documentation of the latest stable release</a>. </div> </div> <div class="content p-3 p-sm-5"> <div class="navigation-top d-flex flex-justify-between"> <ul class="breadcrumb" role="navigation" aria-label="breadcrumbs navigation"> <li class="breadcrumb-item"> <a class="no-underline" href="/node-feature-discovery/v0.10/" title="/"> <i class="fa fa-home"></i> </a> </li><li class="breadcrumb-item" ><a href="/node-feature-discovery/v0.10/advanced/">advanced</a></li><li class="breadcrumb-item" aria-current="page">developer-guide.md</li></ul> <a class="edit" href="https://github.com/kubernetes-sigs/node-feature-discovery/edit/gh-pages/advanced/developer-guide.md" title="Edit on GitHub" rel="noreferrer" target="_blank"> <i class="fa fa-edit"></i> </a> </div> <hr> <div role="main" itemscope="itemscope" itemtype="https://schema.org/Article"> <div class="markdown-body" itemprop="articleBody"> <h1 class="no_toc" id="developer-guide">Developer guide</h1> <h2 class="no_toc text-delta" id="table-of-contents">Table of contents</h2> <ol id="markdown-toc"> <li><a href="#building-from-source" id="markdown-toc-building-from-source">Building from source</a> <ol> <li><a href="#download-the-source-code" id="markdown-toc-download-the-source-code">Download the source code</a></li> <li><a href="#docker-build" id="markdown-toc-docker-build">Docker build</a></li> <li><a href="#docker-multi-arch-builds-with-buildx" id="markdown-toc-docker-multi-arch-builds-with-buildx">Docker multi-arch builds with buildx</a></li> <li><a href="#deployment" id="markdown-toc-deployment">Deployment</a></li> <li><a href="#building-locally" id="markdown-toc-building-locally">Building locally</a></li> <li><a href="#customizing-the-build" id="markdown-toc-customizing-the-build">Customizing the build</a></li> <li><a href="#testing" id="markdown-toc-testing">Testing</a></li> </ol> </li> <li><a href="#running-locally" id="markdown-toc-running-locally">Running locally</a> <ol> <li><a href="#nfd-master" id="markdown-toc-nfd-master">NFD-Master</a></li> <li><a href="#nfd-worker" id="markdown-toc-nfd-worker">NFD-Worker</a></li> <li><a href="#nfd-topology-updater" id="markdown-toc-nfd-topology-updater">NFD-Topology-Updater</a></li> </ol> </li> <li><a href="#documentation" id="markdown-toc-documentation">Documentation</a></li> </ol> <hr /> <h2 id="building-from-source">Building from source</h2> <h3 id="download-the-source-code">Download the source code</h3> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code>git clone https://github.com/kubernetes-sigs/node-feature-discovery
<span class="nb">cd </span>node-feature-discovery
</code></pre> </div></div> <h3 id="docker-build">Docker build</h3> <h4 id="build-the-container-image">Build the container image</h4> <p>See <a href="#customizing-the-build">customizing the build</a> below for altering the container image registry, for example.</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code>make
</code></pre> </div></div> <h4 id="push-the-container-image">Push the container image</h4> <p>Optional, this example with Docker.</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code>docker push &lt;IMAGE_TAG&gt;
</code></pre> </div></div> <h3 id="docker-multi-arch-builds-with-buildx">Docker multi-arch builds with buildx</h3> <p>The default set of architectures enabled for mulit-arch builds are <code class="language-plaintext highlighter-rouge notranslate">linux/amd64</code> and <code class="language-plaintext highlighter-rouge notranslate">linux/arm64</code>. If more architectures are needed one can override the <code class="language-plaintext highlighter-rouge notranslate">IMAGE_ALL_PLATFORMS</code> variable with a comma separated list of <code class="language-plaintext highlighter-rouge notranslate">OS/ARCH</code> tuples.</p> <h4 id="build-the-manifest-list-with-a-container-image-per-arch">Build the manifest-list with a container image per arch</h4> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code>make image-all
</code></pre> </div></div> <p>Currently <code class="language-plaintext highlighter-rouge notranslate">docker</code> does not support loading of manifest-lists meaning the images are not shown when executing <code class="language-plaintext highlighter-rouge notranslate">docker images</code>, see: <a href="https://github.com/docker/buildx/issues/59">buildx issue #59</a>.</p> <h4 id="push-the-manifest-list-with-container-image-per-arch">Push the manifest-list with container image per arch</h4> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code>make push-all
</code></pre> </div></div> <p>The resulting container image can be used in the same way on each arch by pulling e.g. <code class="language-plaintext highlighter-rouge notranslate">node-feature-discovery:v0.10.0</code> without specifying the architechture. The manifest-list will take care of providing the right architecture image.</p> <h4 id="change-the-job-spec-to-use-your-custom-image-optional">Change the job spec to use your custom image (optional)</h4> <p>To use your published image from the step above instead of the <code class="language-plaintext highlighter-rouge notranslate">k8s.gcr.io/nfd/node-feature-discovery</code> image, edit <code class="language-plaintext highlighter-rouge notranslate">image</code> attribute in the spec template(s) to the new location (<code class="language-plaintext highlighter-rouge notranslate">&lt;registry-name&gt;/&lt;image-name&gt;[:&lt;version&gt;]</code>).</p> <h3 id="deployment">Deployment</h3> <p>The <code class="language-plaintext highlighter-rouge notranslate">yamls</code> makefile generates a <code class="language-plaintext highlighter-rouge notranslate">kustomization.yaml</code> matching your locally built image and using the <code class="language-plaintext highlighter-rouge notranslate">deploy/overlays/default</code> deployment. See <a href="#customizing-the-build">build customization</a> below for configurability, e.g. changing the deployment namespace.</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code><span class="nv">K8S_NAMESPACE</span><span class="o">=</span>my-ns make yamls
kubectl apply <span class="nt">-k</span> <span class="nb">.</span>
</code></pre> </div></div> <p>You can use alternative deployment methods by modifying the auto-generated kustomization file. For example, deploying worker and master in the same pod by pointing to <code class="language-plaintext highlighter-rouge notranslate">deployment/overlays/default-combined</code>.</p> <h3 id="building-locally">Building locally</h3> <p>You can also build the binaries locally</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code>make build
</code></pre> </div></div> <p>This will compile binaries under <code class="language-plaintext highlighter-rouge notranslate">bin/</code></p> <h3 id="customizing-the-build">Customizing the build</h3> <p>There are several Makefile variables that control the build process and the name of the resulting container image. The following are targeted targeted for build customization and they can be specified via environment variables or makefile overrides.</p> <table> <thead> <tr> <th>Variable</th> <th>Description</th> <th>Default value</th> </tr> </thead> <tbody> <tr> <td>HOSTMOUNT_PREFIX</td> <td>Prefix of system directories for feature discovery (local builds)</td> <td>/ (<em>local builds</em>) /host- (<em>container builds</em>)</td> </tr> <tr> <td>IMAGE_BUILD_CMD</td> <td>Command to build the image</td> <td>docker build</td> </tr> <tr> <td>IMAGE_BUILD_EXTRA_OPTS</td> <td>Extra options to pass to build command</td> <td><em>empty</em></td> </tr> <tr> <td>IMAGE_BUILDX_CMD</td> <td>Command to build and push multi-arch images with buildx</td> <td>DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build platform=${IMAGE_ALL_PLATFORMS} progress=auto pull</td> </tr> <tr> <td>IMAGE_ALL_PLATFORMS</td> <td>Comma seperated list of OS/ARCH tuples for mulit-arch builds</td> <td>linux/amd64,linux/arm64</td> </tr> <tr> <td>IMAGE_PUSH_CMD</td> <td>Command to push the image to remote registry</td> <td>docker push</td> </tr> <tr> <td>IMAGE_REGISTRY</td> <td>Container image registry to use</td> <td>k8s.gcr.io/nfd</td> </tr> <tr> <td>IMAGE_TAG_NAME</td> <td>Container image tag name</td> <td>&lt;nfd version&gt;</td> </tr> <tr> <td>IMAGE_EXTRA_TAG_NAMES</td> <td>Additional container image tag(s) to create when building image</td> <td><em>empty</em></td> </tr> <tr> <td>K8S_NAMESPACE</td> <td>nfd-master and nfd-worker namespace</td> <td>node-feature-discovery</td> </tr> <tr> <td>KUBECONFIG</td> <td>Kubeconfig for running e2e-tests</td> <td><em>empty</em></td> </tr> <tr> <td>E2E_TEST_CONFIG</td> <td>Parameterization file of e2e-tests (see <a href="https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.10.1/test/e2e/e2e-test-config.exapmle.yaml">example</a>)</td> <td><em>empty</em></td> </tr> <tr> <td>OPENSHIFT</td> <td>Non-empty value enables OpenShift specific support (currently only effective in e2e tests)</td> <td><em>empty</em></td> </tr> <tr> <td>BASE_IMAGE_FULL</td> <td>Container base image for target image full (target full)</td> <td>debian:buster-slim</td> </tr> <tr> <td>BASE_IMAGE_MINIMAL</td> <td>Container base image for target image minimal (target minimal)</td> <td>gcr.io/distroless/base</td> </tr> </tbody> </table> <p>For example, to use a custom registry:</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code>make <span class="nv">IMAGE_REGISTRY</span><span class="o">=</span>&lt;my custom registry uri&gt;
</code></pre> </div></div> <p>Or to specify a build tool different from Docker, It can be done in 2 ways:</p> <ol> <li> <p>via environment</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code> <span class="nv">IMAGE_BUILD_CMD</span><span class="o">=</span><span class="s2">"buildah bud"</span> make
</code></pre> </div> </div> </li> <li> <p>by overriding the variable value</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code> make <span class="nv">IMAGE_BUILD_CMD</span><span class="o">=</span><span class="s2">"buildah bud"</span>
</code></pre> </div> </div> </li> </ol> <h3 id="testing">Testing</h3> <p>Unit tests are automatically run as part of the container image build. You can also run them manually in the source code tree by simply running:</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code>make <span class="nb">test</span>
</code></pre> </div></div> <p>End-to-end tests are built on top of the e2e test framework of Kubernetes, and, they required a cluster to run them on. For running the tests on your test cluster you need to specify the kubeconfig to be used:</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code>make e2e-test <span class="nv">KUBECONFIG</span><span class="o">=</span><span class="nv">$HOME</span>/.kube/config
</code></pre> </div></div> <h2 id="running-locally">Running locally</h2> <p>You can run NFD locally, either directly on your host OS or in containers for testing and development purposes. This may be useful e.g. for checking features-detection.</p> <h3 id="nfd-master">NFD-Master</h3> <p>When running as a standalone container labeling is expected to fail because Kubernetes API is not available. Thus, it is recommended to use <code class="language-plaintext highlighter-rouge notranslate">-no-publish</code> command line flag. E.g.</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">export </span><span class="nv">NFD_CONTAINER_IMAGE</span><span class="o">=</span>k8s.gcr.io/nfd/node-feature-discovery:v0.10.1
<span class="nv">$ </span>docker run <span class="nt">--rm</span> <span class="nt">--name</span><span class="o">=</span>nfd-test <span class="k">${</span><span class="nv">NFD_CONTAINER_IMAGE</span><span class="k">}</span> nfd-master <span class="nt">-no-publish</span>
2019/02/01 14:48:21 Node Feature Discovery Master &lt;NFD_VERSION&gt;
2019/02/01 14:48:21 gRPC server serving on port: 8080
</code></pre> </div></div> <h3 id="nfd-worker">NFD-Worker</h3> <p>In order to run nfd-worker as a "stand-alone" container against your standalone nfd-master you need to run them in the same network namespace:</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>docker run <span class="nt">--rm</span> <span class="nt">--network</span><span class="o">=</span>container:nfd-test <span class="k">${</span><span class="nv">NFD_CONTAINER_IMAGE</span><span class="k">}</span> nfd-worker
2019/02/01 14:48:56 Node Feature Discovery Worker &lt;NFD_VERSION&gt;
...
</code></pre> </div></div> <p>If you just want to try out feature discovery without connecting to nfd-master, pass the <code class="language-plaintext highlighter-rouge notranslate">-no-publish</code> flag to nfd-worker.</p> <p><strong>NOTE</strong> Some feature sources need certain directories and/or files from the host mounted inside the NFD container. Thus, you need to provide Docker with the correct <code class="language-plaintext highlighter-rouge notranslate">--volume</code> options in order for them to work correctly when run stand-alone directly with <code class="language-plaintext highlighter-rouge notranslate">docker run</code>. See the <a href="https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.10.1/deployment/components/common/worker-mounts.yaml">default deployment</a> for up-to-date information about the required volume mounts.</p> <h3 id="nfd-topology-updater">NFD-Topology-Updater</h3> <p>In order to run nfd-topology-updater as a "stand-alone" container against your standalone nfd-master you need to run them in the same network namespace:</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>docker run <span class="nt">--rm</span> <span class="nt">--network</span><span class="o">=</span>container:nfd-test <span class="k">${</span><span class="nv">NFD_CONTAINER_IMAGE</span><span class="k">}</span> nfd-topology-updater
2019/02/01 14:48:56 Node Feature Discovery Topology Updater &lt;NFD_VERSION&gt;
...
</code></pre> </div></div> <p>If you just want to try out feature discovery without connecting to nfd-master, pass the <code class="language-plaintext highlighter-rouge notranslate">-no-publish</code> flag to nfd-topology-updater.</p> <p>NOTE:</p> <p>NFD topology updater needs certain directories and/or files from the host mounted inside the NFD container. Thus, you need to provide Docker with the correct <code class="language-plaintext highlighter-rouge notranslate">--volume</code> options in order for them to work correctly when run stand-alone directly with <code class="language-plaintext highlighter-rouge notranslate">docker run</code>. See the <a href="https://github.com/kubernetes-sigs/node-feature-discovery/blob/v0.10.1/deployment/components/topology-updater/topologyupdater-mounts.yaml">template spec</a> for up-to-date information about the required volume mounts.</p> <p><a href="https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#monitoring-device-plugin-resources">PodResource API</a> is a prerequisite for nfd-topology-updater. Preceding Kubernetes v1.23, the <code class="language-plaintext highlighter-rouge notranslate">kubelet</code> must be started with the following flag: <code class="language-plaintext highlighter-rouge notranslate">--feature-gates=KubeletPodResourcesGetAllocatable=true</code>. Starting Kubernetes v1.23, the <code class="language-plaintext highlighter-rouge notranslate">GetAllocatableResources</code> is enabled by default through <code class="language-plaintext highlighter-rouge notranslate">KubeletPodResourcesGetAllocatable</code> <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates">feature gate</a>.</p> <h2 id="documentation">Documentation</h2> <p>All documentation resides under the <a href="https://github.com/kubernetes-sigs/node-feature-discovery/tree/v0.10.1/docs">docs</a> directory in the source tree. It is designed to be served as a html site by <a href="https://pages.github.com/">GitHub Pages</a>.</p> <p>Building the documentation is containerized in order to fix the build environment. The recommended way for developing documentation is to run:</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code>make site-serve
</code></pre> </div></div> <p>This will build the documentation in a container and serve it under <a href="http://localhost:4000/">localhost:4000/</a> making it easy to verify the results. Any changes made to the <code class="language-plaintext highlighter-rouge notranslate">docs/</code> will automatically re-trigger a rebuild and are reflected in the served content and can be inspected with a simple browser refresh.</p> <p>In order to just build the html documentation run:</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code>make site-build
</code></pre> </div></div> <p>This will generate html documentation under <code class="language-plaintext highlighter-rouge notranslate">docs/_site/</code>.</p> <!-- Links --> </div> </div> <div class="navigation-bottom d-flex flex-justify-between py-3" role="navigation" aria-label="footer navigation"> <div class="prev"></div> <div class="next"><a href="/node-feature-discovery/v0.10/advanced/master-commandline-reference.html" class="btn" title="Master cmdline reference" accesskey="n" rel="next"> Next <i class="fa fa-arrow-circle-right"></i> </a></div> </div><hr> <div class="copyright text-center text-gray" role="contentinfo"> <i class="fa fa-copyright"></i> <span class="time">2016-2023,</span> <a class="text-gray" href="https://github.com/kubernetes-sigs" rel="noreferrer" target="_blank">Kubernetes SIGs</a> Revision <a class="text-gray" href="https://github.com/kubernetes-sigs/node-feature-discovery/commit/" title="" rel="noreferrer" target="_blank"></a> <br> <div class="generator"> Built with <a href="https://pages.github.com" rel="noreferrer" target="_blank" title="github-pages v209">GitHub Pages</a> using a <a href="https://github.com/rundocs/jekyll-rtd-theme" rel="noreferrer" target="_blank" title="rundocs/jekyll-rtd-theme v2.0.10">theme</a> provided by <a href="https://rundocs.io" rel="noreferrer" target="_blank">RunDocs</a>. </div> </div> </div> </div> <div class="addons-wrap d-flex flex-column overflow-y-auto"> <div class="status d-flex flex-justify-between p-2"> <div class="title p-1"> <i class="fa fa-book"></i> Node Feature Discovery </div> <div class="branch p-1"> <span class="name"> v0.10 </span> <i class="fa fa-caret-down"></i> </div> </div> <div class="addons d-flex flex-column height-full p-2 d-none"> <dl id="versions"> <dt>Versions</dt> <script src="/node-feature-discovery/versions.js"></script> <script> var dt = document.getElementById('versions'); var items = getVersionListItems(); for (var i=0; i < items.length; i++) { var dd = document.createElement('dd'); var a = dd.appendChild(document.createElement('a')); a.appendChild(document.createTextNode(items[i].name)); a.href = items[i].url; dt.appendChild(dd); } </script> </dl> <dl> <dt>GitHub</dt> <dd> <a href="https://github.com/kubernetes-sigs/node-feature-discovery" title="Stars: 587"> <i class="fa fa-github"></i> Homepage </a> </dd> <dd> <a href="https://github.com/kubernetes-sigs/node-feature-discovery/issues" title="Open issues: 29"> <i class="fa fa-question-circle-o"></i> Issues </a> </dd> <dd> <a href="https://github.com/kubernetes-sigs/node-feature-discovery/zipball/gh-pages" title="Size: 91075 Kb"> <i class="fa fa-download"></i> Download </a> </dd> </dl> <hr> <div class="license f6 pb-2"> This <a href="/node-feature-discovery/v0.10/" title="Node Feature Discovery">Software</a> is under the terms of <a href="https://github.com/kubernetes-sigs/node-feature-discovery">Apache License 2.0</a>. </div> </div> </div> <script src="https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@2.0.10/assets/js/jquery.min.js"></script><script src="https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@2.0.10/assets/js/theme.min.js"></script> </body> </html>