-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Made-so the new "local" command in NGINX_Gateway.star does not log …
…its (long) output to the tiltfile's logs. * Included an explanation of why type:LoadBalancer was chosen over type:NodePort. (since I just did some tests on the local and ovh k8s clusters, and both do in fact work, when the externalIPs field is provided for the k8s cluster) * Renamed "nginx-gateway-node-port" to "entry-point-service". (old name was misleading since it said "node-port" when it was in fact a load-balancer) * Fixed that for the local k8s cluster, the entry-point was being exposed at "localhost:80" rather than "localhost:5100". (to match with existing behavior and documentation; the reason port 80 is dis-preferred is partly because we want to reduce the chance of clashes with other projects and tests that like to use that port)
- Loading branch information
Showing
3 changed files
with
52 additions
and
67 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
Packages/deploy/LoadBalancer/@Attempt7/entry_point_service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: entry-point-service | ||
namespace: default | ||
labels: | ||
app.kubernetes.io/name: nginx-gateway | ||
app.kubernetes.io/instance: nginx-gateway | ||
app.kubernetes.io/version: "1.0.0" | ||
#app.kubernetes.io/name: "nginx-gateway-fabric" | ||
#app.kubernetes.io/instance: "ngf" | ||
# annotations: | ||
# meta.helm.sh/release-name: "release-test-1" | ||
# meta.helm.sh/release-namespace: "default" | ||
spec: | ||
# The below is a comparison between using type:NodePort and type:LoadBalancer. (since both have been confirmed to work both locally and in OVH) | ||
# Advantages of NodePort: | ||
# 1) Slightly simpler mechanics. | ||
# 2) Ensures than an (unneeded) external load-balancer resource isn't provisioned by the cloud-provider. (although OVH *seems* to avoid this, when an external-ip is provided) | ||
# Advantages of LoadBalancer: | ||
# 1) Works for a dev's local k8s cluster. (without needing to create a port-forward) | ||
# 2) Matches with the type of service that (normally) would get created by nginx-gateway-fabric. | ||
# For now, we've chosen to go with "type:LoadBalancer". (mainly because of its advantage #1) | ||
type: LoadBalancer | ||
selector: | ||
#app.kubernetes.io/name: nginx-gateway-fabric | ||
app.kubernetes.io/instance: ngf | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: TILT_PLACEHOLDER:port | ||
targetPort: 80 | ||
"TILT_PLACEHOLDER:externalIPs": | ||
- TILT_PLACEHOLDER:bind_to_address | ||
## The externalTrafficPolicy of the service. The value Local preserves the client source IP. | ||
externalTrafficPolicy: Local | ||
#internalTrafficPolicy: Local |
58 changes: 0 additions & 58 deletions
58
Packages/deploy/LoadBalancer/@Attempt7/node_port_service.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters