Skip to content

Commit

Permalink
docs: Raw conversion / fixes to pass doc generation
Browse files Browse the repository at this point in the history
This is just a raw conversion and fixes so that "make docs"
will pass and generate the documentation. Subsequent commits
will do more changes to the actual content.

Signed-off-by: Jukka Rissanen <[email protected]>
  • Loading branch information
jukkar authored and klihub committed Jun 12, 2023
1 parent 9451956 commit de85a6a
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 796 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ report-licenses:

html: clean-html
$(Q)BUILD_VERSION=$(BUILD_VERSION) \
$(SPHINXBUILD) -c docs docs "$(SITE_BUILDDIR)" $(SPHINXOPTS)
$(SPHINXBUILD) -c docs . "$(SITE_BUILDDIR)" $(SPHINXOPTS)
cp docs/index.html "$(SITE_BUILDDIR)"
for d in $$(find docs -name figures -type d); do \
mkdir -p $(SITE_BUILDDIR)/$$d && cp $$d/* $(SITE_BUILDDIR)/$$d; \
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ def gomod_versions(modules):
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', '.github', '_work', 'generate', 'README.md', 'TODO.md', 'SECURITY.md', 'CODE-OF-CONDUCT.md', 'docs/releases', 'test/self-hosted-runner/README.md', 'test/e2e/README.md']


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down
60 changes: 18 additions & 42 deletions docs/developers-guide/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,10 @@ The node agent is a component external to CRI-RM itself. All interactions
by CRI-RM with the Kubernetes Control Plane go through the node agent with
the node agent performing any direct interactions on behalf of CRI-RM.

The node agent communicates with CRI-RM using two gRPC interfaces. The
[config interface](/pkg/cri/resource-manager/config/api/v1/) is used to:
The node agent communicates with NRI-RM via goroutine. The API is used to:
- push updated external configuration data to CRI-RM
- push adjustments to container resource assignments to CRI-RM

The [cluster interface](/pkg/agent/api/v1/) implements the necessary
low-level plumbing for the agent interface CRI-RM internally exposes
for its policies and other components. This interface in turn implements
the following:
The agent interface implements the following:
- updating resource capacity of the node
- getting, setting, or removing labels on the node
- getting, setting, or removing annotations on the node
Expand All @@ -87,7 +82,7 @@ the following:
The config interface is defined and has its gRPC server running in
CRI-RM. The agent acts as a gRPC client for this interface. The low-level
cluster interface is defined and has its gRPC server running in the agent,
with the [convenience layer](/pkg/cri/resource-manager/agent) defined in
with the [convenience layer](/pkg/agent) defined in
CRI-RM. CRI-RM acts as a gRPC client for the low-level plumbing interface.

Additionally, the stock node agent that comes with CRI-RM implements schemes
Expand All @@ -101,7 +96,7 @@ for:
</p>


### [Resource Manager](/pkg/cri/resource-manager/)
### [Resource Manager](/pkg/resmgr/)

CRI-RM implements a request processing pipeline and an event processing
pipeline.
Expand Down Expand Up @@ -172,7 +167,7 @@ following, based on the event type:
4. Release the pipeline lock.


### [Cache](/pkg/cri/resource-manager/cache/)
### [Cache](/pkg/cache/)

The cache is a shared internal storage location within CRI-RM. It tracks the
runtime state of pods and containers known to CRI-RM, as well as the state
Expand Down Expand Up @@ -206,14 +201,14 @@ the policy's event handler with the injected event as an argument and with
the cache properly locked.


### [Generic Policy Layer](/pkg/cri/resource-manager/policy/policy.go)
### [Generic Policy Layer](/pkg/policy/policy.go)

The generic policy layer defines the abstract interface the rest of CRI-RM
uses to interact with policy implementations and takes care of the details
of activating and dispatching calls through to the configured active policy.


### [Generic Resource Controller Layer](/pkg/cri/resource-manager/control/control.go)
### [Generic Resource Controller Layer](/pkg/control/control.go)

The generic resource controller layer defines the abstract interface the rest
of CRI-RM uses to interact with resource controller implementations and takes
Expand All @@ -230,56 +225,37 @@ resources is and to attempt a rebalancing/reallocation if it is deemed
both possible and necessary.


### [Policy Implementations](/pkg/cri/resource-manager/policy/builtin/)
### [Policy Implementations](/cmd/)

#### [None](/pkg/cri/resource-manager/policy/builtin/none/)

An empty policy that makes no policy decisions. It is included
merely for the sake of completeness, analoguous to the none policy of the
CPU Manager in kubelet.

#### [Static Pools](/pkg/cri/resource-manager/policy/builtin/static-pools/)

A backward-compatible reimplementation of
[CMK](https://github.com/intel/CPU-Manager-for-Kubernetes)
for CRI-RM with a few extra features.

#### [Static](/pkg/cri/resource-manager/policy/builtin/static/)

Part of the code from the static policy of CPU Manager in kubelet, that has
been brutally hacked to work within CRI-RM. Serves merely as a
proof-of-concept that the current policies of kubelet can be implemented in
CRI-RM.

#### [Static Plus](/pkg/cri/resource-manager/policy/builtin/static-plus/)

A fairly simplistic policy similar in spirit to the static policy of
CPU Manager in kubelet, with a few extra features.

#### [Topology Aware](/pkg/cri/resource-manager/policy/builtin/topology-aware/)
#### [Topology Aware](/cmd/topology-aware/)

A topology-aware policy capable of handling multiple tiers/types of memory,
typically a DRAM/PMEM combination configured in 2-layer memory mode.

### [Resource Controller Implementations](/pkg/cri/resource-manager/control/)
#### [Balloons](/cmd/balloons/)

A balloons policy allows user to define fine grained control how the
computer resources are distributed to workloads.

### [Resource Controller Implementations](/pkg/control/)

#### [Intel RDT](/pkg/cri/resource-manager/control/rdt/)
#### [Intel RDT](/pkg/control/rdt/)

A resource controller implementation responsible for the practical details of
associating a container with Intel RDT classes. This class effectively
determines how much last level cache and memory bandwidth will be available
for the container. This controller uses the resctrl pseudo filesystem of the
Linux kernel for control.

#### [Block I/O](/pkg/cri/resource-manager/control/blockio/)
#### [Block I/O](/pkg/control/blockio/)

A resource controller implementation responsible for the practical details of
associating a container with a Block I/O class. This class effectively
determines how much Block I/O bandwidth will be available for the container.
This controller uses the blkio cgroup controller and the cgroupfs pseudo-
filesystem of the Linux kernel for control.

#### [CRI](/pkg/cri/resource-manager/control/cri/)
#### [CRI](/pkg/control/cri/)

A resource controller responsible for modifying intercepted CRI container
creation requests and creating CRI container resource update requests,
Expand Down
20 changes: 0 additions & 20 deletions docs/developers-guide/cri-test.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/developers-guide/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ Testing
:maxdepth: 1

unit-test.md
cri-test.md
e2e-test.md
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Welcome to CRI Resource Manager's documentation!
setup.md
policy/index.rst
node-agent.md
webhook.md

developers-guide/index.rst

Expand Down
13 changes: 3 additions & 10 deletions docs/node-agent.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
# Node Agent

CRI Resource Manager can be configured dynamically using the CRI Resource
Manager Node Agent and Kubernetes\* ConfigMaps. The agent can be build using
the [provided Dockerfile](/cmd/cri-resmgr-agent/Dockerfile). It can be
deployed as a `DaemonSet` in the cluster using the
[provided deployment file](/cmd/cri-resmgr-agent/agent-deployment.yaml).

To run the agent manually or as a `systemd` service, set the environment
variable `NODE_NAME` to the name of the cluster node the agent is running
on. If necessary pass it the credentials for accessing the cluster using
the `-kubeconfig <file>` command line option.
Manager Node Agent and Kubernetes\* ConfigMaps. The agent is built in the
NRI resource plugin.

The agent monitors two ConfigMaps for the node, a primary node-specific one
and a secondary group-specific or default one, depending on whether the node
Expand All @@ -30,7 +23,7 @@ the configuration group. You can remove a node from its group by deleting
the node group label.

There is a
[sample ConfigMap spec](/sample-configs/cri-resmgr-configmap.example.yaml)
[sample ConfigMap spec](/sample-configs/nri-resmgr-configmap.example.yaml)
that contains a node-specific, a group-specific, and a default ConfigMap
example. See [any available policy-specific documentation](policy/index.rst)
for more information on the policy configurations.
4 changes: 0 additions & 4 deletions docs/policy/blockio.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@ CRI Resource Manager applies block IO contoller parameters to pods via
## Configuration

See [sample blockio configuration](/sample-configs/blockio.cfg).

## Demo

See [Block IO demo](../demos/blockio.md)
4 changes: 2 additions & 2 deletions docs/policy/cpu-allocator.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

CRI Resource Manager has a separate CPU allocator component that helps policies
make educated allocation of CPU cores for workloads. Currently all policies
except for [static-pools](static-pools.md) utilize the built-in CPU allocator.
See policy specific documentation for more details.
utilize the built-in CPU allocator. See policy specific documentation for more
details.

## Topology Based Allocation

Expand Down
116 changes: 0 additions & 116 deletions docs/policy/dynamic-pools.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/policy/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ Policies
:maxdepth: 1

topology-aware.md
static-pools.md
balloons.md
podpools.md
container-affinity.md
blockio.md
rdt.md
cpu-allocator.md
dynamic-pools.md
Loading

0 comments on commit de85a6a

Please sign in to comment.