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 798f10a commit b86fbf5
Show file tree
Hide file tree
Showing 15 changed files with 747 additions and 88 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
---
6 changes: 2 additions & 4 deletions deployment/deployment-grpc-v2/02-contour.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ spec:
prometheus.io/format: "prometheus"
spec:
containers:
- image: gcr.io/heptio-images/contour:master
imagePullPolicy: Always
- image: gcr.io/heptio-images/contour:dea8bb8b
name: contour
command: ["contour"]
args: ["serve", "--incluster"]
Expand Down Expand Up @@ -54,8 +53,7 @@ spec:
exec:
command: ["wget", "-qO-", "http://localhost:9001/healthcheck/fail"]
initContainers:
- image: gcr.io/heptio-images/contour:master
imagePullPolicy: Always
- image: gcr.io/heptio-images/contour:dea8bb8b
name: envoy-initconfig
command: ["contour"]
args:
Expand Down
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
10 changes: 3 additions & 7 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 All @@ -191,8 +189,7 @@ spec:
prometheus.io/format: "prometheus"
spec:
containers:
- image: gcr.io/heptio-images/contour:master
imagePullPolicy: Always
- image: gcr.io/heptio-images/contour:dea8bb8b
name: contour
command: ["contour"]
args: ["serve", "--incluster"]
Expand Down Expand Up @@ -224,8 +221,7 @@ spec:
exec:
command: ["wget", "-qO-", "http://localhost:9001/healthcheck/fail"]
initContainers:
- image: gcr.io/heptio-images/contour:master
imagePullPolicy: Always
- image: gcr.io/heptio-images/contour:dea8bb8b
name: envoy-initconfig
command: ["contour"]
args:
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 b86fbf5

Please sign in to comment.