# services/logging/opensearch-single-node-tune-cronjob.yaml apiVersion: batch/v1 kind: CronJob metadata: name: opensearch-single-node-tune namespace: logging spec: schedule: "*/30 * * * *" concurrencyPolicy: Forbid successfulJobsHistoryLimit: 1 failedJobsHistoryLimit: 3 jobTemplate: spec: backoffLimit: 2 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: tune image: python@sha256:0495f5559318affa673172ec7e35cd0a5213e4aaf4c76d0a66554c0af97b157e command: ["python", "/scripts/tune.py"] env: - name: OPENSEARCH_URL value: http://opensearch-master.logging.svc.cluster.local:9200 resources: requests: cpu: 10m memory: 32Mi limits: cpu: 200m memory: 128Mi volumeMounts: - name: scripts mountPath: /scripts volumes: - name: scripts configMap: name: opensearch-single-node-tune-script