Open-source inference server and production cluster for all the models your agent needs.
Python bgecolbertdata-pipelinedeep-learningembeddingsinferenceinference-serverinformation-retrievalllmmlmlopsnatural-language-processingnlppythonrerankingretrievalretrieval-augmented-generationsemantic-searchspladevector-search
{{- $networkPolicy := default (dict) .Values.workers.networkPolicy }}
{{- if $networkPolicy.enabled }}
{{- range $index, $rule := (default (list) $networkPolicy.extraIngress) }}
{{- if not (and (kindIs "map" $rule) $rule.from $rule.ports) }}
{{- fail (printf "workers.networkPolicy.extraIngress[%d] needs a non-empty from and ports: a rule without them admits every source or every port on the worker pods." $index) }}
{{- end }}
{{- range $peerIndex, $peer := $rule.from }}
{{- $scoped := false }}
{{- if kindIs "map" $peer }}
{{- range $selectorKey := list "podSelector" "namespaceSelector" }}
{{- $selector := index $peer $selectorKey }}
{{- if and (kindIs "map" $selector) (or $selector.matchLabels $selector.matchExpressions) }}
{{- $scoped = true }}
{{- end }}
{{- end }}
{{- if $peer.ipBlock }}
{{- $cidr := toString (dig "cidr" "" (default (dict) $peer.ipBlock)) }}
{{- if regexMatch "/0+$" (trim $cidr) }}
{{- fail (printf "workers.networkPolicy.extraIngress[%d].from[%d] admits every address (ipBlock %s). To open the worker API to every source, disable workers.networkPolicy instead." $index $peerIndex $cidr) }}
{{- end }}
{{- $scoped = true }}
{{- end }}
{{- end }}
{{- if not $scoped }}
{{- fail (printf "workers.networkPolicy.extraIngress[%d].from[%d] admits every source: give it a podSelector or namespaceSelector with matchLabels or matchExpressions, or an ipBlock." $index $peerIndex) }}
{{- end }}
{{- end }}
{{- range $portIndex, $port := $rule.ports }}
{{- if not (and (kindIs "map" $port) $port.port) }}
{{- fail (printf "workers.networkPolicy.extraIngress[%d].ports[%d] admits every port: set port." $index $portIndex) }}
{{- end }}
{{- if and $port.endPort (not (kindIs "string" $port.port)) (gt (sub (int $port.endPort) (int $port.port)) 60000) }}
{{- fail (printf "workers.networkPolicy.extraIngress[%d].ports[%d] spans nearly every port (%v-%v): list the worker ports instead." $index $portIndex $port.port $port.endPort) }}
{{- end }}
{{- end }}
{{- end }}
{{- $maxWorkerChildCount := int (include "sie-cluster.worker.maxChildCount" .) }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "sie-cluster.fullname" . }}-worker
namespace: {{ include "sie-cluster.namespace" . }}
labels:
{{- include "sie-cluster.worker.labels" . | nindent 4 }}
spec:
podSelector:
matchLabels:
{{- include "sie-cluster.worker.selectorLabels" . | nindent 6 }}
{{- if eq (include "sie-cluster.worker.remoteNetworkPolicyEnabled" .) "true" }}
# The remote lanes have their own policy; extraIngress must not reach them.
matchExpressions:
- key: sie.superlinked.com/bundle
operator: NotIn
values:
- remote
{{- end }}
policyTypes:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
{{- include "sie-cluster.gateway.selectorLabels" . | nindent 14 }}
{{- if include "sie-cluster.workers.authEnforced" . }}
- podSelector:
matchLabels:
{{- include "sie-cluster.workers.authTestSelectorLabels" . | nindent 14 }}
{{- end }}
ports:
{{- range $i := until $maxWorkerChildCount }}
- port: {{ add $.Values.workers.common.port $i }}
protocol: TCP
{{- end }}
{{- with $networkPolicy.extraIngress }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}