Skip to content

Commit

Permalink
Different TLS settings must generate new Envoy clusters
Browse files Browse the repository at this point in the history
Signed-off-by: Robbie McMichael <[email protected]>
  • Loading branch information
robbiemcmichael committed Jan 14, 2019
1 parent 0438867 commit df1647d
Show file tree
Hide file tree
Showing 14 changed files with 743 additions and 80 deletions.
6 changes: 3 additions & 3 deletions apis/contour/v1beta1/ingressroute.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ type HealthCheck struct {
type TLSVerification struct {
// Required, the CA to use for TLS verification
CA CA `json:"ca"`
// If specified, at least one of the hostnames must be included in the
// certificate's Subject Alternative Names field
Hostnames []string `json:"hostnames"`
// If specified, the hostname must be included in the certificate's Subject
// Alternative Names field
Hostname string `json:"hostname"`
}

// TLS verification for the upstream services
Expand Down
4 changes: 1 addition & 3 deletions deployment/common/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,5 @@ spec:
type: string
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ # DNS-1123 subdomain
hostnames:
type: array
items:
type: string
type: string
---
4 changes: 1 addition & 3 deletions deployment/render/daemonset-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ spec:
type: string
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ # DNS-1123 subdomain
hostnames:
type: array
items:
type: string
type: string
---
apiVersion: extensions/v1beta1
kind: DaemonSet
Expand Down
4 changes: 1 addition & 3 deletions deployment/render/deployment-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ spec:
type: string
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ # DNS-1123 subdomain
hostnames:
type: array
items:
type: string
type: string
---
apiVersion: extensions/v1beta1
kind: Deployment
Expand Down
8 changes: 1 addition & 7 deletions internal/contour/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,7 @@ func visitClusters(root dag.Vertex) map[string]*v2.Cluster {

func (v *clusterVisitor) visit(vertex dag.Vertex) {
switch service := vertex.(type) {
case *dag.HTTPService:
name := envoy.Clustername(&service.TCPService)
if _, ok := v.clusters[name]; !ok {
c := envoy.Cluster(service)
v.clusters[c.Name] = c
}
case *dag.TCPService:
case dag.Service:
name := envoy.Clustername(service)
if _, ok := v.clusters[name]; !ok {
c := envoy.Cluster(service)
Expand Down
Loading

0 comments on commit df1647d

Please sign in to comment.