93 lines
1.9 KiB
YAML
93 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: tika
|
|
namespace: paperless
|
|
labels:
|
|
app.kubernetes.io/name: tika
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: tika
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: tika
|
|
spec:
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 35002
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: tika
|
|
image: apache/tika:3.3.3.0 # {"$imagepolicy": "flux-system:tika"}
|
|
ports:
|
|
- name: http
|
|
containerPort: 9998
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: http
|
|
initialDelaySeconds: 20
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 512Mi
|
|
limits:
|
|
memory: 1Gi
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop: ["ALL"]
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: tika
|
|
namespace: paperless
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/name: tika
|
|
# anchor: service-port
|
|
ports:
|
|
- port: 9998
|
|
targetPort: http
|
|
---
|
|
apiVersion: autoscaling/v2
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: tika
|
|
namespace: paperless
|
|
spec:
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: tika
|
|
minReplicas: 1
|
|
maxReplicas: 3
|
|
metrics:
|
|
- type: Resource
|
|
resource:
|
|
name: cpu
|
|
target:
|
|
type: Utilization
|
|
averageUtilization: 70
|
|
behavior:
|
|
scaleUp:
|
|
stabilizationWindowSeconds: 0
|
|
policies:
|
|
- type: Pods
|
|
value: 1
|
|
periodSeconds: 90
|
|
scaleDown:
|
|
stabilizationWindowSeconds: 600
|
|
policies:
|
|
- type: Pods
|
|
value: 1
|
|
periodSeconds: 180
|