From 9c10d83950f3d20bc7e32bb198bf8e9327ea5ef4 Mon Sep 17 00:00:00 2001 From: Frank Budinsky Date: Thu, 8 Feb 2018 15:53:50 -0500 Subject: [PATCH 1/2] Doc clarifications --- routing/v1alpha2/gateway.proto | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/routing/v1alpha2/gateway.proto b/routing/v1alpha2/gateway.proto index 49fc7653064..fcbf78c585e 100644 --- a/routing/v1alpha2/gateway.proto +++ b/routing/v1alpha2/gateway.proto @@ -29,7 +29,7 @@ option go_package = "istio.io/api/routing/v1alpha2"; // For example, the following gateway spec sets up a proxy to act as a load // balancer exposing port 80 and 9080 (http), 443 (https), and port 2379 // (TCP) for ingress. The gateway will be applied to the proxy running on -// a pod with labels "podRole: gateway-pod". While Istio will configure the +// a pod with labels "app: my-gateway-controller". While Istio will configure the // proxy to listen on these ports, it is the responsibility of the user to // ensure that external traffic to these ports are allowed into the mesh. // @@ -39,7 +39,7 @@ option go_package = "istio.io/api/routing/v1alpha2"; // name: my-gateway // spec: // selector: -// - podRole: gatweway-pod +// - app: my-gatweway-controller // servers: // - port: // number: 80 @@ -145,8 +145,10 @@ message Gateway { // REQUIRED: A list of server specifications. repeated Server servers = 1; - // REQUIRED: One or more labels that indicate a specific set of pods/VMs + // One or more labels that indicate a specific set of pods/VMs // on which this gateway configuration should be applied. + // If no selectors are provided, the gateway will be implemented by + // the default istio-ingress controller. map selector = 2; } @@ -159,7 +161,7 @@ message Gateway { // name: my-ingress // spec: // selector: -// - podRole: ingress-gateway +// - app: my-ingress-controller // servers: // - port: // number: 80 @@ -173,7 +175,7 @@ message Gateway { // name: my-tcp-ingress // spec: // selector: -// - podRole: tcp-ingress-pod +// - app: my-tcp-ingress-controller // servers: // - port: // number: 27018 @@ -184,10 +186,10 @@ message Gateway { // apiVersion: config.istio.io/v1alpha2 // kind: Gateway // metadata: -// name: my-ingress +// name: my-tls-ingress // spec: // selector: -// - podRole: ingress-tls +// - app: my-tls-ingress-controller // servers: // - port: // number: 443 From bb6ea13daedbff8798ba4c2e44d37bc1598c102e Mon Sep 17 00:00:00 2001 From: Frank Budinsky Date: Thu, 8 Feb 2018 17:19:02 -0500 Subject: [PATCH 2/2] regenerate go files --- routing/v1alpha2/gateway.pb.go | 16 +++++++++------- .../v1alpha2/istio.routing.v1alpha2.pb.html | 18 ++++++++++-------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/routing/v1alpha2/gateway.pb.go b/routing/v1alpha2/gateway.pb.go index 0e2de3d8c2c..70efa59cf6a 100644 --- a/routing/v1alpha2/gateway.pb.go +++ b/routing/v1alpha2/gateway.pb.go @@ -55,7 +55,7 @@ func (Server_TLSOptions_TLSmode) EnumDescriptor() ([]byte, []int) { // For example, the following gateway spec sets up a proxy to act as a load // balancer exposing port 80 and 9080 (http), 443 (https), and port 2379 // (TCP) for ingress. The gateway will be applied to the proxy running on -// a pod with labels "podRole: gateway-pod". While Istio will configure the +// a pod with labels "app: my-gateway-controller". While Istio will configure the // proxy to listen on these ports, it is the responsibility of the user to // ensure that external traffic to these ports are allowed into the mesh. // @@ -65,7 +65,7 @@ func (Server_TLSOptions_TLSmode) EnumDescriptor() ([]byte, []int) { // name: my-gateway // spec: // selector: -// - podRole: gatweway-pod +// - app: my-gatweway-controller // servers: // - port: // number: 80 @@ -170,8 +170,10 @@ func (Server_TLSOptions_TLSmode) EnumDescriptor() ([]byte, []int) { type Gateway struct { // REQUIRED: A list of server specifications. Servers []*Server `protobuf:"bytes,1,rep,name=servers" json:"servers,omitempty"` - // REQUIRED: One or more labels that indicate a specific set of pods/VMs + // One or more labels that indicate a specific set of pods/VMs // on which this gateway configuration should be applied. + // If no selectors are provided, the gateway will be implemented by + // the default istio-ingress controller. Selector map[string]string `protobuf:"bytes,2,rep,name=selector" json:"selector,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` } @@ -203,7 +205,7 @@ func (m *Gateway) GetSelector() map[string]string { // name: my-ingress // spec: // selector: -// - podRole: ingress-gateway +// - app: my-ingress-controller // servers: // - port: // number: 80 @@ -217,7 +219,7 @@ func (m *Gateway) GetSelector() map[string]string { // name: my-tcp-ingress // spec: // selector: -// - podRole: tcp-ingress-pod +// - app: my-tcp-ingress-controller // servers: // - port: // number: 27018 @@ -228,10 +230,10 @@ func (m *Gateway) GetSelector() map[string]string { // apiVersion: config.istio.io/v1alpha2 // kind: Gateway // metadata: -// name: my-ingress +// name: my-tls-ingress // spec: // selector: -// - podRole: ingress-tls +// - app: my-tls-ingress-controller // servers: // - port: // number: 443 diff --git a/routing/v1alpha2/istio.routing.v1alpha2.pb.html b/routing/v1alpha2/istio.routing.v1alpha2.pb.html index 222f26e1063..f7cabb63421 100644 --- a/routing/v1alpha2/istio.routing.v1alpha2.pb.html +++ b/routing/v1alpha2/istio.routing.v1alpha2.pb.html @@ -933,7 +933,7 @@

