Skip to content

Commit fa91fe2

Browse files
authored
update proto for WorkloadEntry since address is no longer required (#2916)
* update proto for workloadentry since address is no longer required * remove unused import
1 parent 6d14ca2 commit fa91fe2

File tree

6 files changed

+261
-105
lines changed

6 files changed

+261
-105
lines changed

networking/v1alpha3/workload_entry.pb.go

Lines changed: 71 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1alpha3/workload_entry.pb.html

Lines changed: 36 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1alpha3/workload_entry.proto

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
syntax = "proto3";
1616

17-
import "google/api/field_behavior.proto";
18-
1917
// $schema: istio.networking.v1alpha3.WorkloadEntry
2018
// $title: Workload Entry
2119
// $description: Configuration affecting VMs onboarded into the mesh.
@@ -228,6 +226,44 @@ import "google/api/field_behavior.proto";
228226
// {{</tab>}}
229227
// {{</tabset>}}
230228
//
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+
//
231267
package istio.networking.v1alpha3;
232268

233269
option go_package = "istio.io/api/networking/v1alpha3";
@@ -265,7 +301,8 @@ message WorkloadEntry {
265301
// port. Domain names can be used if and only if the resolution is set
266302
// to DNS, and must be fully-qualified without wildcards. Use the form
267303
// 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;
269306

270307
// Set of ports associated with the endpoint. If the port map is
271308
// specified, it must be a map of servicePortName to this endpoint's
@@ -293,7 +330,7 @@ message WorkloadEntry {
293330
// used to establish connectivity (usually using the
294331
// `AUTO_PASSTHROUGH` mode in a Gateway Server). This is
295332
// an advanced configuration used typically for spanning an Istio mesh
296-
// over multiple clusters.
333+
// over multiple clusters. Required if address is not provided.
297334
string network = 4;
298335

299336
// The locality associated with the endpoint. A locality corresponds

0 commit comments

Comments
 (0)