Skip to content

Add noderef controller documentation to gitbook #1066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/book/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* [Machine Controller](common_code/machine_controller.md)
* [MachineSet Controller](common_code/machineset_controller.md)
* [MachineDeployment Controller](common_code/machinedeployment_controller.md)
* [NodeRef Controller](common_code/noderef_controller.md)
* [Node Controller](common_code/node_controller.md)

## Creating a New Provider
Expand Down
7 changes: 5 additions & 2 deletions docs/book/common_code/node_controller.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Node Controller

> NOTE: This controller is deprecated and going to be removed in v1alpha2,
> infrastructure providers should switch to noderef controller.

The node controller has one simple job. It links or unlinks a `Machine` to the underlying
core k8s `Node` object if an optional annotation `cluster.k8s.io/machine` is present on the `Node`. The
decision to add the annotation is left to each infrastructure-specific provider. When the
Expand All @@ -8,7 +11,7 @@ objectRef.

The simplest way for Infrastructure-specific providers to add this support is to annotate
nodes in their node bootup script as part of the `kubeadm join` operation (via a commandline
parameter).
parameter).

## Node Controller Semantics

Expand All @@ -19,4 +22,4 @@ deletion, it unlinks the `Node` from the `Machine`.

#### node reconciliation logic

![node object reconciliation logic](images/activity_node_reconciliation.svg)
![node object reconciliation logic](images/activity_node_reconciliation.svg)
8 changes: 8 additions & 0 deletions docs/book/common_code/noderef_controller.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# NodeRef Controller

The NodeRef controller populates a `Machine`'s `Status.NodeRef` field using the Kubernetes Node
object associated with the Machine. This controller supports only machines linked to a cluster.

Infrastructure providers can opt-in to use this controller by providing a `kubeconfig` as a Kubernetes Secret.
The secret must be stored in the namespace the Cluster lives in and named as `<cluster-name>-kubeconfig`,
the data should only contain a single key called `value` and its data should be a valid Kubernetes `kubeconfig`.