Fix some layout issues in 12-15 blog

This commit is contained in:
windsonsea 2023-01-11 12:48:17 +08:00 committed by Michael
parent dc94157288
commit 8bffe524aa
1 changed files with 26 additions and 26 deletions

View File

@ -19,11 +19,11 @@ Third-party resource drivers are responsible for interpreting these parameters
as well as tracking and allocating resources as requests come in. as well as tracking and allocating resources as requests come in.
Dynamic resource allocation is an *alpha feature* and only enabled when the Dynamic resource allocation is an *alpha feature* and only enabled when the
`DynamicResourceAllocation` [feature `DynamicResourceAllocation`
gate](/docs/reference/command-line-tools-reference/feature-gates/) and the [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) and the
`resource.k8s.io/v1alpha1` {{< glossary_tooltip text="API group" `resource.k8s.io/v1alpha1`
term_id="api-group" >}} are enabled. For details, see the {{< glossary_tooltip text="API group" term_id="api-group" >}} are enabled. For details,
`--feature-gates` and `--runtime-config` [kube-apiserver see the `--feature-gates` and `--runtime-config` [kube-apiserver
parameters](/docs/reference/command-line-tools-reference/kube-apiserver/). parameters](/docs/reference/command-line-tools-reference/kube-apiserver/).
The kube-scheduler, kube-controller-manager and kubelet components all need The kube-scheduler, kube-controller-manager and kubelet components all need
the feature gate enabled as well. the feature gate enabled as well.
@ -39,8 +39,8 @@ for end-to-end testing, but also can be run manually. See
## API ## API
The new `resource.k8s.io/v1alpha1` {{< glossary_tooltip text="API group" The new `resource.k8s.io/v1alpha1` {{< glossary_tooltip text="API group" term_id="api-group" >}}
term_id="api-group" >}} provides four new types: provides four new types:
ResourceClass ResourceClass
: Defines which resource driver handles a certain kind of : Defines which resource driver handles a certain kind of
@ -89,7 +89,7 @@ will get created for this Pod and each container gets access to one of them.
Assuming a resource driver called `resource-driver.example.com` was installed Assuming a resource driver called `resource-driver.example.com` was installed
together with the following resource class: together with the following resource class:
``` ```yaml
apiVersion: resource.k8s.io/v1alpha1 apiVersion: resource.k8s.io/v1alpha1
kind: ResourceClass kind: ResourceClass
name: resource.example.com name: resource.example.com
@ -151,8 +151,7 @@ spec:
In contrast to native resources (such as CPU or RAM) and In contrast to native resources (such as CPU or RAM) and
[extended resources](/docs/concepts/configuration/manage-resources-containers/#extended-resources) [extended resources](/docs/concepts/configuration/manage-resources-containers/#extended-resources)
(managed by a (managed by a device plugin, advertised by kubelet), the scheduler has no knowledge of what
device plugin, advertised by kubelet), the scheduler has no knowledge of what
dynamic resources are available in a cluster or how they could be split up to dynamic resources are available in a cluster or how they could be split up to
satisfy the requirements of a specific ResourceClaim. Resource drivers are satisfy the requirements of a specific ResourceClaim. Resource drivers are
responsible for that. Drivers mark ResourceClaims as _allocated_ once resources responsible for that. Drivers mark ResourceClaims as _allocated_ once resources
@ -227,8 +226,8 @@ It is up to the driver developer to decide how these two components
communicate. The [KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/3063-dynamic-resource-allocation/README.md) outlines an [approach using communicate. The [KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/3063-dynamic-resource-allocation/README.md) outlines an [approach using
CRDs](https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/3063-dynamic-resource-allocation#implementing-a-plugin-for-node-resources). CRDs](https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/3063-dynamic-resource-allocation#implementing-a-plugin-for-node-resources).
Within SIG Node, we also plan to provide a complete [example Within SIG Node, we also plan to provide a complete
driver](https://github.com/kubernetes-sigs/dra-example-driver) that can serve [example driver](https://github.com/kubernetes-sigs/dra-example-driver) that can serve
as a template for other drivers. as a template for other drivers.
## Running the test driver ## Running the test driver
@ -259,15 +258,16 @@ $ RUNTIME_CONFIG=resource.k8s.io/v1alpha1 \
PATH=$(pwd)/third_party/etcd:$PATH \ PATH=$(pwd)/third_party/etcd:$PATH \
./hack/local-up-cluster.sh -O ./hack/local-up-cluster.sh -O
... ...
To start using your cluster, you can open up another terminal/tab and run:
export KUBECONFIG=/var/run/kubernetes/admin.kubeconfig
...
``` ```
Once the cluster is up, in another To start using your cluster, you can open up another terminal/tab and run:
terminal run the test driver controller. `KUBECONFIG` must be set for all of
the following commands. ```console
$ export KUBECONFIG=/var/run/kubernetes/admin.kubeconfig
```
Once the cluster is up, in another terminal run the test driver controller.
`KUBECONFIG` must be set for all of the following commands.
```console ```console
$ go run ./test/e2e/dra/test-driver --feature-gates ContextualLogging=true -v=5 controller $ go run ./test/e2e/dra/test-driver --feature-gates ContextualLogging=true -v=5 controller