The installed InferenceService CRD declares annotations and labels directly under spec.predictor, not under spec.predictor.podMetadata. Two manifests used podMetadata, so every diff and apply failed with 'field not declared in schema' and the whole Application could not reconcile. Move the prometheus scrape annotations and the labels up one level. Nothing is lost: the same keys, in the place the CRD accepts.
64 lines
1.6 KiB
YAML
64 lines
1.6 KiB
YAML
apiVersion: serving.kserve.io/v1beta1
|
|
kind: InferenceService
|
|
metadata:
|
|
annotations:
|
|
serving.kserve.io/deploymentMode: RawDeployment
|
|
labels:
|
|
app.kubernetes.io/name: llm-reranker
|
|
app.kubernetes.io/part-of: llm-serving
|
|
name: reranker
|
|
namespace: llm-serving
|
|
spec:
|
|
predictor:
|
|
containers:
|
|
- args:
|
|
- --model-id=BAAI/bge-reranker-base
|
|
- --port=8080
|
|
- --hostname=0.0.0.0
|
|
- --auto-truncate
|
|
env:
|
|
- name: HUGGINGFACE_HUB_CACHE
|
|
value: /mnt/models
|
|
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.8.2@sha256:4d632b76bd14cb57044a1ffb0ad48ab0ba4939e705a9a615ccc740658575c26e
|
|
name: kserve-container
|
|
ports:
|
|
- containerPort: 8080
|
|
protocol: TCP
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8080
|
|
periodSeconds: 10
|
|
resources:
|
|
limits:
|
|
cpu: '16'
|
|
memory: 8Gi
|
|
requests:
|
|
cpu: '8'
|
|
memory: 4Gi
|
|
startupProbe:
|
|
failureThreshold: 60
|
|
httpGet:
|
|
path: /health
|
|
port: 8080
|
|
periodSeconds: 10
|
|
volumeMounts:
|
|
- mountPath: /mnt/models
|
|
name: models
|
|
annotations:
|
|
prometheus.io/scrape: "true"
|
|
prometheus.io/port: "8080"
|
|
prometheus.io/path: "/metrics"
|
|
labels:
|
|
app.kubernetes.io/name: llm-reranker
|
|
app.kubernetes.io/part-of: llm-serving
|
|
maxReplicas: 1
|
|
minReplicas: 1
|
|
nodeSelector:
|
|
kubernetes.io/hostname: worker-1
|
|
volumes:
|
|
- name: models
|
|
persistentVolumeClaim:
|
|
claimName: llm-models
|
|
|