apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  - ../../../infrastructure/istio-base
  - ../../../infrastructure/istio-pilot
  - ../../../infrastructure/istio-gateway
  - ../../../infrastructure/istio-config
  - ../../../infrastructure/vault
  - ../../../infrastructure/rabbitmq
  - ../../../infrastructure/zitadel
  - ../../../infrastructure/openobserve
  - ../../../infrastructure/vmstack
  - ../../../infrastructure/prometheus-stack
  - ../../../infrastructure/opentelemetry-operator
  - ../../../infrastructure/opentelemetry-collector
  - ../../../infrastructure/goalert
  - ../../../infrastructure/kafka-exporter
  - ../../../infrastructure/postgres-exporter
  - ./lb-service-override.yaml
  - ./vault-ingress.yaml
  - ./clusterissuer-letsencrypt.yaml
  - ./node-exporter-vmnodescrape.yaml
  - ./istio-gateway-stats-scrape.yaml
  - ./istio-dashboard-compat-vmrule.yaml
  - ./camunda-servicemonitors.yaml
  - ./rabbitmq-exporter.yaml
  - ./kafka-exporter-yc.yaml
  - ./kafka-exporter-yc-rules.yaml
  - ./kafka-exporter-yc-dashboard.yaml
  - ../../../infrastructure/failed-pod-cleanup
patches:
  - path: ./patches/istio-gateway.yaml
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: ingressgateway
      namespace: istio-system
  - path: ./patches/istio-config.yaml
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: istio-config
      namespace: default
  - path: ./patches/vault.yaml
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: vault
      namespace: vault
  - path: ./patches/rabbitmq.yaml
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: rabbitmq
      namespace: rabbitmq
  - path: ./patches/zitadel.yaml
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: zitadel
      namespace: zitadel
  - path: ./patches/openobserve.yaml
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: openobserve
      namespace: openobserve
  - path: ./patches/vmstack.yaml
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: vmstack
      namespace: vmstack
  - path: ./patches/prometheus-stack.yaml
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: prometheus-stack
      namespace: prometheus-stack
  - path: ./patches/opentelemetry-operator.yaml
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: opentelemetry-operator
      namespace: opentelemetry-operator
  - path: ./patches/opentelemetry-collector.yaml
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: opentelemetry-collector
      namespace: opentelemetry-collector
  - path: ./patches/goalert.yaml
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: goalert
      namespace: goalert
  - path: ./patches/kafka-exporter.yaml
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: kafka-exporter
      namespace: kafka-exporter
  - path: ./patches/postgres-exporter.yaml
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: postgres-exporter
      namespace: postgres-exporter

  - path: ./patches/failed-pod-cleanup.yaml
    target:
      group: helm.toolkit.fluxcd.io
      version: v2
      kind: HelmRelease
      name: failed-pod-cleanup
      namespace: default
