mirror of
https://github.com/google/nomulus
synced 2025-12-23 14:25:44 +00:00
Make Nomulus work on GKE with external load balancer (#2527)
This will create a multi-cluster external load balancer exposing HTTP traffic to nomulus running in clusters in the fleet.
This commit is contained in:
@@ -31,12 +31,16 @@ do
|
||||
echo "Updating cluster ${parts[0]} in location ${parts[1]}..."
|
||||
gcloud container clusters get-credentials "${parts[0]}" \
|
||||
--project "${project}" --location "${parts[1]}"
|
||||
sed s/GCP_PROJECT/${project}/g "./kubernetes/nomulus-deployment.yaml" | \
|
||||
sed s/ENVIRONMENT/${environment}/g | \
|
||||
sed s/GCP_PROJECT/"${project}"/g "./kubernetes/nomulus-deployment.yaml" | \
|
||||
sed s/ENVIRONMENT/"${environment}"/g | \
|
||||
kubectl apply -f -
|
||||
kubectl apply -f "./kubernetes/nomulus-service.yaml"
|
||||
#kubectl apply -f "./kubernetes/nomulus-gateway.yaml"
|
||||
# Kills all running pods, new pods created will be pulling the new image.
|
||||
kubectl delete pods --all
|
||||
done < <(gcloud container clusters list --project ${project} | grep nomulus)
|
||||
# The multi-cluster gateway is only deployed to one cluster (the one in the US).
|
||||
if [[ "${parts[1]}" == us-* ]]
|
||||
then
|
||||
kubectl apply -f "./kubernetes/nomulus-gateway.yaml"
|
||||
fi
|
||||
done < <(gcloud container clusters list --project "${project}" | grep nomulus)
|
||||
kubectl config use-context "$current_context"
|
||||
|
||||
@@ -28,4 +28,19 @@ spec:
|
||||
kind: ServiceImport
|
||||
name: nomulus
|
||||
port: 80
|
||||
---
|
||||
apiVersion: networking.gke.io/v1
|
||||
kind: HealthCheckPolicy
|
||||
metadata:
|
||||
name: nomulus
|
||||
spec:
|
||||
default:
|
||||
config:
|
||||
type: HTTP
|
||||
httpHealthCheck:
|
||||
requestPath: /healthz/
|
||||
targetRef:
|
||||
group: net.gke.io
|
||||
kind: ServiceImport
|
||||
name: nomulus
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ spec:
|
||||
- port: 700
|
||||
targetPort: epp
|
||||
name: epp
|
||||
#---
|
||||
#kind: ServiceExport
|
||||
#apiVersion: net.gke.io/v1
|
||||
#metadata:
|
||||
# name: nomulus
|
||||
---
|
||||
kind: ServiceExport
|
||||
apiVersion: net.gke.io/v1
|
||||
metadata:
|
||||
name: nomulus
|
||||
|
||||
5
jetty/src/main/jetty-base/webapps/healthz/index.html
Normal file
5
jetty/src/main/jetty-base/webapps/healthz/index.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<title>Health Check</title>
|
||||
<body>Health check successful.</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user