Skip to content

Commit

Permalink
docs: clarify node taints/labels for worker nodes
Browse files Browse the repository at this point in the history
`NodeRestriction` admission plugin heavily restricts what worker nodes
can set.

Signed-off-by: Andrey Smirnov <[email protected]>
(cherry picked from commit 8138d54)
  • Loading branch information
smira committed Feb 1, 2024
1 parent 7840f8a commit 12e83b7
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2110,9 +2110,9 @@
},
"type": "object",
"title": "nodeLabels",
"description": "Configures the node labels for the machine.\n",
"markdownDescription": "Configures the node labels for the machine.",
"x-intellij-html-description": "\u003cp\u003eConfigures the node labels for the machine.\u003c/p\u003e\n"
"description": "Configures the node labels for the machine.\n\nNote: In the default Kubernetes configuration, worker nodes are restricted to set\nlabels with some prefixes (see NodeRestriction admission plugin).\n",
"markdownDescription": "Configures the node labels for the machine.\n\nNote: In the default Kubernetes configuration, worker nodes are restricted to set\nlabels with some prefixes (see [NodeRestriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) admission plugin).",
"x-intellij-html-description": "\u003cp\u003eConfigures the node labels for the machine.\u003c/p\u003e\n\n\u003cp\u003eNote: In the default Kubernetes configuration, worker nodes are restricted to set\nlabels with some prefixes (see \u003ca href=\"https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction\" target=\"_blank\"\u003eNodeRestriction\u003c/a\u003e admission plugin).\u003c/p\u003e\n"
},
"nodeTaints": {
"patternProperties": {
Expand All @@ -2122,9 +2122,9 @@
},
"type": "object",
"title": "nodeTaints",
"description": "Configures the node taints for the machine. Effect is optional.\n",
"markdownDescription": "Configures the node taints for the machine. Effect is optional.",
"x-intellij-html-description": "\u003cp\u003eConfigures the node taints for the machine. Effect is optional.\u003c/p\u003e\n"
"description": "Configures the node taints for the machine. Effect is optional.\n\nNote: In the default Kubernetes configuration, worker nodes are not allowed to\nmodify the taints (see NodeRestriction admission plugin).\n",
"markdownDescription": "Configures the node taints for the machine. Effect is optional.\n\nNote: In the default Kubernetes configuration, worker nodes are not allowed to\nmodify the taints (see [NodeRestriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) admission plugin).",
"x-intellij-html-description": "\u003cp\u003eConfigures the node taints for the machine. Effect is optional.\u003c/p\u003e\n\n\u003cp\u003eNote: In the default Kubernetes configuration, worker nodes are not allowed to\nmodify the taints (see \u003ca href=\"https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction\" target=\"_blank\"\u003eNodeRestriction\u003c/a\u003e admission plugin).\u003c/p\u003e\n"
}
},
"additionalProperties": false,
Expand Down
6 changes: 6 additions & 0 deletions pkg/machinery/config/types/v1alpha1/v1alpha1_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,18 @@ type MachineConfig struct {
MachineSeccompProfiles []*MachineSeccompProfile `yaml:"seccompProfiles,omitempty" talos:"omitonlyifnil"`
// description: |
// Configures the node labels for the machine.
//
// Note: In the default Kubernetes configuration, worker nodes are restricted to set
// labels with some prefixes (see [NodeRestriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) admission plugin).
// examples:
// - name: node labels example.
// value: 'map[string]string{"exampleLabel": "exampleLabelValue"}'
MachineNodeLabels map[string]string `yaml:"nodeLabels,omitempty"`
// description: |
// Configures the node taints for the machine. Effect is optional.
//
// Note: In the default Kubernetes configuration, worker nodes are not allowed to
// modify the taints (see [NodeRestriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) admission plugin).
// examples:
// - name: node taints example.
// value: 'map[string]string{"exampleTaint": "exampleTaintValue:NoSchedule"}'
Expand Down
4 changes: 2 additions & 2 deletions pkg/machinery/config/types/v1alpha1/v1alpha1_types_doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,11 @@ seccompProfiles:
value:
defaultAction: SCMP_ACT_LOG
{{< /highlight >}}</details> | |
|`nodeLabels` |map[string]string |Configures the node labels for the machine. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|`nodeLabels` |map[string]string |<details><summary>Configures the node labels for the machine.</summary><br />Note: In the default Kubernetes configuration, worker nodes are restricted to set<br />labels with some prefixes (see [NodeRestriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) admission plugin).</details> <details><summary>Show example(s)</summary>{{< highlight yaml >}}
nodeLabels:
exampleLabel: exampleLabelValue
{{< /highlight >}}</details> | |
|`nodeTaints` |map[string]string |Configures the node taints for the machine. Effect is optional. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
|`nodeTaints` |map[string]string |<details><summary>Configures the node taints for the machine. Effect is optional.</summary><br />Note: In the default Kubernetes configuration, worker nodes are not allowed to<br />modify the taints (see [NodeRestriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) admission plugin).</details> <details><summary>Show example(s)</summary>{{< highlight yaml >}}
nodeTaints:
exampleTaint: exampleTaintValue:NoSchedule
{{< /highlight >}}</details> | |
Expand Down
12 changes: 6 additions & 6 deletions website/content/v1.6/schemas/v1alpha1_config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2110,9 +2110,9 @@
},
"type": "object",
"title": "nodeLabels",
"description": "Configures the node labels for the machine.\n",
"markdownDescription": "Configures the node labels for the machine.",
"x-intellij-html-description": "\u003cp\u003eConfigures the node labels for the machine.\u003c/p\u003e\n"
"description": "Configures the node labels for the machine.\n\nNote: In the default Kubernetes configuration, worker nodes are restricted to set\nlabels with some prefixes (see NodeRestriction admission plugin).\n",
"markdownDescription": "Configures the node labels for the machine.\n\nNote: In the default Kubernetes configuration, worker nodes are restricted to set\nlabels with some prefixes (see [NodeRestriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) admission plugin).",
"x-intellij-html-description": "\u003cp\u003eConfigures the node labels for the machine.\u003c/p\u003e\n\n\u003cp\u003eNote: In the default Kubernetes configuration, worker nodes are restricted to set\nlabels with some prefixes (see \u003ca href=\"https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction\" target=\"_blank\"\u003eNodeRestriction\u003c/a\u003e admission plugin).\u003c/p\u003e\n"
},
"nodeTaints": {
"patternProperties": {
Expand All @@ -2122,9 +2122,9 @@
},
"type": "object",
"title": "nodeTaints",
"description": "Configures the node taints for the machine. Effect is optional.\n",
"markdownDescription": "Configures the node taints for the machine. Effect is optional.",
"x-intellij-html-description": "\u003cp\u003eConfigures the node taints for the machine. Effect is optional.\u003c/p\u003e\n"
"description": "Configures the node taints for the machine. Effect is optional.\n\nNote: In the default Kubernetes configuration, worker nodes are not allowed to\nmodify the taints (see NodeRestriction admission plugin).\n",
"markdownDescription": "Configures the node taints for the machine. Effect is optional.\n\nNote: In the default Kubernetes configuration, worker nodes are not allowed to\nmodify the taints (see [NodeRestriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) admission plugin).",
"x-intellij-html-description": "\u003cp\u003eConfigures the node taints for the machine. Effect is optional.\u003c/p\u003e\n\n\u003cp\u003eNote: In the default Kubernetes configuration, worker nodes are not allowed to\nmodify the taints (see \u003ca href=\"https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction\" target=\"_blank\"\u003eNodeRestriction\u003c/a\u003e admission plugin).\u003c/p\u003e\n"
}
},
"additionalProperties": false,
Expand Down

0 comments on commit 12e83b7

Please sign in to comment.