apiVersion: v1
kind: ConfigMap
metadata:
  name: benthos-delete-table-entry
data:
  benthos.yaml: |-
    input:
      generate:
        interval: 0 0 * * *
        mapping: 'root = {}'
      processors:
        - sql:
            driver: postgres
            data_source_name: ${BENTHOS_TENANT_DB}
            query: |
              DELETE FROM demo WHERE time < NOW() - INTERVAL '24 hours';
            result_codec: none
        - sql:
            driver: postgres
            data_source_name: ${BENTHOS_TENANT_DB}
            query: |
              DELETE FROM accmaximumvalues WHERE time < NOW() - INTERVAL '24 hours';
            result_codec: none
