From 2b206842117f95016f0deac9bc6047872e22ecab Mon Sep 17 00:00:00 2001 From: Michal Fupso Date: Mon, 13 Jul 2026 15:56:37 -0700 Subject: [PATCH] Add annotations to HostEndpoint template --- calico-cloud/network-policy/hosts/kubernetes-nodes.mdx | 4 ++++ calico-cloud/reference/resources/kubecontrollersconfig.mdx | 3 +++ calico-enterprise/network-policy/hosts/kubernetes-nodes.mdx | 4 ++++ .../reference/resources/kubecontrollersconfig.mdx | 3 +++ calico/network-policy/hosts/kubernetes-nodes.mdx | 4 ++++ calico/reference/resources/kubecontrollersconfig.mdx | 3 +++ 6 files changed, 21 insertions(+) diff --git a/calico-cloud/network-policy/hosts/kubernetes-nodes.mdx b/calico-cloud/network-policy/hosts/kubernetes-nodes.mdx index 525b783416..5e7f813b3b 100644 --- a/calico-cloud/network-policy/hosts/kubernetes-nodes.mdx +++ b/calico-cloud/network-policy/hosts/kubernetes-nodes.mdx @@ -94,6 +94,8 @@ To enable template host endpoints and disable default host endpoints, edit the d nodeSelector: "!has(node-role.kubernetes.io/control-plane)" labels: custom-label: template-host-endpoint + annotations: + custom-annotation: template-host-endpoint EOF ``` @@ -128,6 +130,8 @@ To enable template host endpoints and disable default host endpoints, edit the d - 192.168.0.0/16 labels: custom-label: template-host-endpoint + annotations: + custom-annotation: template-host-endpoint ``` 4. If successful, host endpoints are created for nodes matching your node selector: diff --git a/calico-cloud/reference/resources/kubecontrollersconfig.mdx b/calico-cloud/reference/resources/kubecontrollersconfig.mdx index e1becee48e..4c9b4aac13 100644 --- a/calico-cloud/reference/resources/kubecontrollersconfig.mdx +++ b/calico-cloud/reference/resources/kubecontrollersconfig.mdx @@ -41,6 +41,8 @@ spec: nodeSelector: "has(my-label)" labels: key: value + annotations: + key: value loadbalancer: assignIPs: AllServices ``` @@ -100,6 +102,7 @@ The node controller automatically cleans up configuration for nodes that no long | interfaceCIDRs | This configuration defines which IP addresses from a node's specification (including standard, tunnel, and WireGuard IPs) are eligible for inclusion in the generated HostEndpoint. IP addresses must fall within the provided CIDR ranges to be considered. If no address on the node matches the specified CIDRs, the HostEndpoint creation is skipped. | List of valid CIDRs | List string | | | interfacePattern | Regex to include matching interfaces and their IPs | string | string | | | labels | Labels to be added to generated host endpoints matching this template | | map of string key to string values | | +| annotations | Annotations to be added to generated host endpoints matching this template | | map of string key to string values | | ### Selectors diff --git a/calico-enterprise/network-policy/hosts/kubernetes-nodes.mdx b/calico-enterprise/network-policy/hosts/kubernetes-nodes.mdx index 8bbcb082ad..1911bb5733 100644 --- a/calico-enterprise/network-policy/hosts/kubernetes-nodes.mdx +++ b/calico-enterprise/network-policy/hosts/kubernetes-nodes.mdx @@ -94,6 +94,8 @@ To enable template host endpoints and disable default host endpoints, edit the d nodeSelector: "!has(node-role.kubernetes.io/control-plane)" labels: custom-label: template-host-endpoint + annotations: + custom-annotation: template-host-endpoint EOF ``` @@ -128,6 +130,8 @@ To enable template host endpoints and disable default host endpoints, edit the d - 192.168.0.0/16 labels: custom-label: template-host-endpoint + annotations: + custom-annotation: template-host-endpoint ``` 4. If successful, host endpoints are created for nodes matching your node selector: diff --git a/calico-enterprise/reference/resources/kubecontrollersconfig.mdx b/calico-enterprise/reference/resources/kubecontrollersconfig.mdx index 651a4a9e58..e382dd4681 100644 --- a/calico-enterprise/reference/resources/kubecontrollersconfig.mdx +++ b/calico-enterprise/reference/resources/kubecontrollersconfig.mdx @@ -41,6 +41,8 @@ spec: nodeSelector: "has(my-label)" labels: key: value + annotations: + key: value loadbalancer: assignIPs: AllServices ``` @@ -100,6 +102,7 @@ The node controller automatically cleans up configuration for nodes that no long | interfaceCIDRs | This configuration defines which IP addresses from a node's specification (including standard, tunnel, and WireGuard IPs) are eligible for inclusion in the generated HostEndpoint. IP addresses must fall within the provided CIDR ranges to be considered. If no address on the node matches the specified CIDRs, the HostEndpoint creation is skipped. | List of valid CIDRs | List string | | | interfacePattern | Regex to include matching interfaces and their IPs | string | string | | | labels | Labels to be added to generated host endpoints matching this template | | map of string key to string values | | +| annotations | Annotations to be added to generated host endpoints matching this template | | map of string key to string values | | ### Selectors diff --git a/calico/network-policy/hosts/kubernetes-nodes.mdx b/calico/network-policy/hosts/kubernetes-nodes.mdx index 90b557e730..30ae6f2868 100644 --- a/calico/network-policy/hosts/kubernetes-nodes.mdx +++ b/calico/network-policy/hosts/kubernetes-nodes.mdx @@ -92,6 +92,8 @@ To enable template host endpoints and disable default host endpoints, edit the d nodeSelector: "!has(node-role.kubernetes.io/control-plane)" labels: custom-label: template-host-endpoint + annotations: + custom-annotation: template-host-endpoint EOF ``` @@ -126,6 +128,8 @@ To enable template host endpoints and disable default host endpoints, edit the d - 192.168.0.0/16 labels: custom-label: template-host-endpoint + annotations: + custom-annotation: template-host-endpoint ``` 4. If successful, host endpoints are created for nodes matching your node selector: diff --git a/calico/reference/resources/kubecontrollersconfig.mdx b/calico/reference/resources/kubecontrollersconfig.mdx index 5545352852..e2d6f3f563 100644 --- a/calico/reference/resources/kubecontrollersconfig.mdx +++ b/calico/reference/resources/kubecontrollersconfig.mdx @@ -36,6 +36,8 @@ spec: nodeSelector: "has(my-label)" labels: key: value + annotations: + key: value policy: reconcilerPeriod: 5m workloadEndpoint: @@ -106,6 +108,7 @@ The node controller automatically cleans up configuration for nodes that no long | interfaceCIDRs | This configuration defines which IP addresses from a node's specification (including standard, tunnel, and WireGuard IPs) are eligible for inclusion in the generated HostEndpoint. IP addresses must fall within the provided CIDR ranges to be considered. If no address on the node matches the specified CIDRs, the HostEndpoint creation is skipped. | List of valid CIDRs | List string | | | interfacePattern | Regex to include matching interfaces and their IPs | string | string | | | labels | Labels to be added to generated host endpoints matching this template | | map of string key to string values | | +| annotations | Annotations to be added to generated host endpoints matching this template | | map of string key to string values | | ### Selectors