titan-iac/services/logging/oneoffs/opensearch-observability-setup-job.yaml

51 lines
1.6 KiB
YAML
Raw Permalink Normal View History

2026-01-28 01:48:32 -03:00
# services/logging/oneoffs/opensearch-observability-setup-job.yaml
# One-off job for logging/opensearch-observability-setup-2.
# Purpose: opensearch observability setup 2 (see container args/env in this file).
# Run by setting spec.suspend to false, reconcile, then set it back to true.
# Safe to delete the finished Job/pod; it should not run continuously.
2026-01-09 23:27:07 -03:00
apiVersion: batch/v1
kind: Job
metadata:
2026-01-10 00:12:55 -03:00
name: opensearch-observability-setup-2
2026-01-09 23:27:07 -03:00
namespace: logging
spec:
2026-01-28 01:48:32 -03:00
suspend: true
2026-01-09 23:27:07 -03:00
backoffLimit: 3
ttlSecondsAfterFinished: 3600
template:
spec:
restartPolicy: OnFailure
nodeSelector:
node-role.kubernetes.io/worker: "true"
hardware: rpi5
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: hardware
operator: In
values:
- rpi5
containers:
- name: setup
image: python:3.11-alpine
command: ["python", "/scripts/seed.py"]
env:
- name: OSD_URL
value: http://opensearch-dashboards.logging.svc.cluster.local:5601
volumeMounts:
- name: scripts
mountPath: /scripts
readOnly: true
- name: objects
mountPath: /config
readOnly: true
volumes:
- name: scripts
configMap:
name: opensearch-observability-script
- name: objects
configMap:
name: opensearch-observability-objects