Skip to content
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

Update host endpoint controller configuration #1933

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions calico/network-policy/hosts/kubernetes-nodes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
$[prodname] will ensure these managed host endpoints maintain the same labels and IP addresses as its node by periodic syncs.
This means that policy targeting these automatic host endpoints will function correctly with the policy put in place to select those nodes, even if over time the node's IPs or labels change.

$[prodname] is also able to create and manage custom host endpoints for nodes, based on user specified templates.

Check failure on line 31 in calico/network-policy/hosts/kubernetes-nodes.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'prodname'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'prodname'?", "location": {"path": "calico/network-policy/hosts/kubernetes-nodes.mdx", "range": {"start": {"line": 31, "column": 3}}}, "severity": "ERROR"}
This allows you to fine tune which interfaces should be included in the host endpoint and for which nodes these host endpoints should be created. The host endpoint templates can be enabled by updating [KubeControllersConfig](../../reference/resources/kubecontrollersconfig)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This allows you to fine tune which interfaces should be included in the host endpoint and for which nodes these host endpoints should be created. The host endpoint templates can be enabled by updating [KubeControllersConfig](../../reference/resources/kubecontrollersconfig)
This allows you to fine-tune which interfaces should be included in the host endpoint and for which nodes these host endpoints should be created.
The host endpoint templates can be enabled by updating [KubeControllersConfig](../../reference/resources/kubecontrollersconfig.mdx).


Automatic host endpoints are differentiated from other host endpoints by the label `projectcalico.org/created-by: calico-kube-controllers`.
Enable or disable automatic host endpoints by configuring the default KubeControllersConfiguration resource.

Expand Down
36 changes: 30 additions & 6 deletions calico/reference/resources/kubecontrollersconfig.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

# Kubernetes controllers configuration

import Selectors from '@site/calico/_includes/content/_selectors.mdx';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, please move to between the front matter and H1.


A $[prodname] [Kubernetes controllers](../kube-controllers/configuration.mdx) configuration resource (`KubeControllersConfiguration`) represents configuration options for the $[prodname] Kubernetes controllers.

## Sample YAML
Expand All @@ -25,6 +27,7 @@
syncLabels: Enabled
hostEndpoint:
autoCreate: Disabled
createDefaultHostEndpoint: Enabled
policy:
reconcilerPeriod: 5m
workloadEndpoint:
Expand Down Expand Up @@ -73,16 +76,37 @@

