49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
# services/logging/opensearch-maintenance-placement-check-job.yaml
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: opensearch-maintenance-placement-check-v1
|
|
namespace: logging
|
|
spec:
|
|
backoffLimit: 0
|
|
activeDeadlineSeconds: 300
|
|
template:
|
|
spec:
|
|
restartPolicy: OnFailure
|
|
priorityClassName: maintenance-batch
|
|
automountServiceAccountToken: false
|
|
nodeSelector:
|
|
node-role.kubernetes.io/worker: 'true'
|
|
affinity:
|
|
nodeAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
- key: hardware
|
|
operator: In
|
|
values:
|
|
- rpi5
|
|
- rpi4
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
preference:
|
|
matchExpressions:
|
|
- key: hardware
|
|
operator: In
|
|
values:
|
|
- rpi5
|
|
containers:
|
|
- name: check
|
|
image: python@sha256:0495f5559318affa673172ec7e35cd0a5213e4aaf4c76d0a66554c0af97b157e
|
|
command:
|
|
- python
|
|
- -c
|
|
- import urllib.request; r=urllib.request.urlopen("http://opensearch-master.logging.svc.cluster.local:9200/_cluster/health", timeout=20); assert r.status == 200; r.close(); print("OpenSearch health HTTP 200")
|
|
resources:
|
|
requests:
|
|
cpu: 10m
|
|
memory: 32Mi
|
|
limits:
|
|
cpu: 200m
|
|
memory: 128Mi
|