From d423e93791366e9a8cfeb68e40f27a8dc76d7b07 Mon Sep 17 00:00:00 2001 From: Venryx Date: Thu, 16 May 2024 14:55:12 -0700 Subject: [PATCH] * Split the "ngf" tilt-resource into two resources, with new "ngf-early" including the service-account and cluster-role[+binding]. This resolved a tilt-up error I was getting (ngf pod creation failed due to service-account not existing, even after resource redeploy), and also may fix the general issue (#309) of tilt-up stalling on the ngf resource. (we'll see) --- Tilt/NGINX_Gateway.star | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Tilt/NGINX_Gateway.star b/Tilt/NGINX_Gateway.star index 187496ed..16b238ea 100644 --- a/Tilt/NGINX_Gateway.star +++ b/Tilt/NGINX_Gateway.star @@ -26,6 +26,16 @@ def Start_NGINXGateway(g): #"service.externalIPs={15.204.30.179}", ], ) + NEXT_k8s_resource_batch(g, [ + { + "new_name": "ngf-early", "labels": ["gateway"], + "objects": [ + "ngf-nginx-gateway-fabric:serviceaccount", + "ngf-nginx-gateway-fabric:clusterrole", + "ngf-nginx-gateway-fabric:clusterrolebinding", + ], + }, + ]) NEXT_k8s_resource_batch(g, [ # we unfortunately can't group these atm; they are added at end of code in helm_remote.star #{"workload": "nginx-gateway-fabric-crds-install", "labels": ["gateway"]}, @@ -37,9 +47,6 @@ def Start_NGINXGateway(g): # commented; had two matches (with same exact id string!) on linux/rancher-desktop (2024-04-27) #"nginxgateways.gateway.nginx.org:customresourcedefinition", "nginx:gatewayclass", - "ngf-nginx-gateway-fabric:serviceaccount", - "ngf-nginx-gateway-fabric:clusterrole", - "ngf-nginx-gateway-fabric:clusterrolebinding", "ngf-config:nginxgateway", ], # This port-forward is only really necessary on Linux, when using docker-engine. (in other cases, k8s auto-creates PF for the load-balancer -- when accessing on the same machine anyway)