Gateway

For example, the following gateway spec sets up a proxy to act as a load balancer exposing port 80 and 9080 (http), 443 (https), and port 2379 (TCP) for ingress. The gateway will be applied to the proxy running on -a pod with labels “podRole: gateway-pod”. While Istio will configure the +a pod with labels “app: my-gateway-controller”. While Istio will configure the proxy to listen on these ports, it is the responsibility of the user to ensure that external traffic to these ports are allowed into the mesh.

@@ -943,7 +943,7 @@

Gateway

name: my-gateway spec: selector: - - podRole: gatweway-pod + - app: my-gatweway-controller servers: - port: number: 80 @@ -1069,8 +1069,10 @@

Gateway

selector map<string, string> -

REQUIRED: One or more labels that indicate a specific set of pods/VMs -on which this gateway configuration should be applied.

+

One or more labels that indicate a specific set of pods/VMs +on which this gateway configuration should be applied. +If no selectors are provided, the gateway will be implemented by +the default istio-ingress controller.

@@ -2281,7 +2283,7 @@

Server

name: my-ingress spec: selector: - - podRole: ingress-gateway + - app: my-ingress-controller servers: - port: number: 80 @@ -2296,7 +2298,7 @@

Server

name: my-tcp-ingress spec: selector: - - podRole: tcp-ingress-pod + - app: my-tcp-ingress-controller servers: - port: number: 27018 @@ -2308,10 +2310,10 @@

Server

apiVersion: config.istio.io/v1alpha2
 kind: Gateway
 metadata:
-  name: my-ingress
+  name: my-tls-ingress
 spec:
   selector:
-  - podRole: ingress-tls
+  - app: my-tls-ingress-controller
   servers:
   - port:
       number: 443