85 lines
2.1 KiB
YAML
85 lines
2.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: community-search
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
component: web
|
|
template:
|
|
metadata:
|
|
labels:
|
|
component: web
|
|
spec:
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 999
|
|
runAsGroup: 999
|
|
fsGroup: 999
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: community-search
|
|
image: payneio/community-search:0.1.2
|
|
imagePullPolicy: Always
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
readOnlyRootFilesystem: false
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
env:
|
|
- name: COMMUNITY_SEARCH_BIND_ADDR
|
|
value: "0.0.0.0"
|
|
- name: COMMUNITY_SEARCH_PORT
|
|
value: "8080"
|
|
- name: COMMUNITY_SEARCH_DATA_DIR
|
|
value: "/data"
|
|
- name: COMMUNITY_SEARCH_INDEX_PATH
|
|
value: "/data/index"
|
|
- name: COMMUNITY_SEARCH_ADMIN_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: community-search-secrets
|
|
key: adminToken
|
|
- name: SELF_URL
|
|
value: "{{ .selfUrl }}"
|
|
- name: SELF_NAME
|
|
value: "{{ .selfName }}"
|
|
- name: RUST_LOG
|
|
value: "community_search=info,tower_http=warn"
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: 1
|
|
memory: 1Gi
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/collections
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/collections
|
|
port: http
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
timeoutSeconds: 5
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: community-search-data
|