atlas-iac/services/logging/opensearch-helmrelease.yaml

122 lines
3.3 KiB
YAML

# services/logging/opensearch-helmrelease.yaml
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: opensearch
namespace: logging
spec:
interval: 15m
timeout: 20m
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
strategy: rollback
postRenderers:
- kustomize:
patches:
- target:
kind: StatefulSet
name: opensearch
patch: |
- op: add
path: /spec/template/spec/containers/0/resources/limits/cpu
value: "2"
- op: replace
path: /spec/template/spec/initContainers/0/resources
value:
requests:
cpu: "10m"
memory: "32Mi"
limits:
cpu: "500m"
memory: "512Mi"
- op: replace
path: /spec/template/spec/initContainers/1/resources
value:
requests:
cpu: "10m"
memory: "32Mi"
limits:
cpu: "500m"
memory: "512Mi"
- op: replace
path: /spec/template/spec/initContainers/2/resources
value:
requests:
cpu: "10m"
memory: "32Mi"
limits:
cpu: "500m"
memory: "512Mi"
chart:
spec:
chart: opensearch
version: "~2.36.0"
sourceRef:
kind: HelmRepository
name: opensearch
namespace: flux-system
values:
fullnameOverride: opensearch
clusterName: opensearch
nodeGroup: master
masterService: opensearch-master
singleNode: true
replicas: 1
minimumMasterNodes: 1
opensearchJavaOpts: "-Xms2g -Xmx2g"
resources:
requests:
cpu: "500m"
memory: "3Gi"
limits:
cpu: "2"
memory: "4Gi"
persistence:
enabled: true
storageClass: asteria
# Historical immutable claim template; opensearch-pvc.yaml owns live size.
size: 500Gi
config:
opensearch.yml: |
cluster.name: opensearch
network.host: 0.0.0.0
discovery.type: single-node
plugins.security.disabled: true
node.store.allow_mmap: false
nodeSelector:
node-role.kubernetes.io/worker: "true"
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: hardware
operator: In
values:
- rpi5
- rpi4
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values: [titan-22]
# Pi workers first; Titan-22 is the explicit last-resort CPU host.
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: hardware
operator: In
values: [rpi5]
- weight: 50
preference:
matchExpressions:
- key: hardware
operator: In
values: [rpi4]
sysctlInit:
enabled: true