Skip to content

Commit 2b20684

Browse files
committed
Add annotations to HostEndpoint template
1 parent 93329a5 commit 2b20684

6 files changed

Lines changed: 21 additions & 0 deletions

File tree

calico-cloud/network-policy/hosts/kubernetes-nodes.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ To enable template host endpoints and disable default host endpoints, edit the d
9494
nodeSelector: "!has(node-role.kubernetes.io/control-plane)"
9595
labels:
9696
custom-label: template-host-endpoint
97+
annotations:
98+
custom-annotation: template-host-endpoint
9799
EOF
98100
```
99101
@@ -128,6 +130,8 @@ To enable template host endpoints and disable default host endpoints, edit the d
128130
- 192.168.0.0/16
129131
labels:
130132
custom-label: template-host-endpoint
133+
annotations:
134+
custom-annotation: template-host-endpoint
131135
```
132136
133137
4. If successful, host endpoints are created for nodes matching your node selector:

calico-cloud/reference/resources/kubecontrollersconfig.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ spec:
4141
nodeSelector: "has(my-label)"
4242
labels:
4343
key: value
44+
annotations:
45+
key: value
4446
loadbalancer:
4547
assignIPs: AllServices
4648
```
@@ -100,6 +102,7 @@ The node controller automatically cleans up configuration for nodes that no long
100102
| 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 | |
101103
| interfacePattern | Regex to include matching interfaces and their IPs | string | string | |
102104
| labels | Labels to be added to generated host endpoints matching this template | | map of string key to string values | |
105+
| annotations | Annotations to be added to generated host endpoints matching this template | | map of string key to string values | |
103106

104107
### Selectors
105108

calico-enterprise/network-policy/hosts/kubernetes-nodes.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ To enable template host endpoints and disable default host endpoints, edit the d
9494
nodeSelector: "!has(node-role.kubernetes.io/control-plane)"
9595
labels:
9696
custom-label: template-host-endpoint
97+
annotations:
98+
custom-annotation: template-host-endpoint
9799
EOF
98100
```
99101
@@ -128,6 +130,8 @@ To enable template host endpoints and disable default host endpoints, edit the d
128130
- 192.168.0.0/16
129131
labels:
130132
custom-label: template-host-endpoint
133+
annotations:
134+
custom-annotation: template-host-endpoint
131135
```
132136
133137
4. If successful, host endpoints are created for nodes matching your node selector:

calico-enterprise/reference/resources/kubecontrollersconfig.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ spec:
4141
nodeSelector: "has(my-label)"
4242
labels:
4343
key: value
44+
annotations:
45+
key: value
4446
loadbalancer:
4547
assignIPs: AllServices
4648
```
@@ -100,6 +102,7 @@ The node controller automatically cleans up configuration for nodes that no long
100102
| 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 | |
101103
| interfacePattern | Regex to include matching interfaces and their IPs | string | string | |
102104
| labels | Labels to be added to generated host endpoints matching this template | | map of string key to string values | |
105+
| annotations | Annotations to be added to generated host endpoints matching this template | | map of string key to string values | |
103106

104107
### Selectors
105108

calico/network-policy/hosts/kubernetes-nodes.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ To enable template host endpoints and disable default host endpoints, edit the d
9292
nodeSelector: "!has(node-role.kubernetes.io/control-plane)"
9393
labels:
9494
custom-label: template-host-endpoint
95+
annotations:
96+
custom-annotation: template-host-endpoint
9597
EOF
9698
```
9799
@@ -126,6 +128,8 @@ To enable template host endpoints and disable default host endpoints, edit the d
126128
- 192.168.0.0/16
127129
labels:
128130
custom-label: template-host-endpoint
131+
annotations:
132+
custom-annotation: template-host-endpoint
129133
```
130134
131135
4. If successful, host endpoints are created for nodes matching your node selector:

calico/reference/resources/kubecontrollersconfig.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ spec:
3636
nodeSelector: "has(my-label)"
3737
labels:
3838
key: value
39+
annotations:
40+
key: value
3941
policy:
4042
reconcilerPeriod: 5m
4143
workloadEndpoint:
@@ -106,6 +108,7 @@ The node controller automatically cleans up configuration for nodes that no long
106108
| 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 | |
107109
| interfacePattern | Regex to include matching interfaces and their IPs | string | string | |
108110
| labels | Labels to be added to generated host endpoints matching this template | | map of string key to string values | |
111+
| annotations | Annotations to be added to generated host endpoints matching this template | | map of string key to string values | |
109112

110113
### Selectors
111114

0 commit comments

Comments
 (0)