From 18ffd2a06d68743d90196224c72c0b585f19488f Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Mon, 2 Nov 2020 10:48:17 +0200 Subject: [PATCH 1/2] docs: fix broken refs --- docs/advanced/developer-guide.md | 11 +++++++---- docs/get-started/deployment-and-usage.md | 8 ++------ docs/get-started/features.md | 7 ++++--- docs/get-started/index.md | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/advanced/developer-guide.md b/docs/advanced/developer-guide.md index 4c8717458..50e4bb0d3 100644 --- a/docs/advanced/developer-guide.md +++ b/docs/advanced/developer-guide.md @@ -106,7 +106,7 @@ makefile overrides. | IMAGE_EXTRA_TAG_NAMES | Additional container image tag(s) to create when building image | *empty* | K8S_NAMESPACE | nfd-master and nfd-worker namespace | kube-system | KUBECONFIG | Kubeconfig for running e2e-tests | *empty* -| E2E_TEST_CONFIG | Parameterization file of e2e-tests (see [example](test/e2e/e2e-test-config.exapmle.yaml)) | *empty* +| E2E_TEST_CONFIG | Parameterization file of e2e-tests (see [example][e2e-config-sample]) | *empty* For example, to use a custom registry: @@ -277,9 +277,10 @@ for up-to-date information about the required volume mounts. ## Documentation -All documentation resides under the [docs](/docs) directory in the source tree. -It is designed to be served as a html site by [GitHub -Pages](https://pages.github.com/). +All documentation resides under the +[docs](https://github.com/kubernetes-sigs/node-feature-discovery/tree/master/docs) +directory in the source tree. It is designed to be served as a html site by +[GitHub Pages](https://pages.github.com/). Building the documentation is containerized in order to fix the build environment. The recommended way for developing documentation is to run: @@ -302,3 +303,5 @@ make site-build This will generate html documentation under `docs/_site/`. + +[e2e-config-sample]: https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/test/e2e/e2e-test-config.exapmle.yaml diff --git a/docs/get-started/deployment-and-usage.md b/docs/get-started/deployment-and-usage.md index 983025b55..de384f6af 100644 --- a/docs/get-started/deployment-and-usage.md +++ b/docs/get-started/deployment-and-usage.md @@ -103,7 +103,7 @@ node(s) will run extra job instance(s) to satisfy the request. If you want to use the latest development version (master branch) you need to build your own custom image. -See the [Developer Guide](/advanced/developer-guide) for instructions how to +See the [Developer Guide](../advanced/developer-guide) for instructions how to build images and deploy them on your cluster. ## Usage @@ -219,10 +219,6 @@ file must be used, i.e. JSON (or YAML). For example: Configuration options specified from the command line will override those read from the config file. -Currently, the only available configuration options are related to the -[CPU](#cpu-features), [PCI](#pci-features) and [Kernel](#kernel-features) -feature sources. - ## Using Node Labels Nodes with specific features can be targeted using the `nodeSelector` field. The @@ -244,7 +240,7 @@ spec: ``` For more details on targeting nodes, see -[node selection](https://kubernetes.io/docs/tasks/tools/install-kubectl). +[node selection](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). ## Uninstallation diff --git a/docs/get-started/features.md b/docs/get-started/features.md index 55b1d021d..d9fa5c4a0 100644 --- a/docs/get-started/features.md +++ b/docs/get-started/features.md @@ -72,7 +72,7 @@ The (sub-)set of CPUID attributes to publish is configurable via the If whitelist is specified, only whitelisted attributes will be published. With blacklist, only blacklisted attributes are filtered out. `attributeWhitelist` has priority over `attributeBlacklist`. For examples and more information -about configurability, see [Configuration Options](#configuration-options). +about configurability, see [configuration](deployment-and-usage#configuration). By default, the following CPUID flags have been blacklisted: BMI1, BMI2, CLMUL, CMOV, CX16, ERMS, F16C, HTT, LZCNT, MMX, MMXEXT, NX, POPCNT, RDRAND, RDSEED, RDTSCP, SGX, SSE, SSE2, SSE3, SSE4.1, SSE4.2 and SSSE3. @@ -385,7 +385,8 @@ The **kernel** feature source supports the following labels: Kernel config file to use, and, the set of config options to be detected are configurable. -See [configuration options](#configuration-options) for more information. +See [configuration](deployment-and-usage#configuration) for +more information. ### Memory @@ -445,7 +446,7 @@ example label using the default label fields: feature.node.kubernetes.io/usb-fe_1a6e_089a.present=true ``` -See [configuration options](#configuration-options) for more information on NFD +See [configuration](deployment-and-usage#configuration) for more information on NFD config. ### Storage diff --git a/docs/get-started/index.md b/docs/get-started/index.md index 79a480018..c68320ffe 100644 --- a/docs/get-started/index.md +++ b/docs/get-started/index.md @@ -11,10 +11,10 @@ features and system configuration! Continue to: -- **[Introduction](get-started/introduction.md)** for more details on the +- **[Introduction](introduction.md)** for more details on the project. -- **[Quick start](get-started/quick-start.md)** for quick step-by-step +- **[Quick start](quick-start.md)** for quick step-by-step instructions on how to get NFD running on your cluster. ## Quick-start -- the short-short version From 7b8e85c4eab43af9735c9431166f71d1d254763d Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Mon, 2 Nov 2020 11:08:49 +0200 Subject: [PATCH 2/2] docs: fixup site baseurl setting Change build configuration related to site baseurl and Jekyll output directory a bit. Making it more coherent e.g. by removing the need to override baseurl for 'site-serve' makefile target. --- Makefile | 7 ++++--- scripts/github/update-gh-pages.sh | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8104c42d0..f2c38e105 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,9 @@ SITE_BUILD_CMD := $(CONTAINER_RUN_CMD) --rm -i -u "`id -u`:`id -g`" \ --volume="$$PWD/docs:/srv/jekyll" \ --volume="$$PWD/docs/vendor/bundle:/usr/local/bundle" \ --network=host jekyll/jekyll:$(JEKYLL_VERSION) -SITE_SUBDIR ?= -JEKYLL_OPTS := -d _site/$(SITE_SUBDIR) -b /node-feature-discovery/$(SITE_SUBDIR) +SITE_BASEURL ?= +SITE_DESTDIR ?= _site +JEKYLL_OPTS := -d '$(SITE_DESTDIR)' $(if $(SITE_BASEURL),-b '$(SITE_BASEURL)',) VERSION := $(shell git describe --tags --dirty --always) @@ -127,4 +128,4 @@ site-build: site-serve: @mkdir -p docs/vendor/bundle - $(SITE_BUILD_CMD) sh -c "bundle install && jekyll serve $(JEKYLL_OPTS) -H 127.0.0.1 -b ''" + $(SITE_BUILD_CMD) sh -c "bundle install && jekyll serve $(JEKYLL_OPTS) -H 127.0.0.1" diff --git a/scripts/github/update-gh-pages.sh b/scripts/github/update-gh-pages.sh index f505d5335..1cac2d3dd 100755 --- a/scripts/github/update-gh-pages.sh +++ b/scripts/github/update-gh-pages.sh @@ -99,9 +99,11 @@ fi # Default to 'master' if no subdir was given and we couldn't parse # it -export SITE_SUBDIR=${site_subdir:-master} -echo "Updating site subdir: '$SITE_SUBDIR'" +site_subdir=${site_subdir:-master} +echo "Updating site subdir: '$site_subdir'" +export SITE_DESTDIR="_site/$site_subdir" +export SITE_BASEURL="/node-feature-discovery/$site_subdir" export JEKYLL_ENV=production make site-build