{% if PANORAMA_RUN_K8S_FLUENTBIT %}
# Panorama logs (fluentbit) for K8s - Patch daemon set namespace
# Log extraction is done for all namespaces at a time, and must not be in
# an app namespace, but in kube-system.
# Currently, Kustomization overrides all namespaces in all resources.
# This is a known limitation disussed in this issue: https://github.com/kubernetes-sigs/kustomize/issues/880
# This path allows overriding the namespace of the fluentbit daemonset.

patchesJson6902:
  - target:
      group: ""
      version: v1
      kind: DaemonSet
      name: fluentbit
    patch: |-
      - op: replace
        path: /metadata/namespace
        value: kube-system
  - target:
      group: ""
      version: v1
      kind: ConfigMap
      name: fluent-bit-config
    patch: |-
      - op: replace
        path: /metadata/namespace
        value: kube-system
  - target:
      group: ""
      version: v1
      kind: ServiceAccount
      name: fluent-bit
    patch: |-
      - op: replace
        path: /metadata/namespace
        value: kube-system
{% endif %}