apiVersion: v1 kind: Service metadata: name: segment-server namespace: chroma spec: ports: - name: segment-server-port port: 50051 targetPort: 50051 selector: app: segment-server type: ClusterIP --- apiVersion: apps/v1 kind: Deployment metadata: name: segment-server namespace: chroma spec: replicas: 1 selector: matchLabels: app: segment-server template: metadata: labels: app: segment-server member-type: worker spec: containers: - name: segment-server image: worker imagePullPolicy: IfNotPresent command: ["cargo", "run"] ports: - containerPort: 50051 volumeMounts: - name: chroma mountPath: /index_data env: - name: CHROMA_WORKER__PULSAR_URL value: pulsar://pulsar.chroma:6650 - name: CHROMA_WORKER__PULSAR_NAMESPACE value: default - name: CHROMA_WORKER__PULSAR_TENANT value: default - name: CHROMA_WORKER__MY_IP valueFrom: fieldRef: fieldPath: status.podIP # livenessProbe: # grpc: # port: 50051 # initialDelaySeconds: 10 volumes: - name: chroma emptyDir: {} --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: namespace: chroma name: pod-watcher rules: - apiGroups: [""] resources: ["pods"] verbs: ["get", "list", "watch"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: pod-watcher-binding namespace: chroma subjects: - kind: ServiceAccount name: default namespace: chroma roleRef: kind: Role name: pod-watcher apiGroup: rbac.authorization.k8s.io