mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 17:37:13 +02:00
Set up GCLB to router web WHOIS traffic
We need to support web WHOIS on the same IP addresses that we use for port 43 whois. [] added support for HTTP(S) traffic on the proxy, which simply redirects to another website that actually hosts the web WHOIS service. This cl sets up the GCLB to route port 80 and port 443 traffic to the proxy. We were using the TCP proxy load balancer for other protocols that we support (EPP and WHOIS), but the TCP proxy LB only exposes port 443, not port 80. For port 443, we simply follow the same pattern and add another TCP proxy LB. For port 80, we had to use the HTTP LB which exposes port 80 (on the same external IP addresses). This requires a different HTTP health check and a URL map. The added URL map is a dummy one that routes all paths to the same backend service that supports HTTP redirect. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=206409007
This commit is contained in:
parent
030e2f4dd3
commit
0e62270f54
9 changed files with 50 additions and 3 deletions
|
@ -25,6 +25,10 @@ spec:
|
||||||
name: whois
|
name: whois
|
||||||
- containerPort: 30002
|
- containerPort: 30002
|
||||||
name: epp
|
name: epp
|
||||||
|
- containerPort: 30010
|
||||||
|
name: http-whois
|
||||||
|
- containerPort: 30011
|
||||||
|
name: https-whois
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: health-check
|
port: health-check
|
||||||
|
|
|
@ -25,6 +25,10 @@ spec:
|
||||||
name: whois
|
name: whois
|
||||||
- containerPort: 30002
|
- containerPort: 30002
|
||||||
name: epp
|
name: epp
|
||||||
|
- containerPort: 30010
|
||||||
|
name: http-whois
|
||||||
|
- containerPort: 30011
|
||||||
|
name: https-whois
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: health-check
|
port: health-check
|
||||||
|
|
|
@ -25,6 +25,10 @@ spec:
|
||||||
name: whois
|
name: whois
|
||||||
- containerPort: 30002
|
- containerPort: 30002
|
||||||
name: epp
|
name: epp
|
||||||
|
- containerPort: 30010
|
||||||
|
name: http-whois
|
||||||
|
- containerPort: 30011
|
||||||
|
name: https-whois
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: health-check
|
port: health-check
|
||||||
|
|
|
@ -25,6 +25,10 @@ spec:
|
||||||
name: whois
|
name: whois
|
||||||
- containerPort: 30002
|
- containerPort: 30002
|
||||||
name: epp
|
name: epp
|
||||||
|
- containerPort: 30010
|
||||||
|
name: http-whois
|
||||||
|
- containerPort: 30011
|
||||||
|
name: https-whois
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: health-check
|
port: health-check
|
||||||
|
|
|
@ -25,6 +25,10 @@ spec:
|
||||||
name: whois
|
name: whois
|
||||||
- containerPort: 30002
|
- containerPort: 30002
|
||||||
name: epp
|
name: epp
|
||||||
|
- containerPort: 30010
|
||||||
|
name: http-whois
|
||||||
|
- containerPort: 30011
|
||||||
|
name: https-whois
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: health-check
|
port: health-check
|
||||||
|
|
|
@ -22,6 +22,16 @@ spec:
|
||||||
nodePort: 31002
|
nodePort: 31002
|
||||||
targetPort: epp
|
targetPort: epp
|
||||||
name: epp
|
name: epp
|
||||||
|
- protocol: TCP
|
||||||
|
port: 30010
|
||||||
|
nodePort: 31010
|
||||||
|
targetPort: http-whois
|
||||||
|
name: http-whois
|
||||||
|
- protocol: TCP
|
||||||
|
port: 30011
|
||||||
|
nodePort: 31011
|
||||||
|
targetPort: https-whois
|
||||||
|
name: https-whois
|
||||||
type: NodePort
|
type: NodePort
|
||||||
---
|
---
|
||||||
apiVersion: autoscaling/v2beta1
|
apiVersion: autoscaling/v2beta1
|
||||||
|
|
|
@ -22,6 +22,16 @@ spec:
|
||||||
nodePort: 30002
|
nodePort: 30002
|
||||||
targetPort: epp
|
targetPort: epp
|
||||||
name: epp
|
name: epp
|
||||||
|
- protocol: TCP
|
||||||
|
port: 30010
|
||||||
|
nodePort: 30010
|
||||||
|
targetPort: http-whois
|
||||||
|
name: http-whois
|
||||||
|
- protocol: TCP
|
||||||
|
port: 30011
|
||||||
|
nodePort: 30011
|
||||||
|
targetPort: https-whois
|
||||||
|
name: https-whois
|
||||||
type: NodePort
|
type: NodePort
|
||||||
---
|
---
|
||||||
apiVersion: autoscaling/v2beta1
|
apiVersion: autoscaling/v2beta1
|
||||||
|
|
|
@ -28,6 +28,8 @@ variable "proxy_ports" {
|
||||||
health_check = 30000
|
health_check = 30000
|
||||||
whois = 30001
|
whois = 30001
|
||||||
epp = 30002
|
epp = 30002
|
||||||
|
http-whois = 30010
|
||||||
|
https-whois = 30011
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,5 +41,7 @@ variable "proxy_ports_canary" {
|
||||||
health_check = 31000
|
health_check = 31000
|
||||||
whois = 31001
|
whois = 31001
|
||||||
epp = 31002
|
epp = 31002
|
||||||
|
http-whois = 31010
|
||||||
|
https-whois = 31011
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,13 @@
|
||||||
# the project, zone and instance group names, and then call gcloud to add the
|
# the project, zone and instance group names, and then call gcloud to add the
|
||||||
# named ports.
|
# named ports.
|
||||||
|
|
||||||
|
PROD_PORTS="whois:30001,epp:30002,http-whois:30010,https-whois:30011"
|
||||||
|
CANARY_PORTS="whois-canary:31001,epp-canary:31002,"\
|
||||||
|
"http-whois-canary:31010,https-whois-canary:31011"
|
||||||
|
|
||||||
while read line
|
while read line
|
||||||
do
|
do
|
||||||
gcloud compute instance-groups set-named-ports \
|
gcloud compute instance-groups set-named-ports --named-ports \
|
||||||
--named-ports whois:30001,epp:30002,whois-canary:31001,epp-canary:31002 \
|
${PROD_PORTS},${CANARY_PORTS} $line
|
||||||
$line
|
|
||||||
done < <(terraform output proxy_instance_groups | awk '{print $3}' | \
|
done < <(terraform output proxy_instance_groups | awk '{print $3}' | \
|
||||||
awk -F '/' '{print "--project", $7, "--zone", $9, $11}')
|
awk -F '/' '{print "--project", $7, "--zone", $9, $11}')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue