Skip to content

Commit

Permalink
httproute: drop default HTTPRouteHost
Browse files Browse the repository at this point in the history
This patch removes default HTTPRouteHost and instead recommends the
following two ways to implement default routing behavior:
1. For a catch-all route for a hostname or a subset of hostname, use a
`PathMatchType` of `Prefix` with `/` path.
2. For a catch-all route across all hostnames on a given listener, combine (1) with
a listener with HostnameMatchType of `Any`.
  • Loading branch information
hbagdi committed Aug 12, 2020
1 parent 54286b5 commit 50c0bfa
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 438 deletions.
310 changes: 128 additions & 182 deletions apis/v1alpha1/generated.pb.go

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions apis/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions apis/v1alpha1/httproute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ import (
type HTTPRouteSpec struct {
// Hosts is a list of Host definitions.
Hosts []HTTPRouteHost `json:"hosts,omitempty" protobuf:"bytes,1,rep,name=hosts"`

// Default is the default host to use. Default.Hostnames must
// be an empty list.
//
// +optional
Default *HTTPRouteHost `json:"default" protobuf:"bytes,2,opt,name=default"`
}

// HTTPRouteHost is the configuration for a given set of hosts.
Expand Down
5 changes: 0 additions & 5 deletions apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

179 changes: 0 additions & 179 deletions config/crd/bases/networking.x-k8s.io_httproutes.yaml

Large diffs are not rendered by default.

30 changes: 0 additions & 30 deletions docs-src/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,21 +406,6 @@ HTTPRouteSpec
<p>Hosts is a list of Host definitions.</p>
</td>
</tr>
<tr>
<td>
<code>default</code></br>
<em>
<a href="#networking.x-k8s.io/v1alpha1.HTTPRouteHost">
HTTPRouteHost
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Default is the default host to use. Default.Hostnames must
be an empty list.</p>
</td>
</tr>
</table>
</td>
</tr>
Expand Down Expand Up @@ -1788,21 +1773,6 @@ HTTPRouteAction
<p>Hosts is a list of Host definitions.</p>
</td>
</tr>
<tr>
<td>
<code>default</code></br>
<em>
<a href="#networking.x-k8s.io/v1alpha1.HTTPRouteHost">
HTTPRouteHost
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Default is the default host to use. Default.Hostnames must
be an empty list.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="networking.x-k8s.io/v1alpha1.HTTPRouteStatus">HTTPRouteStatus
Expand Down
30 changes: 0 additions & 30 deletions docs/spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -731,21 +731,6 @@ <h3 id="networking.x-k8s.io/v1alpha1.HTTPRoute">HTTPRoute
<p>Hosts is a list of Host definitions.</p>
</td>
</tr>
<tr>
<td>
<code>default</code></br>
<em>
<a href="#networking.x-k8s.io/v1alpha1.HTTPRouteHost">
HTTPRouteHost
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Default is the default host to use. Default.Hostnames must
be an empty list.</p>
</td>
</tr>
</table>
</td>
</tr>
Expand Down Expand Up @@ -2113,21 +2098,6 @@ <h3 id="networking.x-k8s.io/v1alpha1.HTTPRouteSpec">HTTPRouteSpec
<p>Hosts is a list of Host definitions.</p>
</td>
</tr>
<tr>
<td>
<code>default</code></br>
<em>
<a href="#networking.x-k8s.io/v1alpha1.HTTPRouteHost">
HTTPRouteHost
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Default is the default host to use. Default.Hostnames must
be an empty list.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="networking.x-k8s.io/v1alpha1.HTTPRouteStatus">HTTPRouteStatus
Expand Down

0 comments on commit 50c0bfa

Please sign in to comment.