|
14 | 14 |
|
15 | 15 | syntax = "proto3";
|
16 | 16 |
|
17 |
| -import "google/api/field_behavior.proto"; |
18 |
| - |
19 | 17 | // $schema: istio.networking.v1alpha3.WorkloadEntry
|
20 | 18 | // $title: Workload Entry
|
21 | 19 | // $description: Configuration affecting VMs onboarded into the mesh.
|
@@ -228,6 +226,44 @@ import "google/api/field_behavior.proto";
|
228 | 226 | // {{</tab>}}
|
229 | 227 | // {{</tabset>}}
|
230 | 228 | //
|
| 229 | +// |
| 230 | +// The following example declares a VM workload without an address. |
| 231 | +// An alternative to having istiod read from remote API servers is |
| 232 | +// to write a `WorkloadEntry` in the local cluster that represents |
| 233 | +// the Workload(s) in the remote network with the given labels. A |
| 234 | +// single `WorkloadEntry` with weights represent the aggregate of all |
| 235 | +// the actual workloads in a given remote network. |
| 236 | +// |
| 237 | +// {{<tabset category-name="example">}} |
| 238 | +// {{<tab name="v1alpha3" category-value="v1alpha3">}} |
| 239 | +// ```yaml |
| 240 | +// apiVersion: networking.istio.io/v1alpha3 |
| 241 | +// kind: WorkloadEntry |
| 242 | +// metadata: |
| 243 | +// name: foo-workloads-cluster-2 |
| 244 | +// spec: |
| 245 | +// serviceAccount: foo |
| 246 | +// network: cluster-2-network |
| 247 | +// labels: |
| 248 | +// app: foo |
| 249 | +// ``` |
| 250 | +// {{</tab>}} |
| 251 | +// |
| 252 | +// {{<tab name="v1beta1" category-value="v1beta1">}} |
| 253 | +// ```yaml |
| 254 | +// apiVersion: networking.istio.io/v1beta1 |
| 255 | +// kind: WorkloadEntry |
| 256 | +// metadata: |
| 257 | +// name: foo-workloads-cluster-2 |
| 258 | +// spec: |
| 259 | +// serviceAccount: foo |
| 260 | +// network: cluster-2-network |
| 261 | +// labels: |
| 262 | +// app: foo |
| 263 | +// ``` |
| 264 | +// {{</tab>}} |
| 265 | +// {{</tabset>}} |
| 266 | +// |
231 | 267 | package istio.networking.v1alpha3;
|
232 | 268 |
|
233 | 269 | option go_package = "istio.io/api/networking/v1alpha3";
|
@@ -265,7 +301,8 @@ message WorkloadEntry {
|
265 | 301 | // port. Domain names can be used if and only if the resolution is set
|
266 | 302 | // to DNS, and must be fully-qualified without wildcards. Use the form
|
267 | 303 | // unix:///absolute/path/to/socket for Unix domain socket endpoints.
|
268 |
| - string address = 1 [(google.api.field_behavior) = REQUIRED]; |
| 304 | + // If address is empty, network must be specified. |
| 305 | + string address = 1; |
269 | 306 |
|
270 | 307 | // Set of ports associated with the endpoint. If the port map is
|
271 | 308 | // specified, it must be a map of servicePortName to this endpoint's
|
@@ -293,7 +330,7 @@ message WorkloadEntry {
|
293 | 330 | // used to establish connectivity (usually using the
|
294 | 331 | // `AUTO_PASSTHROUGH` mode in a Gateway Server). This is
|
295 | 332 | // an advanced configuration used typically for spanning an Istio mesh
|
296 |
| - // over multiple clusters. |
| 333 | + // over multiple clusters. Required if address is not provided. |
297 | 334 | string network = 4;
|
298 | 335 |
|
299 | 336 | // The locality associated with the endpoint. A locality corresponds
|
|
0 commit comments