| Field | Description | Accepted Values | Schema | Default |
| ---------------- | --------------------------------------------------------------------------------- | ----------------- | --------------------------------- | ------- |
| reconcilerPeriod | Period to perform reconciliation with the $[prodname] datastore | | [Duration string][parse-duration] | 5m |
| syncLabels | When enabled, Kubernetes node labels will be copied to $[prodname] node objects. | Enabled, Disabled | string | Enabled |
| hostEndpoint | Controls allocation of host endpoints | | [HostEndpoint](#hostendpoint) | |
| reconcilerPeriod | Period to perform reconciliation with the $[prodname] datastore | | [Duration string][parse-duration] | 5m |

Check failure on line 79 in calico/reference/resources/kubecontrollersconfig.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'reconcilerPeriod'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'reconcilerPeriod'?", "location": {"path": "calico/reference/resources/kubecontrollersconfig.mdx", "range": {"start": {"line": 79, "column": 3}}}, "severity": "ERROR"}

Check failure on line 79 in calico/reference/resources/kubecontrollersconfig.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'prodname'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'prodname'?", "location": {"path": "calico/reference/resources/kubecontrollersconfig.mdx", "range": {"start": {"line": 79, "column": 66}}}, "severity": "ERROR"}

Check failure on line 79 in calico/reference/resources/kubecontrollersconfig.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'datastore'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'datastore'?", "location": {"path": "calico/reference/resources/kubecontrollersconfig.mdx", "range": {"start": {"line": 79, "column": 76}}}, "severity": "ERROR"}
| syncLabels | When enabled, Kubernetes node labels will be copied to $[prodname] node objects. | Enabled, Disabled | string | Enabled |

Check failure on line 80 in calico/reference/resources/kubecontrollersconfig.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'syncLabels'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'syncLabels'?", "location": {"path": "calico/reference/resources/kubecontrollersconfig.mdx", "range": {"start": {"line": 80, "column": 3}}}, "severity": "ERROR"}

Check failure on line 80 in calico/reference/resources/kubecontrollersconfig.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'prodname'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'prodname'?", "location": {"path": "calico/reference/resources/kubecontrollersconfig.mdx", "range": {"start": {"line": 80, "column": 79}}}, "severity": "ERROR"}
| hostEndpoint | Configure the host endpoint controller | | [HostEndpoint](#hostendpoint) | |

Check failure on line 81 in calico/reference/resources/kubecontrollersconfig.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'hostEndpoint'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'hostEndpoint'?", "location": {"path": "calico/reference/resources/kubecontrollersconfig.mdx", "range": {"start": {"line": 81, "column": 3}}}, "severity": "ERROR"}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| hostEndpoint | Configure the host endpoint controller | | [HostEndpoint](#hostendpoint) | |
| hostEndpoint | Configures the host endpoint controller | | [HostEndpoint](#hostendpoint) | |

| leakGracePeriod | Grace period to use when garbage collecting suspected leaked IP addresses. | | [Duration string][parse-duration] | 15m |

### HostEndpoint

| Field | Description | Accepted Values | Schema | Default |
| ---------- | ---------------------------------------------------------------- | ----------------- | ------ | -------- |
| autoCreate | When enabled, automatically create a host endpoint for each node | Enabled, Disabled | string | Disabled |
| Field | Description | Accepted Values | Schema | Default |
| ------------------------- | ---------------------------------------------------------------- | ----------------- | --------------------- | -------- |
| autoCreate | When enabled, automatically create a host endpoints | Enabled, Disabled | string | Disabled |

Check failure on line 88 in calico/reference/resources/kubecontrollersconfig.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'autoCreate'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'autoCreate'?", "location": {"path": "calico/reference/resources/kubecontrollersconfig.mdx", "range": {"start": {"line": 88, "column": 3}}}, "severity": "ERROR"}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| autoCreate | When enabled, automatically create a host endpoints | Enabled, Disabled | string | Disabled |
| autoCreate | When enabled, automatically create host endpoints | Enabled, Disabled | string | Disabled |

| createDefaultHostEndpoint | When enabled, default host endpoint will be created | Enabled, Disabled | string | Enabled |
| templates | Controlls creation of custom host endpoints | | [Template](#template) | |

Check failure on line 90 in calico/reference/resources/kubecontrollersconfig.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Controlls'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Controlls'?", "location": {"path": "calico/reference/resources/kubecontrollersconfig.mdx", "range": {"start": {"line": 90, "column": 31}}}, "severity": "ERROR"}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| templates | Controlls creation of custom host endpoints | | [Template](#template) | |
| templates | Controls creation of custom host endpoints | | [Template](#template) | |


### Template

| Field | Description | Accepted Values | Schema | Default |
| ------------------------- | ----------------------------------------------------------------------------------- | ------------------- | ---------------------- | -------- |
| name | Unique name used as suffix for host endpoints created based on this template | Alphanumeric string | string | |
| nodeSelector | Selects the nodes for which this template should create host endpoint | | [Selector](#selectors) | all() |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| nodeSelector | Selects the nodes for which this template should create host endpoint | | [Selector](#selectors) | all() |
| nodeSelector | Selects the nodes for which this template should create host endpoints | | [Selector](#selectors) | all() |

| interfaceSelectorCIDR | List of networks specified in CIDR notation | List of valid CIDRs | List string | |
| labels | Labels to be added to generated host endpoints matching this template | | [Label](#label) | |

### Label
| Field | Description | Accepted Values | Schema | Default |
| ------------------------- | ---------------------------------------------------------------- | ------------------- | --------- | -------- |
| name | Name for the label | Alphanumeric string | string | |
| value | Label value | Alphanumeric string | string | |
Comment on lines +101 to +105
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section seems not to add much value. I had a look at other resources, and none had a similar section.

Do we really need this?


### Selectors

<Selectors />

### PolicyController

Expand Down
Loading