{{- if eq .Values.config.existingSecret "" }}
{{- $fullName := include "falcosidekick.fullname" . -}}
---
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "falcosidekick.fullname" . }}
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "falcosidekick.labels" . | nindent 4 }}
    app.kubernetes.io/component: core
type: Opaque
data:
  # Slack Output
  SLACK_WEBHOOKURL: "{{ .Values.config.slack.webhookurl | b64enc }}"
  SLACK_CHANNEL: "{{ .Values.config.slack.channel | b64enc }}"
  SLACK_OUTPUTFORMAT: "{{ .Values.config.slack.outputformat | b64enc }}"
  SLACK_FOOTER: "{{ .Values.config.slack.footer | b64enc }}"
  SLACK_ICON: "{{ .Values.config.slack.icon | b64enc }}"
  SLACK_USERNAME: "{{ .Values.config.slack.username | b64enc }}"
  SLACK_MINIMUMPRIORITY: "{{ .Values.config.slack.minimumpriority | b64enc }}"
  SLACK_MESSAGEFORMAT: "{{ .Values.config.slack.messageformat | b64enc }}"

  # RocketChat Output
  ROCKETCHAT_WEBHOOKURL: "{{ .Values.config.rocketchat.webhookurl | b64enc }}"
  ROCKETCHAT_OUTPUTFORMAT: "{{ .Values.config.rocketchat.outputformat | b64enc }}"
  ROCKETCHAT_ICON: "{{ .Values.config.rocketchat.icon | b64enc }}"
  ROCKETCHAT_USERNAME: "{{ .Values.config.rocketchat.username | b64enc }}"
  ROCKETCHAT_MINIMUMPRIORITY: "{{ .Values.config.rocketchat.minimumpriority | b64enc }}"
  ROCKETCHAT_MESSAGEFORMAT: "{{ .Values.config.rocketchat.messageformat | b64enc }}"
  ROCKETCHAT_MUTUALTLS: "{{ .Values.config.rocketchat.mutualtls | printf "%t" | b64enc }}"
  ROCKETCHAT_CHECKCERT: "{{ .Values.config.rocketchat.checkcert | printf "%t" | b64enc }}"

  # Mattermost Output
  MATTERMOST_WEBHOOKURL: "{{ .Values.config.mattermost.webhookurl | b64enc }}"
  MATTERMOST_OUTPUTFORMAT: "{{ .Values.config.mattermost.outputformat | b64enc }}"
  MATTERMOST_FOOTER: "{{ .Values.config.mattermost.footer | b64enc }}"
  MATTERMOST_ICON: "{{ .Values.config.mattermost.icon | b64enc }}"
  MATTERMOST_USERNAME: "{{ .Values.config.mattermost.username | b64enc }}"
  MATTERMOST_MINIMUMPRIORITY: "{{ .Values.config.mattermost.minimumpriority | b64enc }}"
  MATTERMOST_MESSAGEFORMAT: "{{ .Values.config.mattermost.messageformat | b64enc }}"
  MATTERMOST_MUTUALTLS: "{{ .Values.config.mattermost.mutualtls | printf "%t" | b64enc }}"
  MATTERMOST_CHECKCERT: "{{ .Values.config.mattermost.checkcert | printf "%t" | b64enc }}"

  # Teams Output
  TEAMS_WEBHOOKURL: "{{ .Values.config.teams.webhookurl | b64enc }}"
  TEAMS_OUTPUTFORMAT: "{{ .Values.config.teams.outputformat | b64enc }}"
  TEAMS_ACTIVITYIMAGE: "{{ .Values.config.teams.activityimage | b64enc }}"
  TEAMS_MINIMUMPRIORITY: "{{ .Values.config.teams.minimumpriority | b64enc }}"

  # Datadog Output
  DATADOG_APIKEY: "{{ .Values.config.datadog.apikey | b64enc }}"
  DATADOG_HOST: "{{ .Values.config.datadog.host | b64enc }}"
  DATADOG_MINIMUMPRIORITY: "{{ .Values.config.datadog.minimumpriority | b64enc }}"

  # AlertManager Output
  ALERTMANAGER_HOSTPORT: "{{ .Values.config.alertmanager.hostport | b64enc }}"
  ALERTMANAGER_ENDPOINT: "{{ .Values.config.alertmanager.endpoint | b64enc }}"
  ALERTMANAGER_EXPIRESAFTER: "{{ .Values.config.alertmanager.expireafter | b64enc }}"
  {{- if .Values.config.alertmanager.extralabels }}
  ALERTMANAGER_EXTRALABELS: "{{ .Values.config.alertmanager.extralabels | b64enc }}"
  {{- end }}
  {{- if .Values.config.alertmanager.extraannotations }}
  ALERTMANAGER_EXTRAANNOTATIONS: "{{ .Values.config.alertmanager.extraannotations | b64enc }}"
  {{- end }}
  {{- if .Values.config.alertmanager.customseveritymap }}
  ALERTMANAGER_CUSTOMSEVERITYMAP: "{{ .Values.config.alertmanager.customseveritymap | b64enc }}"
  {{- end }}
  {{- if .Values.config.alertmanager.dropeventdefaultpriority }}
  ALERTMANAGER_DROPEVENTDEFAULTPRIORITY: "{{ .Values.config.alertmanager.dropeventdefaultpriority | b64enc }}"
  {{- end }}
  {{- if .Values.config.alertmanager.dropeventthresholds }}
  ALERTMANAGER_DROPEVENTTHRESHOLDS: "{{ .Values.config.alertmanager.dropeventthresholds | b64enc }}"
  {{- end }}
  ALERTMANAGER_MINIMUMPRIORITY: "{{ .Values.config.alertmanager.minimumpriority | b64enc }}"
  ALERTMANAGER_MUTUALTLS: "{{ .Values.config.alertmanager.mutualtls | printf "%t" | b64enc }}"
  ALERTMANAGER_CHECKCERT: "{{ .Values.config.alertmanager.checkcert | printf "%t" | b64enc }}"

  # InfluxDB Output
  INFLUXDB_USER: "{{ .Values.config.influxdb.user | b64enc }}"
  INFLUXDB_PASSWORD: "{{ .Values.config.influxdb.password | b64enc }}"
  INFLUXDB_TOKEN: "{{ .Values.config.influxdb.token | b64enc }}"
  INFLUXDB_HOSTPORT: "{{ .Values.config.influxdb.hostport | b64enc }}"
  INFLUXDB_ORGANIZATION: "{{ .Values.config.influxdb.organization | b64enc }}"
  INFLUXDB_PRECISION: "{{ .Values.config.influxdb.precision | b64enc }}"
  INFLUXDB_MINIMUMPRIORITY: "{{ .Values.config.influxdb.minimumpriority | b64enc }}"
  INFLUXDB_DATABASE: "{{ .Values.config.influxdb.database | b64enc }}"
  INFLUXDB_MUTUALTLS: "{{ .Values.config.influxdb.mutualtls | printf "%t" | b64enc }}"
  INFLUXDB_CHECKCERT: "{{ .Values.config.influxdb.checkcert | printf "%t" | b64enc }}"

  # AWS Output
  AWS_ACCESSKEYID: "{{ .Values.config.aws.accesskeyid | b64enc }}"
  {{- if not .Values.config.aws.useirsa }}
  AWS_ROLEARN: "{{ .Values.config.aws.rolearn | b64enc }}"
  AWS_EXTERNALID: "{{ .Values.config.aws.externalid | b64enc }}"
  {{- end }}
  AWS_SECRETACCESSKEY: "{{ .Values.config.aws.secretaccesskey | b64enc }}"
  AWS_REGION: "{{ .Values.config.aws.region | b64enc }}"
  AWS_CHECKIDENTITY: "{{ .Values.config.aws.checkidentity | printf "%t" | b64enc }}"
  AWS_LAMBDA_FUNCTIONNAME: "{{ .Values.config.aws.lambda.functionname | b64enc }}"
  AWS_LAMBDA_MINIMUMPRIORITY: "{{ .Values.config.aws.lambda.minimumpriority | b64enc }}"
  AWS_CLOUDWATCHLOGS_LOGGROUP: "{{ .Values.config.aws.cloudwatchlogs.loggroup | b64enc }}"
  AWS_CLOUDWATCHLOGS_LOGSTREAM: "{{ .Values.config.aws.cloudwatchlogs.logstream | b64enc }}"
  AWS_CLOUDWATCHLOGS_MINIMUMPRIORITY: "{{ .Values.config.aws.cloudwatchlogs.minimumpriority | b64enc }}"
  AWS_SNS_TOPICARN: "{{ .Values.config.aws.sns.topicarn | b64enc }}"
  AWS_SNS_RAWJSON: "{{ .Values.config.aws.sns.rawjson| printf "%t" | b64enc }}"
  AWS_SNS_MINIMUMPRIORITY: "{{ .Values.config.aws.sns.minimumpriority | b64enc }}"
  AWS_SQS_URL: "{{ .Values.config.aws.sqs.url | b64enc }}"
  AWS_SQS_MINIMUMPRIORITY: "{{ .Values.config.aws.sqs.minimumpriority | b64enc }}"
  AWS_S3_BUCKET: "{{ .Values.config.aws.s3.bucket | b64enc }}"
  AWS_S3_PREFIX: "{{ .Values.config.aws.s3.prefix | b64enc }}"
  AWS_S3_MINIMUMPRIORITY: "{{ .Values.config.aws.s3.minimumpriority | b64enc }}"
  AWS_KINESIS_STREAMNAME: "{{ .Values.config.aws.kinesis.streamname | b64enc }}"
  AWS_KINESIS_MINIMUMPRIORITY: "{{ .Values.config.aws.kinesis.minimumpriority | b64enc }}"
  AWS_SECURITYLAKE_BUCKET: "{{ .Values.config.aws.securitylake.bucket | b64enc }}"
  AWS_SECURITYLAKE_REGION: "{{ .Values.config.aws.securitylake.region | b64enc }}"
  AWS_SECURITYLAKE_PREFIX: "{{ .Values.config.aws.securitylake.prefix | b64enc }}"
  AWS_SECURITYLAKE_ACCOUNTID: "{{ .Values.config.aws.securitylake.accountid | b64enc }}"
  AWS_SECURITYLAKE_INTERVAL: "{{ .Values.config.aws.securitylake.interval | toString | b64enc }}"
  AWS_SECURITYLAKE_BATCHSIZE: "{{ .Values.config.aws.securitylake.batchsize | toString | b64enc }}"
  AWS_SECURITYLAKE_MINIMUMPRIORITY: "{{ .Values.config.aws.securitylake.minimumpriority | b64enc }}"

  # SMTP Output
  SMTP_USER: "{{ .Values.config.smtp.user | b64enc }}"
  SMTP_PASSWORD: "{{ .Values.config.smtp.password | b64enc }}"
  SMTP_AUTHMECHANISM: "{{ .Values.config.smtp.authmechanism | b64enc }}"
  SMTP_TLS: "{{ .Values.config.smtp.tls | printf "%t" | b64enc }}"
  SMTP_HOSTPORT: "{{ .Values.config.smtp.hostport | b64enc }}"
  SMTP_FROM: "{{ .Values.config.smtp.from | b64enc }}"
  SMTP_TO: "{{ .Values.config.smtp.to | b64enc }}"
  SMTP_TOKEN: "{{ .Values.config.smtp.token | b64enc }}"
  SMTP_IDENTITY: "{{ .Values.config.smtp.identity | b64enc }}"
  SMTP_TRACE: "{{ .Values.config.smtp.trace | b64enc }}"
  SMTP_OUTPUTFORMAT: "{{ .Values.config.smtp.outputformat | b64enc }}"
  SMTP_MINIMUMPRIORITY: "{{ .Values.config.smtp.minimumpriority | b64enc }}"

  # OpsGenie Output
  OPSGENIE_APIKEY: "{{ .Values.config.opsgenie.apikey | b64enc }}"
  OPSGENIE_REGION: "{{ .Values.config.opsgenie.region | b64enc }}"
  OPSGENIE_MINIMUMPRIORITY: "{{ .Values.config.opsgenie.minimumpriority | b64enc }}"
  OPSGENIE_MUTUALTLS: "{{ .Values.config.opsgenie.mutualtls | printf "%t" | b64enc }}"
  OPSGENIE_CHECKCERT: "{{ .Values.config.opsgenie.checkcert | printf "%t" | b64enc }}"

  # Discord Output
  DISCORD_WEBHOOKURL: "{{ .Values.config.discord.webhookurl | b64enc }}"
  DISCORD_ICON: "{{ .Values.config.discord.icon | b64enc }}"
  DISCORD_MINIMUMPRIORITY: "{{ .Values.config.discord.minimumpriority | b64enc }}"

  # GCP Output
  GCP_CREDENTIALS: "{{ .Values.config.gcp.credentials | b64enc }}"
  GCP_PUBSUB_PROJECTID: "{{ .Values.config.gcp.pubsub.projectid | b64enc }}"
  GCP_PUBSUB_TOPIC: "{{ .Values.config.gcp.pubsub.topic | b64enc }}"
  GCP_PUBSUB_CUSTOMATTRIBUTES: "{{ .Values.config.gcp.pubsub.customattributes | b64enc }}"
  GCP_PUBSUB_MINIMUMPRIORITY: "{{ .Values.config.gcp.pubsub.minimumpriority | b64enc }}"
  GCP_STORAGE_BUCKET: "{{ .Values.config.gcp.storage.bucket | b64enc }}"
  GCP_STORAGE_PREFIX: "{{ .Values.config.gcp.storage.prefix | b64enc }}"
  GCP_STORAGE_MINIMUMPRIORITY: "{{ .Values.config.gcp.storage.minimumpriority | b64enc }}"
  GCP_CLOUDFUNCTIONS_NAME: "{{ .Values.config.gcp.cloudfunctions.name | b64enc }}"
  GCP_CLOUDFUNCTIONS_MINIMUMPRIORITY: "{{ .Values.config.gcp.cloudfunctions.minimumpriority | b64enc }}"
  GCP_CLOUDRUN_ENDPOINT: "{{ .Values.config.gcp.cloudrun.endpoint | b64enc }}"
  GCP_CLOUDRUN_JWT: "{{ .Values.config.gcp.cloudrun.jwt | b64enc }}"
  GCP_CLOUDRUN_MINIMUMPRIORITY: "{{ .Values.config.gcp.cloudrun.minimumpriority | b64enc }}"

  # GoogleChat Output
  GOOGLECHAT_WEBHOOKURL: "{{ .Values.config.googlechat.webhookurl | b64enc }}"
  GOOGLECHAT_OUTPUTFORMAT: "{{ .Values.config.googlechat.outputformat | b64enc }}"
  GOOGLECHAT_MINIMUMPRIORITY: "{{ .Values.config.googlechat.minimumpriority | b64enc }}"
  GOOGLECHAT_MESSAGEFORMAT: "{{ .Values.config.googlechat.messageformat | b64enc }}"

  # ElasticSearch Output
  ELASTICSEARCH_HOSTPORT: "{{ .Values.config.elasticsearch.hostport | b64enc }}"
  ELASTICSEARCH_INDEX: "{{ .Values.config.elasticsearch.index | b64enc }}"
  ELASTICSEARCH_TYPE: "{{ .Values.config.elasticsearch.type | b64enc }}"
  ELASTICSEARCH_SUFFIX: "{{ .Values.config.elasticsearch.suffix | b64enc }}"
  ELASTICSEARCH_MINIMUMPRIORITY: "{{ .Values.config.elasticsearch.minimumpriority | b64enc }}"
  ELASTICSEARCH_MUTUALTLS: "{{ .Values.config.elasticsearch.mutualtls | printf "%t" | b64enc }}"
  ELASTICSEARCH_CHECKCERT: "{{ .Values.config.elasticsearch.checkcert | printf "%t" | b64enc }}"
  ELASTICSEARCH_USERNAME: "{{ .Values.config.elasticsearch.username | b64enc }}"
  ELASTICSEARCH_PASSWORD: "{{ .Values.config.elasticsearch.password | b64enc }}"
  ELASTICSEARCH_CUSTOMHEADERS: "{{ .Values.config.elasticsearch.customheaders | b64enc }}"

  # Loki Output
  LOKI_HOSTPORT: "{{ .Values.config.loki.hostport | b64enc }}"
  LOKI_ENDPOINT: "{{ .Values.config.loki.endpoint | b64enc }}"
  LOKI_USER: "{{ .Values.config.loki.user | b64enc }}"
  LOKI_APIKEY: "{{ .Values.config.loki.apikey | b64enc }}"
  LOKI_TENANT: "{{ .Values.config.loki.tenant | b64enc }}"
  LOKI_EXTRALABELS: "{{ .Values.config.loki.extralabels | b64enc }}"
  LOKI_CUSTOMHEADERS: "{{ .Values.config.loki.customheaders | b64enc }}"
  LOKI_MINIMUMPRIORITY: "{{ .Values.config.loki.minimumpriority | b64enc }}"
  LOKI_MUTUALTLS: "{{ .Values.config.loki.mutualtls | printf "%t" | b64enc }}"
  LOKI_CHECKCERT: "{{ .Values.config.loki.checkcert | printf "%t" | b64enc }}"

  # Prometheus Output
  PROMETHEUS_EXTRALABELS: "{{ .Values.config.prometheus.extralabels | b64enc }}"

  # Nats Output
  NATS_HOSTPORT: "{{ .Values.config.nats.hostport | b64enc }}"
  NATS_MINIMUMPRIORITY: "{{ .Values.config.nats.minimumpriority | b64enc }}"
  NATS_MUTUALTLS: "{{ .Values.config.nats.mutualtls | printf "%t" | b64enc }}"
  NATS_CHECKCERT: "{{ .Values.config.nats.checkcert | printf "%t" | b64enc }}"

  # Stan Output
  STAN_HOSTPORT: "{{ .Values.config.stan.hostport | b64enc }}"
  STAN_CLUSTERID: "{{ .Values.config.stan.clusterid | b64enc }}"
  STAN_CLIENTID: "{{ .Values.config.stan.clientid | b64enc }}"
  STAN_MINIMUMPRIORITY: "{{ .Values.config.stan.minimumpriority | b64enc }}"
  STAN_MUTUALTLS: "{{ .Values.config.stan.mutualtls | printf "%t" | b64enc }}"
  STAN_CHECKCERT: "{{ .Values.config.stan.checkcert | printf "%t" | b64enc }}"

  # Statsd
  STATSD_FORWARDER: "{{ .Values.config.statsd.forwarder | b64enc }}"
  STATSD_NAMESPACE: "{{ .Values.config.statsd.namespace | b64enc }}"

  # Dogstatsd
  DOGSTATSD_FORWARDER: "{{ .Values.config.dogstatsd.forwarder | b64enc }}"
  DOGSTATSD_NAMESPACE: "{{ .Values.config.dogstatsd.namespace | b64enc }}"
  DOGSTATSD_TAGS: "{{ .Values.config.dogstatsd.tags | b64enc }}"

  # WebHook Output
  WEBHOOK_ADDRESS: "{{ .Values.config.webhook.address | b64enc }}"
  WEBHOOK_METHOD: "{{ .Values.config.webhook.method | b64enc }}"
  WEBHOOK_CUSTOMHEADERS: "{{ .Values.config.webhook.customHeaders | b64enc }}"
  WEBHOOK_MINIMUMPRIORITY: "{{ .Values.config.webhook.minimumpriority | b64enc }}"
  WEBHOOK_MUTUALTLS: "{{ .Values.config.webhook.mutualtls | printf "%t" | b64enc }}"
  WEBHOOK_CHECKCERT: "{{ .Values.config.webhook.checkcert | printf "%t" | b64enc }}"

  # Azure Output
  AZURE_EVENTHUB_NAME: "{{ .Values.config.azure.eventHub.name | b64enc }}"
  AZURE_EVENTHUB_NAMESPACE: "{{ .Values.config.azure.eventHub.namespace | b64enc }}"
  AZURE_EVENTHUB_MINIMUMPRIORITY: "{{ .Values.config.azure.eventHub.minimumpriority | b64enc }}"

  # Kafka Output
  KAFKA_HOSTPORT: "{{ .Values.config.kafka.hostport | b64enc }}"
  KAFKA_TOPIC: "{{ .Values.config.kafka.topic | b64enc }}"
  KAFKA_SASL: "{{ .Values.config.kafka.sasl | b64enc }}"
  KAFKA_TLS: "{{ .Values.config.kafka.tls | printf "%t" |b64enc }}"
  KAFKA_USERNAME: "{{ .Values.config.kafka.username | b64enc }}"
  KAFKA_PASSWORD: "{{ .Values.config.kafka.password | b64enc }}"
  KAFKA_ASYNC: "{{ .Values.config.kafka.async | printf "%t" | b64enc }}"
  KAFKA_REQUIREDACKS: "{{ .Values.config.kafka.requiredacks | b64enc }}"
  KAFKA_COMPRESSION: "{{ .Values.config.kafka.compression | b64enc }}"
  KAFKA_BALANCER: "{{ .Values.config.kafka.balancer | b64enc }}"
  KAFKA_TOPICCREATION: "{{ .Values.config.kafka.topiccreation | printf "%t" | b64enc }}"
  KAFKA_CLIENTID: "{{ .Values.config.kafka.clientid | b64enc }}"
  KAFKA_MINIMUMPRIORITY: "{{ .Values.config.kafka.minimumpriority | b64enc }}"

  # PagerDuty Output
  PAGERDUTY_ROUTINGKEY: "{{ .Values.config.pagerduty.routingkey | b64enc }}"
  PAGERDUTY_REGION: "{{ .Values.config.pagerduty.region | b64enc }}"
  PAGERDUTY_MINIMUMPRIORITY: "{{ .Values.config.pagerduty.minimumpriority | b64enc }}"

  # Kubeless Output
  KUBELESS_FUNCTION: "{{ .Values.config.kubeless.function | b64enc }}"
  KUBELESS_NAMESPACE: "{{ .Values.config.kubeless.namespace | b64enc }}"
  KUBELESS_PORT: "{{ .Values.config.kubeless.port | toString | b64enc }}"
  KUBELESS_MINIMUMPRIORITY: "{{ .Values.config.kubeless.minimumpriority | b64enc }}"
  KUBELESS_MUTUALTLS: "{{ .Values.config.kubeless.mutualtls | printf "%t" | b64enc }}"
  KUBELESS_CHECKCERT: "{{ .Values.config.kubeless.checkcert | printf "%t" | b64enc }}"

  # OpenFaaS
  OPENFAAS_GATEWAYNAMESPACE: "{{ .Values.config.openfaas.gatewaynamespace | b64enc }}"
  OPENFAAS_GATEWAYSERVICE: "{{ .Values.config.openfaas.gatewayservice | b64enc }}"
  OPENFAAS_FUNCTIONNAME: "{{ .Values.config.openfaas.functionname | b64enc }}"
  OPENFAAS_FUNCTIONNAMESPACE: "{{ .Values.config.openfaas.functionnamespace | b64enc }}"
  OPENFAAS_GATEWAYPORT: "{{ .Values.config.openfaas.gatewayport | toString | b64enc }}"
  OPENFAAS_MINIMUMPRIORITY: "{{ .Values.config.openfaas.minimumpriority | b64enc }}"
  OPENFAAS_MUTUALTLS: "{{ .Values.config.openfaas.mutualtls | printf "%t" | b64enc }}"
  OPENFAAS_CHECKCERT: "{{ .Values.config.openfaas.checkcert | printf "%t" | b64enc }}"

  # Cloud Events Output
  CLOUDEVENTS_ADDRESS: "{{ .Values.config.cloudevents.address | b64enc }}"
  CLOUDEVENTS_EXTENSION: "{{ .Values.config.cloudevents.extension | b64enc }}"
  CLOUDEVENTS_MINIMUMPRIORITY: "{{ .Values.config.cloudevents.minimumpriority | b64enc }}"

  # RabbitMQ Output
  RABBITMQ_URL: "{{ .Values.config.rabbitmq.url | b64enc}}"
  RABBITMQ_QUEUE: "{{ .Values.config.rabbitmq.queue | b64enc}}"
  RABBITMQ_MINIMUMPRIORITY: "{{ .Values.config.rabbitmq.minimumpriority | b64enc}}"

  # Wavefront Output
  WAVEFRONT_ENDPOINTTYPE: "{{ .Values.config.wavefront.endpointtype | b64enc}}"
  WAVEFRONT_ENDPOINTHOST: "{{ .Values.config.wavefront.endpointhost | b64enc}}"
  WAVEFRONT_ENDPOINTTOKEN: "{{ .Values.config.wavefront.endpointtoken | b64enc}}"
  WAVEFRONT_ENDPOINTMETRICPORT: "{{ .Values.config.wavefront.endpointmetricport | toString | b64enc}}"
  WAVEFRONT_FLUSHINTERVALSECONDS: "{{ .Values.config.wavefront.flushintervalseconds | toString | b64enc}}"
  WAVEFRONT_BATCHSIZE: "{{ .Values.config.wavefront.batchsize | toString | b64enc}}"
  WAVEFRONT_METRICNAME: "{{ .Values.config.wavefront.metricname | b64enc}}"
  WAVEFRONT_MINIMUMPRIORITY: "{{ .Values.config.wavefront.minimumpriority | b64enc}}"

  # Grafana Output
  GRAFANA_HOSTPORT: "{{ .Values.config.grafana.hostport | b64enc}}"
  GRAFANA_APIKEY: "{{ .Values.config.grafana.apikey | b64enc}}"
  GRAFANA_DASHBOARDID: "{{ .Values.config.grafana.dashboardid | toString | b64enc}}"
  GRAFANA_PANELID: "{{ .Values.config.grafana.panelid | toString | b64enc}}"
  GRAFANA_ALLFIELDSASTAGS: "{{ .Values.config.grafana.allfieldsastags | printf "%t" | b64enc}}"
  GRAFANA_CUSTOMHEADERS: "{{ .Values.config.grafana.customheaders | b64enc}}"
  GRAFANA_MUTUALTLS: "{{ .Values.config.grafana.mutualtls | printf "%t" | b64enc}}"
  GRAFANA_CHECKCERT: "{{ .Values.config.grafana.checkcert | printf "%t" | b64enc}}"
  GRAFANA_MINIMUMPRIORITY: "{{ .Values.config.grafana.minimumpriority | b64enc}}"

  # Grafana On Call Output
  GRAFANAONCALL_WEBHOOKURL: "{{ .Values.config.grafanaoncall.webhookurl | b64enc}}"
  GRAFANAONCALL_CUSTOMHEADERS: "{{ .Values.config.grafanaoncall.customheaders | b64enc}}"
  GRAFANAONCALL_CHECKCERT: "{{ .Values.config.grafanaoncall.checkcert | printf "%t" | b64enc}}"
  GRAFANAONCALL_MUTUALTLS: "{{ .Values.config.grafanaoncall.mutualtls | printf "%t" | b64enc}}"
  GRAFANAONCALL_MINIMUMPRIORITY: "{{ .Values.config.grafanaoncall.minimumpriority | b64enc}}"

  # Fission Output
  FISSION_FUNCTION: "{{ .Values.config.fission.function | b64enc}}"
  FISSION_ROUTERNAMESPACE: "{{ .Values.config.fission.routernamespace | b64enc}}"
  FISSION_ROUTERSERVICE: "{{ .Values.config.fission.routerservice | b64enc}}"
  FISSION_ROUTERPORT: "{{ .Values.config.fission.routerport | toString | b64enc}}"
  FISSION_MINIMUMPRIORITY: "{{ .Values.config.fission.minimumpriority| b64enc}}"
  FISSION_MUTUALTLS: "{{ .Values.config.fission.mutualtls | printf "%t" | b64enc}}"
  FISSION_CHECKCERT: "{{ .Values.config.fission.checkcert | printf "%t" | b64enc}}"

  # Yandex Output
  YANDEX_ACCESSKEYID:  "{{ .Values.config.yandex.accesskeyid | b64enc}}"
  YANDEX_SECRETACCESSKEY: "{{ .Values.config.yandex.secretaccesskey | b64enc}}"
  YANDEX_REGION: "{{ .Values.config.yandex.region | b64enc}}"
  YANDEX_S3_ENDPOINT: "{{ .Values.config.yandex.s3.endpoint | b64enc}}"
  YANDEX_S3_BUCKET: "{{ .Values.config.yandex.s3.bucket | b64enc}}"
  YANDEX_S3_PREFIX: "{{ .Values.config.yandex.s3.prefix | b64enc}}"
  YANDEX_S3_MINIMUMPRIORITY: "{{ .Values.config.yandex.s3.minimumpriority | b64enc}}"
  YANDEX_DATASTREAMS_ENDPOINT: "{{ .Values.config.yandex.datastreams.endpoint | b64enc}}"
  YANDEX_DATASTREAMS_STREAMNAME: "{{ .Values.config.yandex.datastreams.streamname | b64enc}}"
  YANDEX_DATASTREAMS_MINIMUMPRIORITY: "{{ .Values.config.yandex.datastreams.minimumpriority | b64enc}}"

  # KafkaRest Output
  KAFKAREST_ADDRESS: "{{ .Values.config.kafkarest.address | b64enc}}"
  KAFKAREST_VERSION: "{{ .Values.config.kafkarest.version | toString | b64enc}}"
  KAFKAREST_MINIMUMPRIORITY : "{{ .Values.config.kafkarest.minimumpriority | b64enc}}"
  KAFKAREST_MUTUALTLS : "{{ .Values.config.kafkarest.mutualtls | printf "%t" | b64enc}}"
  KAFKAREST_CHECKCERT : "{{ .Values.config.kafkarest.checkcert | printf "%t" | b64enc}}"

  # Syslog
  SYSLOG_HOST: "{{ .Values.config.syslog.host | b64enc}}"
  SYSLOG_PORT: "{{ .Values.config.syslog.port | toString | b64enc}}"
  SYSLOG_PROTOCOL: "{{ .Values.config.syslog.protocol | b64enc}}"
  SYSLOG_FORMAT: "{{ .Values.config.syslog.format | b64enc}}"
  SYSLOG_MINIMUMPRIORITY : "{{ .Values.config.syslog.minimumpriority | b64enc}}"

  # Zoho Cliq
  CLIQ_WEBHOOKURL: "{{ .Values.config.cliq.webhookurl | b64enc}}"
  CLIQ_ICON: "{{ .Values.config.cliq.icon | b64enc}}"
  CLIQ_USEEMOJI: "{{ .Values.config.cliq.useemoji | printf "%t" | b64enc}}"
  CLIQ_OUTPUTFORMAT: "{{ .Values.config.cliq.outputformat | b64enc}}"
  CLIQ_MESSAGEFORMAT: "{{ .Values.config.cliq.messageformat | b64enc}}"
  CLIQ_MINIMUMPRIORITY : "{{ .Values.config.cliq.minimumpriority | b64enc}}"

  # Policy Reporter
  POLICYREPORT_ENABLED: "{{ .Values.config.policyreport.enabled | printf "%t"| b64enc}}"
  POLICYREPORT_KUBECONFIG: "{{ .Values.config.policyreport.kubeconfig | b64enc}}"
  POLICYREPORT_MAXEVENTS: "{{ .Values.config.policyreport.maxevents | toString | b64enc}}"
  POLICYREPORT_PRUNEBYPRIORITY: "{{ .Values.config.policyreport.prunebypriority | printf "%t" | b64enc}}"
  POLICYREPORT_MINIMUMPRIORITY : "{{ .Values.config.policyreport.minimumpriority | b64enc}}"

  # Node Red
  NODERED_ADDRESS: "{{ .Values.config.nodered.address | b64enc}}"
  NODERED_USER: "{{ .Values.config.nodered.user | b64enc}}"
  NODERED_PASSWORD: "{{ .Values.config.nodered.password | b64enc}}"
  NODERED_CUSTOMHEADERS: "{{ .Values.config.nodered.customheaders | b64enc}}"
  NODERED_CHECKCERT : "{{ .Values.config.nodered.checkcert | printf "%t" | b64enc}}"
  NODERED_MINIMUMPRIORITY : "{{ .Values.config.nodered.minimumpriority | b64enc}}"

  # MQTT
  MQTT_BROKER: "{{ .Values.config.mqtt.broker | b64enc}}"
  MQTT_TOPIC: "{{ .Values.config.mqtt.topic | b64enc}}"
  MQTT_QOS: "{{ .Values.config.mqtt.qos | toString | b64enc}}"
  MQTT_RETAINED : "{{ .Values.config.mqtt.retained | printf "%t" | b64enc}}"
  MQTT_USER: "{{ .Values.config.mqtt.user | b64enc}}"
  MQTT_PASSWORD: "{{ .Values.config.mqtt.password | b64enc}}"
  MQTT_CHECKCERT : "{{ .Values.config.mqtt.checkcert | printf "%t" | b64enc}}"
  MQTT_MINIMUMPRIORITY : "{{ .Values.config.mqtt.minimumpriority | b64enc}}"

  # Zincsearch
  ZINCSEARCH_HOSTPORT: "{{ .Values.config.zincsearch.hostport | b64enc}}"
  ZINCSEARCH_INDEX: "{{ .Values.config.zincsearch.index | b64enc}}"
  ZINCSEARCH_USERNAME: "{{ .Values.config.zincsearch.username | b64enc}}"
  ZINCSEARCH_PASSWORD: "{{ .Values.config.zincsearch.password | b64enc}}"
  ZINCSEARCH_CHECKCERT : "{{ .Values.config.zincsearch.checkcert | printf "%t" | b64enc}}"
  ZINCSEARCH_MINIMUMPRIORITY : "{{ .Values.config.zincsearch.minimumpriority | b64enc}}"

  # Gotify
  GOTIFY_HOSTPORT: "{{ .Values.config.gotify.hostport | b64enc}}"
  GOTIFY_TOKEN: "{{ .Values.config.gotify.token | b64enc}}"
  GOTIFY_FORMAT: "{{ .Values.config.gotify.format | b64enc}}"
  GOTIFY_CHECKCERT : "{{ .Values.config.gotify.checkcert | printf "%t" | b64enc}}"
  GOTIFY_MINIMUMPRIORITY : "{{ .Values.config.gotify.minimumpriority | b64enc}}"

  # Tekton
  TEKTON_EVENTLISTENER: "{{ .Values.config.tekton.eventlistener | b64enc}}"
  TEKTON_CHECKCERT : "{{ .Values.config.tekton.checkcert | printf "%t" | b64enc}}"
  TEKTON_MINIMUMPRIORITY : "{{ .Values.config.tekton.minimumpriority | b64enc}}"

  # Spyderbat
  SPYDERBAT_ORGUID: "{{ .Values.config.spyderbat.orguid | b64enc}}"
  SPYDERBAT_APIKEY: "{{ .Values.config.spyderbat.apikey | b64enc}}"
  SPYDERBAT_APIURL: "{{ .Values.config.spyderbat.apiurl | b64enc}}"
  SPYDERBAT_SOURCE: "{{ .Values.config.spyderbat.source | b64enc}}"
  SPYDERBAT_SOURCEDESCRIPTION: "{{ .Values.config.spyderbat.sourcedescription | b64enc}}"
  SPYDERBAT_MINIMUMPRIORITY : "{{ .Values.config.spyderbat.minimumpriority | b64enc}}"

  # TimescaleDB
  TIMESCALEDB_HOST: "{{ .Values.config.timescaledb.host | b64enc}}"
  TIMESCALEDB_PORT: "{{ .Values.config.timescaledb.port | toString | b64enc}}"
  TIMESCALEDB_USER: "{{ .Values.config.timescaledb.user | b64enc}}"
  TIMESCALEDB_PASSWORD: "{{ .Values.config.timescaledb.password | b64enc}}"
  TIMESCALEDB_DATABASE: "{{ .Values.config.timescaledb.database | b64enc}}"
  TIMESCALEDB_HYPERTABLENAME: "{{ .Values.config.timescaledb.hypertablename | b64enc}}"
  TIMESCALEDB_MINIMUMPRIORITY : "{{ .Values.config.timescaledb.minimumpriority | b64enc}}"

  # Redis Output
  REDIS_ADDRESS: "{{ .Values.config.redis.address | b64enc}}"
  REDIS_PASSWORD: "{{ .Values.config.redis.password | b64enc}}"
  REDIS_DATABASE: "{{ .Values.config.redis.database | toString | b64enc}}"
  REDIS_KEY: "{{ .Values.config.redis.key | b64enc}}"
  REDIS_STORAGETYPE: "{{ .Values.config.redis.storagetype | b64enc}}"
  REDIS_MINIMUMPRIORITY : "{{ .Values.config.redis.minimumpriority | b64enc}}"

  # TELEGRAM Output
  TELEGRAM_TOKEN: "{{ .Values.config.telegram.token | b64enc}}"
  TELEGRAM_CHATID: "{{ .Values.config.telegram.chatid | b64enc}}"
  TELEGRAM_MINIMUMPRIORITY : "{{ .Values.config.telegram.minimumpriority | b64enc}}"
  TELEGRAM_CHECKCERT : "{{ .Values.config.telegram.checkcert | printf "%t" | b64enc}}"

  # N8N Output
  N8N_ADDRESS: "{{ .Values.config.n8n.address | b64enc}}"
  N8N_USER: "{{ .Values.config.n8n.user | b64enc}}"
  N8N_PASSWORD: "{{ .Values.config.n8n.password | b64enc}}"
  N8N_MINIMUMPRIORITY : "{{ .Values.config.n8n.minimumpriority | b64enc}}"
  N8N_CHECKCERT : "{{ .Values.config.n8n.checkcert | printf "%t" | b64enc}}"

  # Open Observe Output
  OPENOBSERVE_HOSTPORT: "{{ .Values.config.openobserve.hostport | b64enc}}"
  OPENOBSERVE_USERNAME: "{{ .Values.config.openobserve.username | b64enc}}"
  OPENOBSERVE_PASSWORD: "{{ .Values.config.openobserve.password | b64enc}}"
  OPENOBSERVE_CHECKCERT : "{{ .Values.config.openobserve.checkcert | printf "%t" | b64enc}}"
  OPENOBSERVE_MUTUALTLS : "{{ .Values.config.openobserve.mutualtls | printf "%t" | b64enc}}"
  OPENOBSERVE_CUSTOMHEADERS : "{{ .Values.config.openobserve.customheaders | b64enc}}"
  OPENOBSERVE_ORGANIZATIONNAME: "{{ .Values.config.openobserve.organizationname | b64enc}}"
  OPENOBSERVE_STREAMNAME: "{{ .Values.config.openobserve.streamname | b64enc}}"
  OPENOBSERVE_MINIMUMPRIORITY : "{{ .Values.config.openobserve.minimumpriority | b64enc}}"

  # WebUI Output
  {{- if .Values.webui.enabled -}}
  {{ $weburl := printf "http://%s-ui:2802" (include "falcosidekick.fullname" .) }}
  WEBUI_URL: "{{ $weburl | b64enc }}"
  {{- end }}
{{- end }}
