From b15928ef4f27b5042115680523414898c96c956b Mon Sep 17 00:00:00 2001 From: Hammad Bashir Date: Tue, 30 Apr 2024 08:43:01 -0700 Subject: [PATCH] [CLN] Dupe of #2082 (#2085) This is a dupe of #2082 targeted at main because it was accidentally merged into the stacked PR. --- Tiltfile | 19 +++++++++---------- bin/cluster-test.sh | 9 +++++++-- k8s/test/logservice-service.yaml | 13 ------------- k8s/test/query-service-service.yaml | 13 ------------- k8s/test/sysdb-service.yaml | 13 ------------- 5 files changed, 16 insertions(+), 51 deletions(-) delete mode 100644 k8s/test/logservice-service.yaml delete mode 100644 k8s/test/query-service-service.yaml delete mode 100644 k8s/test/sysdb-service.yaml diff --git a/Tiltfile b/Tiltfile index fdba17a678f..0e62507d52a 100644 --- a/Tiltfile +++ b/Tiltfile @@ -62,6 +62,12 @@ docker_build( target='compaction_service' ) +k8s_resource( + objects=['chroma:Namespace'], + new_name='namespace', + labels=["infrastructure"], +) + k8s_yaml( helm( 'k8s/distributed-chroma', @@ -78,22 +84,14 @@ k8s_yaml([ # Extra stuff to make debugging and testing easier k8s_yaml([ - 'k8s/test/sysdb-service.yaml', 'k8s/test/jaeger-service.yaml', 'k8s/test/jaeger.yaml', - 'k8s/test/logservice-service.yaml', 'k8s/test/minio.yaml', - 'k8s/test/query-service-service.yaml', 'k8s/test/test-memberlist-cr.yaml', ]) # Lots of things assume the cluster is in a basic state. Get it into a basic # state before deploying anything else. -k8s_resource( - objects=['chroma:Namespace'], - new_name='namespace', - labels=["infrastructure"], -) k8s_resource( objects=[ 'pod-watcher:Role', @@ -104,6 +102,7 @@ k8s_resource( 'sysdb-serviceaccount:serviceaccount', 'sysdb-serviceaccount-rolebinding:RoleBinding', 'sysdb-query-service-memberlist-binding:clusterrolebinding', + 'sysdb-compaction-service-memberlist-binding:clusterrolebinding', 'logservice-serviceaccount:serviceaccount', @@ -112,6 +111,7 @@ k8s_resource( 'query-service-memberlist-readerwriter:ClusterRole', 'query-service-query-service-memberlist-binding:clusterrolebinding', 'query-service-memberlist-readerwriter-binding:clusterrolebinding', + 'query-service:service', 'compaction-service-memberlist-readerwriter:ClusterRole', 'compaction-service-compaction-service-memberlist-binding:clusterrolebinding', @@ -135,11 +135,10 @@ k8s_resource('logservice-migration', resource_deps=['postgres', 'namespace'], la k8s_resource('logservice', resource_deps=['sysdb-migration'], labels=["chroma"], port_forwards='50052:50051') k8s_resource('sysdb', resource_deps=['sysdb-migration'], labels=["chroma"], port_forwards='50051:50051') k8s_resource('frontend-service', resource_deps=['sysdb', 'logservice'],labels=["chroma"], port_forwards='8000:8000') -k8s_resource('query-service', resource_deps=['sysdb'], labels=["chroma"]) +k8s_resource('query-service', resource_deps=['sysdb'], labels=["chroma"], port_forwards='50053:50051') k8s_resource('compaction-service', resource_deps=['sysdb'], labels=["chroma"]) # I have no idea why these need their own lines but the others don't. -k8s_resource(objects=['query-service:service'], new_name='query-service-service', resource_deps=['query-service'], labels=["chroma"]) k8s_resource('jaeger', resource_deps=['k8s_setup'], labels=["debug"]) # Local S3 diff --git a/bin/cluster-test.sh b/bin/cluster-test.sh index 42d5cc39195..9d846fec43b 100755 --- a/bin/cluster-test.sh +++ b/bin/cluster-test.sh @@ -9,8 +9,13 @@ export CHROMA_COORDINATOR_HOST=localhost echo "Chroma Server is running at port $CHROMA_SERVER_HOST" echo "Chroma Coordinator is running at port $CHROMA_COORDINATOR_HOST" -kubectl -n chroma port-forward svc/sysdb-lb 50051:50051 & -kubectl -n chroma port-forward svc/logservice-lb 50052:50051 & +# Despite the fact that tilt forwards the ports +# We need the ports forwarded since tilt ci will +# not keep them forwarded +# https://github.com/tilt-dev/tilt/issues/5964 +kubectl -n chroma port-forward svc/sysdb 50051:50051 & +kubectl -n chroma port-forward svc/logservice 50052:50051 & +kubectl -n chroma port-forward svc/query-service 50053:50051 & kubectl -n chroma port-forward svc/frontend-service 8000:8000 & "$@" diff --git a/k8s/test/logservice-service.yaml b/k8s/test/logservice-service.yaml deleted file mode 100644 index 2d3a4a8566a..00000000000 --- a/k8s/test/logservice-service.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: logservice-lb - namespace: chroma -spec: - ports: - - name: grpc - port: 50051 - targetPort: 50051 - selector: - app: logservice - type: LoadBalancer diff --git a/k8s/test/query-service-service.yaml b/k8s/test/query-service-service.yaml deleted file mode 100644 index 6cfdd71677b..00000000000 --- a/k8s/test/query-service-service.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: query-service-lb - namespace: chroma -spec: - ports: - - name: query-service-port - port: 50052 - targetPort: 50051 - selector: - app: query-service - type: LoadBalancer diff --git a/k8s/test/sysdb-service.yaml b/k8s/test/sysdb-service.yaml deleted file mode 100644 index bcdb4ede2b5..00000000000 --- a/k8s/test/sysdb-service.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: sysdb-lb - namespace: chroma -spec: - ports: - - name: grpc - port: 50051 - targetPort: 50051 - selector: - app: sysdb - type: LoadBalancer