├── .dockerignore
├── .editorconfig
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.yaml
│ ├── config.yaml
│ ├── feature_request.yaml
│ └── request_help.yaml
├── PULL_REQUEST_TEMPLATE.md
├── dependabot.yml
├── release-drafter.yml
├── renovate-config.js
├── renovate.json5
└── workflows
│ ├── build-fluentbit-image.yaml
│ ├── build-fluentd-image.yaml
│ ├── build-op-image.yaml
│ ├── bump-fluent-bit-version.yaml
│ ├── clone-docker-image-action.yaml
│ ├── helm-ci.yaml
│ ├── issue-auto-closer.yaml
│ ├── lint-test.yaml
│ ├── main.yaml
│ ├── release-tool.yaml
│ ├── renovate.yaml
│ └── scan-docker-image-action.yaml
├── .gitignore
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── PROJECT
├── README.md
├── RELEASE.md
├── VERSION
├── apis
├── fluentbit
│ └── v1alpha2
│ │ ├── clusterfilter_types.go
│ │ ├── clusterfilter_types_test.go
│ │ ├── clusterfluentbitconfig_types.go
│ │ ├── clusterfluentbitconfig_types_test.go
│ │ ├── clusterinput_types.go
│ │ ├── clusterinput_types_test.go
│ │ ├── clustermultilineparser_types.go
│ │ ├── clustermultilineparser_types_test.go
│ │ ├── clusteroutput_types.go
│ │ ├── clusteroutput_types_test.go
│ │ ├── clusterparser_types.go
│ │ ├── collector_types.go
│ │ ├── doc.go
│ │ ├── filter_types.go
│ │ ├── filter_types_test.go
│ │ ├── fluentbit_types.go
│ │ ├── fluentbitconfig_types.go
│ │ ├── groupversion_info.go
│ │ ├── multilineparser_types.go
│ │ ├── multilineparser_types_test.go
│ │ ├── output_types.go
│ │ ├── parser_types.go
│ │ ├── plugins
│ │ ├── common_types.go
│ │ ├── configmap_types.go
│ │ ├── custom
│ │ │ ├── custom_plugin_types.go
│ │ │ └── zz_generated.deepcopy.go
│ │ ├── filter
│ │ │ ├── aws_types.go
│ │ │ ├── grep_types.go
│ │ │ ├── kubernetes_types.go
│ │ │ ├── log_to_metrics_types.go
│ │ │ ├── lua_types.go
│ │ │ ├── modify_types.go
│ │ │ ├── modify_types_test.go
│ │ │ ├── multiline_types.go
│ │ │ ├── nest_types.go
│ │ │ ├── parser_types.go
│ │ │ ├── record_modifier_types.go
│ │ │ ├── record_modifier_types_test.go
│ │ │ ├── rewrite_tag_types.go
│ │ │ ├── throttle_types.go
│ │ │ ├── wasm_types.go
│ │ │ └── zz_generated.deepcopy.go
│ │ ├── input
│ │ │ ├── collectd.go
│ │ │ ├── dummy_types.go
│ │ │ ├── exec_wasi_types.go
│ │ │ ├── fluentbit_metrics_types.go
│ │ │ ├── forward.go
│ │ │ ├── http.go
│ │ │ ├── kubernetes_events_types.go
│ │ │ ├── mqtt.go
│ │ │ ├── nginx.go
│ │ │ ├── node_exporter_metrics_types.go
│ │ │ ├── open_telemetry_types.go
│ │ │ ├── prometheus_scrape_metrics_types.go
│ │ │ ├── statsd.go
│ │ │ ├── syslog.go
│ │ │ ├── systemd_types.go
│ │ │ ├── tail_types.go
│ │ │ ├── tcp.go
│ │ │ ├── udp.go
│ │ │ └── zz_generated.deepcopy.go
│ │ ├── interface.go
│ │ ├── multilineparser
│ │ │ ├── multiline_parser_types.go
│ │ │ └── zz_generated.deepcopy.go
│ │ ├── net_types.go
│ │ ├── output
│ │ │ ├── azure_blob_types.go
│ │ │ ├── azure_log_analytics_types.go
│ │ │ ├── cloud_watch_types.go
│ │ │ ├── data_dog_types.go
│ │ │ ├── datadog_types_test.go
│ │ │ ├── elasticsearch_types.go
│ │ │ ├── file_types.go
│ │ │ ├── firehose_types.go
│ │ │ ├── forward_types.go
│ │ │ ├── gelf_types.go
│ │ │ ├── gelf_types_test.go
│ │ │ ├── http_types.go
│ │ │ ├── influxdb_types.go
│ │ │ ├── influxdb_types_test.go
│ │ │ ├── kafka_types.go
│ │ │ ├── kinesis_types.go
│ │ │ ├── kinesis_types_test.go
│ │ │ ├── loki_types.go
│ │ │ ├── null_types.go
│ │ │ ├── open_search_types.go
│ │ │ ├── open_telemetry_types.go
│ │ │ ├── open_telemetry_types_test.go
│ │ │ ├── prometheus_exporter.go
│ │ │ ├── prometheus_remote_write_types.go
│ │ │ ├── s3_types.go
│ │ │ ├── s3_types_test.go
│ │ │ ├── splunk_types.go
│ │ │ ├── stackdriver_types.go
│ │ │ ├── stdout_types.go
│ │ │ ├── syslog_types.go
│ │ │ ├── tcp_types.go
│ │ │ └── zz_generated.deepcopy.go
│ │ ├── params
│ │ │ ├── kvs.go
│ │ │ └── kvs_test.go
│ │ ├── parser
│ │ │ ├── json_types.go
│ │ │ ├── logfmt_types.go
│ │ │ ├── lstv_types.go
│ │ │ ├── regex_types.go
│ │ │ └── zz_generated.deepcopy.go
│ │ ├── secret_types.go
│ │ ├── tls_types.go
│ │ └── zz_generated.deepcopy.go
│ │ └── zz_generated.deepcopy.go
├── fluentd
│ └── v1alpha1
│ │ ├── clusterfilter_types.go
│ │ ├── clusterfluentdconfig_types.go
│ │ ├── clusterinput_types.go
│ │ ├── clusteroutput_types.go
│ │ ├── doc.go
│ │ ├── filter_types.go
│ │ ├── fluentd_types.go
│ │ ├── fluentdconfig_types.go
│ │ ├── groupversion_info.go
│ │ ├── helper.go
│ │ ├── input_types.go
│ │ ├── output_types.go
│ │ ├── plugins
│ │ ├── common
│ │ │ ├── buffer_types.go
│ │ │ ├── common_types.go
│ │ │ ├── format_types.go
│ │ │ ├── parse_types.go
│ │ │ └── zz_generated.deepcopy.go
│ │ ├── configmap_types.go
│ │ ├── custom
│ │ │ └── custom_types.go
│ │ ├── filter
│ │ │ ├── grep.go
│ │ │ ├── parser.go
│ │ │ ├── record_transformer.go
│ │ │ ├── stdout.go
│ │ │ └── types.go
│ │ ├── input
│ │ │ ├── forward.go
│ │ │ ├── http.go
│ │ │ ├── monitor_agent.go
│ │ │ ├── sample.go
│ │ │ ├── tail.go
│ │ │ └── types.go
│ │ ├── interface.go
│ │ ├── output
│ │ │ ├── cloudwatch.go
│ │ │ ├── copy.go
│ │ │ ├── datadog.go
│ │ │ ├── es.go
│ │ │ ├── forward.go
│ │ │ ├── http.go
│ │ │ ├── kafka.go
│ │ │ ├── loki.go
│ │ │ ├── null.go
│ │ │ ├── opensearch.go
│ │ │ ├── s3.go
│ │ │ ├── stdout.go
│ │ │ └── types.go
│ │ ├── params
│ │ │ ├── const.go
│ │ │ └── model.go
│ │ ├── secret_types.go
│ │ └── tls_types.go
│ │ ├── tests
│ │ ├── expected
│ │ │ ├── duplicate-removal-cr-specs.cfg
│ │ │ ├── fluentd-cluster-cfg-filter-recordTransformer.cfg
│ │ │ ├── fluentd-cluster-cfg-output-buffer-example.cfg
│ │ │ ├── fluentd-cluster-cfg-output-cloudwatch.cfg
│ │ │ ├── fluentd-cluster-cfg-output-copy-es-data-stream.cfg
│ │ │ ├── fluentd-cluster-cfg-output-custom.cfg
│ │ │ ├── fluentd-cluster-cfg-output-datadog.cfg
│ │ │ ├── fluentd-cluster-cfg-output-es-data-stream.cfg
│ │ │ ├── fluentd-cluster-cfg-output-es.cfg
│ │ │ ├── fluentd-cluster-cfg-output-kafka.cfg
│ │ │ ├── fluentd-cluster-cfg-output-loki.cfg
│ │ │ ├── fluentd-cluster-cfg-output-memory-buffer.cfg
│ │ │ ├── fluentd-cluster-cfg-output-null.cfg
│ │ │ ├── fluentd-cluster-cfg-output-opensearch.cfg
│ │ │ ├── fluentd-cluster-cfg-output-stdout-and-loki.cfg
│ │ │ ├── fluentd-global-cfg-input-monitorAgent.cfg
│ │ │ ├── fluentd-global-cfg-input-sample.cfg
│ │ │ ├── fluentd-global-cfg-input-tail.cfg
│ │ │ ├── fluentd-mixed-cfgs-multi-tenant-output.cfg
│ │ │ ├── fluentd-mixed-cfgs-output-copy-1.cfg
│ │ │ ├── fluentd-mixed-cfgs-output-copy-2.cfg
│ │ │ ├── fluentd-mixed-cfgs-output-copy-3.cfg
│ │ │ ├── fluentd-mixed-cfgs-output-copy-4.cfg
│ │ │ ├── fluentd-mixed-cfgs-output-es.cfg
│ │ │ ├── fluentd-mixed-cfgs-output-opensearch.cfg
│ │ │ ├── fluentd-namespaced-cfg-output-es.cfg
│ │ │ └── fluentd-namespaced-cfg-output-opensearch.cfg
│ │ ├── helper_test.go
│ │ └── tools.go
│ │ └── zz_generated.deepcopy.go
└── generated
│ └── clientset
│ └── versioned
│ ├── clientset.go
│ ├── doc.go
│ ├── fake
│ ├── clientset_generated.go
│ ├── doc.go
│ └── register.go
│ ├── scheme
│ ├── doc.go
│ └── register.go
│ └── typed
│ ├── fluentbit
│ └── v1alpha2
│ │ ├── clusterfilter.go
│ │ ├── clusterfluentbitconfig.go
│ │ ├── clusterinput.go
│ │ ├── clustermultilineparser.go
│ │ ├── clusteroutput.go
│ │ ├── clusterparser.go
│ │ ├── collector.go
│ │ ├── doc.go
│ │ ├── fake
│ │ ├── doc.go
│ │ ├── fake_clusterfilter.go
│ │ ├── fake_clusterfluentbitconfig.go
│ │ ├── fake_clusterinput.go
│ │ ├── fake_clustermultilineparser.go
│ │ ├── fake_clusteroutput.go
│ │ ├── fake_clusterparser.go
│ │ ├── fake_collector.go
│ │ ├── fake_filter.go
│ │ ├── fake_fluentbit.go
│ │ ├── fake_fluentbit_client.go
│ │ ├── fake_fluentbitconfig.go
│ │ ├── fake_multilineparser.go
│ │ ├── fake_output.go
│ │ └── fake_parser.go
│ │ ├── filter.go
│ │ ├── fluentbit.go
│ │ ├── fluentbit_client.go
│ │ ├── fluentbitconfig.go
│ │ ├── generated_expansion.go
│ │ ├── multilineparser.go
│ │ ├── output.go
│ │ └── parser.go
│ └── fluentd
│ └── v1alpha1
│ ├── clusterfilter.go
│ ├── clusterfluentdconfig.go
│ ├── clusterinput.go
│ ├── clusteroutput.go
│ ├── doc.go
│ ├── fake
│ ├── doc.go
│ ├── fake_clusterfilter.go
│ ├── fake_clusterfluentdconfig.go
│ ├── fake_clusterinput.go
│ ├── fake_clusteroutput.go
│ ├── fake_filter.go
│ ├── fake_fluentd.go
│ ├── fake_fluentd_client.go
│ ├── fake_fluentdconfig.go
│ ├── fake_input.go
│ └── fake_output.go
│ ├── filter.go
│ ├── fluentd.go
│ ├── fluentd_client.go
│ ├── fluentdconfig.go
│ ├── generated_expansion.go
│ ├── input.go
│ └── output.go
├── charts
├── README.md
├── ct.yaml
└── fluent-operator
│ ├── .helmignore
│ ├── Chart.yaml
│ ├── README.md
│ ├── charts
│ ├── fluent-bit-crds
│ │ ├── .helmignore
│ │ ├── Chart.yaml
│ │ ├── crds
│ │ │ ├── fluentbit.fluent.io_clusterfilters.yaml
│ │ │ ├── fluentbit.fluent.io_clusterfluentbitconfigs.yaml
│ │ │ ├── fluentbit.fluent.io_clusterinputs.yaml
│ │ │ ├── fluentbit.fluent.io_clustermultilineparsers.yaml
│ │ │ ├── fluentbit.fluent.io_clusteroutputs.yaml
│ │ │ ├── fluentbit.fluent.io_clusterparsers.yaml
│ │ │ ├── fluentbit.fluent.io_collectors.yaml
│ │ │ ├── fluentbit.fluent.io_filters.yaml
│ │ │ ├── fluentbit.fluent.io_fluentbitconfigs.yaml
│ │ │ ├── fluentbit.fluent.io_fluentbits.yaml
│ │ │ ├── fluentbit.fluent.io_multilineparsers.yaml
│ │ │ ├── fluentbit.fluent.io_outputs.yaml
│ │ │ └── fluentbit.fluent.io_parsers.yaml
│ │ └── values.yaml
│ └── fluentd-crds
│ │ ├── .helmignore
│ │ ├── Chart.yaml
│ │ ├── crds
│ │ ├── fluentd.fluent.io_clusterfilters.yaml
│ │ ├── fluentd.fluent.io_clusterfluentdconfigs.yaml
│ │ ├── fluentd.fluent.io_clusterinputs.yaml
│ │ ├── fluentd.fluent.io_clusteroutputs.yaml
│ │ ├── fluentd.fluent.io_filters.yaml
│ │ ├── fluentd.fluent.io_fluentdconfigs.yaml
│ │ ├── fluentd.fluent.io_fluentds.yaml
│ │ ├── fluentd.fluent.io_inputs.yaml
│ │ └── fluentd.fluent.io_outputs.yaml
│ │ └── values.yaml
│ ├── templates
│ ├── NOTES.txt
│ ├── _helpers.tpl
│ ├── fluent-operator-clusterRole.yaml
│ ├── fluent-operator-clusterRoleBinding.yaml
│ ├── fluent-operator-deployment.yaml
│ ├── fluentbit-clusterfilter-containerd.yaml
│ ├── fluentbit-clusterfilter-kubernetes.yaml
│ ├── fluentbit-clusterfilter-multiline.yaml
│ ├── fluentbit-clusterfilter-systemd.yaml
│ ├── fluentbit-clusterinput-metrics.yaml
│ ├── fluentbit-clusterinput-nodeExporterMetrics.yaml
│ ├── fluentbit-clusterinput-systemd.yaml
│ ├── fluentbit-clusterinput-tail.yaml
│ ├── fluentbit-containerd-config.yaml
│ ├── fluentbit-fluentBit.yaml
│ ├── fluentbit-fluentbit-edge.yaml
│ ├── fluentbit-input-node-exporter-metrics-edge.yaml
│ ├── fluentbit-input-prometheus-scrape-metrics-edge.yaml
│ ├── fluentbit-lua-config.yaml
│ ├── fluentbit-multilineParser-javaMultiline.yaml
│ ├── fluentbit-output-elasticsearch.yaml
│ ├── fluentbit-output-forward.yaml
│ ├── fluentbit-output-kafka.yaml
│ ├── fluentbit-output-loki.yaml
│ ├── fluentbit-output-opensearch.yaml
│ ├── fluentbit-output-opentelemetry.yaml
│ ├── fluentbit-output-prometheus-exporter.yaml
│ ├── fluentbit-output-prometheus-remote-write-edge.yaml
│ ├── fluentbit-output-stackdriver.yaml
│ ├── fluentbit-output-stdout.yaml
│ ├── fluentbit-servicemonitor.yaml
│ ├── fluentbitconfig-fluentBitConfig.yaml
│ ├── fluentbitconfig-fluentbitconfig-edge.yaml
│ ├── fluentd-clusterfluentdconfig.yaml
│ ├── fluentd-filter-kafka.yaml
│ ├── fluentd-fluentd.yaml
│ ├── fluentd-output-elasticsearch.yaml
│ ├── fluentd-output-kafka.yaml
│ ├── fluentd-output-opensearch.yaml
│ └── serviceaccount.yaml
│ └── values.yaml
├── cmd
├── doc-gen
│ └── main.go
├── fluent-manager
│ ├── Dockerfile
│ └── main.go
├── fluent-watcher
│ ├── README.md
│ ├── fluentbit
│ │ ├── Dockerfile
│ │ ├── Dockerfile.debug
│ │ ├── VERSION
│ │ └── main.go
│ ├── fluentd
│ │ ├── Dockerfile
│ │ ├── VERSION
│ │ ├── etc
│ │ │ ├── app.conf
│ │ │ └── fluent.conf
│ │ └── main.go
│ └── hooks
│ │ └── post-hook.sh
└── upgrade
│ └── upgrade.sh
├── conf
├── fluent-bit.conf
├── fluent-bit.yaml
└── parsers.conf
├── config
├── crd
│ ├── bases
│ │ ├── fluentbit.fluent.io_clusterfilters.yaml
│ │ ├── fluentbit.fluent.io_clusterfluentbitconfigs.yaml
│ │ ├── fluentbit.fluent.io_clusterinputs.yaml
│ │ ├── fluentbit.fluent.io_clustermultilineparsers.yaml
│ │ ├── fluentbit.fluent.io_clusteroutputs.yaml
│ │ ├── fluentbit.fluent.io_clusterparsers.yaml
│ │ ├── fluentbit.fluent.io_collectors.yaml
│ │ ├── fluentbit.fluent.io_filters.yaml
│ │ ├── fluentbit.fluent.io_fluentbitconfigs.yaml
│ │ ├── fluentbit.fluent.io_fluentbits.yaml
│ │ ├── fluentbit.fluent.io_multilineparsers.yaml
│ │ ├── fluentbit.fluent.io_outputs.yaml
│ │ ├── fluentbit.fluent.io_parsers.yaml
│ │ ├── fluentd.fluent.io_clusterfilters.yaml
│ │ ├── fluentd.fluent.io_clusterfluentdconfigs.yaml
│ │ ├── fluentd.fluent.io_clusterinputs.yaml
│ │ ├── fluentd.fluent.io_clusteroutputs.yaml
│ │ ├── fluentd.fluent.io_filters.yaml
│ │ ├── fluentd.fluent.io_fluentdconfigs.yaml
│ │ ├── fluentd.fluent.io_fluentds.yaml
│ │ ├── fluentd.fluent.io_inputs.yaml
│ │ ├── fluentd.fluent.io_outputs.yaml
│ │ ├── kustomization.yaml
│ │ └── kustomizeconfig.yaml
│ ├── kustomization.yaml
│ ├── kustomizeconfig.yaml
│ └── patches
│ │ ├── cainjection_in_clusterfilters.yaml
│ │ ├── cainjection_in_clusterfluentdconfigs.yaml
│ │ ├── cainjection_in_clusteroutputs.yaml
│ │ ├── cainjection_in_filters_fluentbit.yaml
│ │ ├── cainjection_in_filters_fluentd.yaml
│ │ ├── cainjection_in_fluentbitconfigs.yaml
│ │ ├── cainjection_in_fluentbits.yaml
│ │ ├── cainjection_in_fluentdconfigs.yaml
│ │ ├── cainjection_in_fluentds.yaml
│ │ ├── cainjection_in_inputs.yaml
│ │ ├── cainjection_in_outputs_fluentbit.yaml
│ │ ├── cainjection_in_outputs_fluentd.yaml
│ │ ├── cainjection_in_parsers.yaml
│ │ ├── webhook_in_clusterfilters.yaml
│ │ ├── webhook_in_clusterfluentdconfigs.yaml
│ │ ├── webhook_in_clusteroutputs.yaml
│ │ ├── webhook_in_filters_fluentbit.yaml
│ │ ├── webhook_in_filters_fluentd.yaml
│ │ ├── webhook_in_fluentbitconfigs.yaml
│ │ ├── webhook_in_fluentbits.yaml
│ │ ├── webhook_in_fluentdconfigs.yaml
│ │ ├── webhook_in_fluentds.yaml
│ │ ├── webhook_in_inputs.yaml
│ │ ├── webhook_in_outputs_fluentbit.yaml
│ │ ├── webhook_in_outputs_fluentd.yaml
│ │ └── webhook_in_parsers.yaml
├── default
│ ├── kustomization.yaml
│ ├── manager_auth_proxy_patch.yaml
│ └── manager_config_patch.yaml
├── manager
│ ├── controller_manager_config.yaml
│ ├── kustomization.yaml
│ └── manager.yaml
├── prometheus
│ ├── kustomization.yaml
│ └── monitor.yaml
├── rbac
│ ├── auth_proxy_client_clusterrole.yaml
│ ├── auth_proxy_role.yaml
│ ├── auth_proxy_role_binding.yaml
│ ├── auth_proxy_service.yaml
│ ├── clusterfilter_editor_role.yaml
│ ├── clusterfilter_viewer_role.yaml
│ ├── clusterfluentdconfig_editor_role.yaml
│ ├── clusterfluentdconfig_viewer_role.yaml
│ ├── clusteroutput_editor_role.yaml
│ ├── clusteroutput_viewer_role.yaml
│ ├── filter_editor_role.yaml
│ ├── filter_viewer_role.yaml
│ ├── fluentbit_editor_role.yaml
│ ├── fluentbit_viewer_role.yaml
│ ├── fluentbitconfig_editor_role.yaml
│ ├── fluentbitconfig_viewer_role.yaml
│ ├── fluentd_editor_role.yaml
│ ├── fluentd_viewer_role.yaml
│ ├── fluentdconfig_editor_role.yaml
│ ├── fluentdconfig_viewer_role.yaml
│ ├── input_editor_role.yaml
│ ├── input_viewer_role.yaml
│ ├── kustomization.yaml
│ ├── leader_election_role.yaml
│ ├── leader_election_role_binding.yaml
│ ├── output_editor_role.yaml
│ ├── output_viewer_role.yaml
│ ├── parser_editor_role.yaml
│ ├── parser_viewer_role.yaml
│ ├── role.yaml
│ ├── role_binding.yaml
│ ├── scoped
│ │ └── role.yaml
│ └── service_account.yaml
├── samples
│ ├── fluentbit_v1alpha2_clustermultilineparser.yaml
│ ├── fluentbit_v1alpha2_filter.yaml
│ ├── fluentbit_v1alpha2_fluentbit.yaml
│ ├── fluentbit_v1alpha2_fluentbitconfig.yaml
│ ├── fluentbit_v1alpha2_input.yaml
│ ├── fluentbit_v1alpha2_output.yaml
│ ├── fluentbit_v1alpha2_parser.yaml
│ ├── fluentd_v1alpha1_clusterfilter.yaml
│ ├── fluentd_v1alpha1_clusterfluentdconfig.yaml
│ ├── fluentd_v1alpha1_clusteroutput.yaml
│ ├── fluentd_v1alpha1_filter.yaml
│ ├── fluentd_v1alpha1_fluentd.yaml
│ ├── fluentd_v1alpha1_fluentdconfig.yaml
│ └── fluentd_v1alpha1_output.yaml
└── scripts
│ └── systemd.lua
├── controllers
├── collector_controller.go
├── consts.go
├── fluent_controller_finalizer.go
├── fluentbit_controller.go
├── fluentbitconfig_controller.go
├── fluentd_controller.go
├── fluentdconfig_controller.go
└── suite_test.go
├── docs
├── best-practice
│ ├── collect-systemd-logs.md
│ ├── custom-parser.md
│ ├── custom-plugin.md
│ ├── forwarding-logs-via-http
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── deploy
│ │ │ ├── filter-grep.yaml
│ │ │ ├── fluentbit-fluentBit.yaml
│ │ │ ├── fluentbitconfig-fluentBitConfig.yaml
│ │ │ ├── input-tail.yaml
│ │ │ ├── log-generator.yaml
│ │ │ └── output-http.yaml
│ │ ├── kubesphere
│ │ │ ├── filter-grep.yaml
│ │ │ ├── input-tail.yaml
│ │ │ └── output-http.yaml
│ │ └── main.go
│ ├── misc.md
│ ├── monitoring.md
│ └── plugin-grouping.md
├── fluentbit.md
├── fluentd.md
├── images
│ ├── fluent-bit-operator-workflow.svg
│ ├── fluent-operator-icon.svg
│ ├── fluent-operator.drawio
│ ├── fluent-operator.svg
│ ├── fluentbit-operator.svg
│ └── logging-stack.svg
├── plugins
│ ├── fluentbit
│ │ ├── common.md
│ │ ├── configmap.md
│ │ ├── custom
│ │ │ └── custom_plugin.md
│ │ ├── filter
│ │ │ ├── aws.md
│ │ │ ├── grep.md
│ │ │ ├── kubernetes.md
│ │ │ ├── log_to_metrics.md
│ │ │ ├── lua.md
│ │ │ ├── modify.md
│ │ │ ├── multiline.md
│ │ │ ├── nest.md
│ │ │ ├── parser.md
│ │ │ ├── record_modifier.md
│ │ │ ├── rewrite_tag.md
│ │ │ ├── throttle.md
│ │ │ └── wasm.md
│ │ ├── index.md
│ │ ├── input
│ │ │ ├── collectd.md
│ │ │ ├── dummy.md
│ │ │ ├── exec_wasi.md
│ │ │ ├── fluentbit_metrics.md
│ │ │ ├── forward.md
│ │ │ ├── http.md
│ │ │ ├── kubernetes_events.md
│ │ │ ├── mqtt.md
│ │ │ ├── nginx.md
│ │ │ ├── node_exporter_metrics.md
│ │ │ ├── open_telemetry.md
│ │ │ ├── prometheus_scrape_metrics.md
│ │ │ ├── statsd.md
│ │ │ ├── syslog.md
│ │ │ ├── systemd.md
│ │ │ ├── tail.md
│ │ │ ├── tcp.md
│ │ │ └── udp.md
│ │ ├── multilineparser
│ │ │ └── multiline_parser.md
│ │ ├── net.md
│ │ ├── output
│ │ │ ├── azure_blob.md
│ │ │ ├── azure_log_analytics.md
│ │ │ ├── cloud_watch.md
│ │ │ ├── data_dog.md
│ │ │ ├── elasticsearch.md
│ │ │ ├── file.md
│ │ │ ├── firehose.md
│ │ │ ├── forward.md
│ │ │ ├── gelf.md
│ │ │ ├── http.md
│ │ │ ├── influxdb.md
│ │ │ ├── kafka.md
│ │ │ ├── kinesis.md
│ │ │ ├── loki.md
│ │ │ ├── null.md
│ │ │ ├── open_search.md
│ │ │ ├── open_telemetry.md
│ │ │ ├── prometheus_exporter.md
│ │ │ ├── prometheus_remote_write.md
│ │ │ ├── s3.md
│ │ │ ├── splunk.md
│ │ │ ├── stackdriver.md
│ │ │ ├── stdout.md
│ │ │ ├── syslog.md
│ │ │ └── tcp.md
│ │ ├── parser
│ │ │ ├── json.md
│ │ │ ├── logfmt.md
│ │ │ ├── lstv.md
│ │ │ └── regex.md
│ │ ├── secret.md
│ │ └── tls.md
│ └── fluentd
│ │ ├── common
│ │ ├── buffer.md
│ │ ├── common.md
│ │ ├── format.md
│ │ └── parse.md
│ │ ├── configmap.md
│ │ ├── custom
│ │ └── custom.md
│ │ ├── filter
│ │ ├── grep.md
│ │ ├── parser.md
│ │ ├── record_transformer.md
│ │ ├── stdout.md
│ │ └── types.md
│ │ ├── index.md
│ │ ├── input
│ │ ├── forward.md
│ │ ├── http.md
│ │ ├── monitor_agent.md
│ │ ├── sample.md
│ │ ├── tail.md
│ │ └── types.md
│ │ ├── output
│ │ ├── cloudwatch.md
│ │ ├── copy.md
│ │ ├── datadog.md
│ │ ├── elasticsearch.md
│ │ ├── es.md
│ │ ├── forward.md
│ │ ├── http.md
│ │ ├── kafka.md
│ │ ├── loki.md
│ │ ├── null.md
│ │ ├── opensearch.md
│ │ ├── s3.md
│ │ ├── stdout.md
│ │ └── types.md
│ │ ├── secret.md
│ │ └── tls.md
└── proposals
│ └── fluent_operator_20210907.md
├── go.mod
├── go.sum
├── hack
├── boilerplate.go.txt
├── update-helm-package.sh
├── verify-codegen.sh
├── verify-crds.sh
└── verify-helm-package.sh
├── manifests
├── fluentd
│ ├── fluentbit-output-forward.yaml
│ ├── fluentd-cluster-cfg-output-buffer-example.yaml
│ ├── fluentd-cluster-cfg-output-es.yaml
│ ├── fluentd-cluster-cfg-output-kafka.yaml
│ ├── fluentd-mixed-cfgs-multi-tenant-output.yaml
│ ├── fluentd-mixed-cfgs-output-es.yaml
│ └── fluentd-namespaced-cfg-output-es.yaml
├── kubeedge
│ ├── fluentbit-fluentbit-edge.yaml
│ ├── fluentbitconfig-fluentbitconfig-edge.yaml
│ ├── input-node-exporter-metrics-edge.yaml
│ ├── input-prometheus-scrape-metrics-edge.yaml
│ ├── kustomization.yaml
│ ├── output-prometheus-remote-write-edge.yaml
│ └── output-stdout-edge.yaml
├── logging-stack
│ ├── auditd
│ │ ├── auditd-lua-config.yaml
│ │ ├── filter-auditd.yaml
│ │ ├── input-auditd.yaml
│ │ ├── kustomization.yaml
│ │ └── output-auditd-elasticsearch.yaml
│ ├── filter-containerd.yaml
│ ├── filter-kubernetes.yaml
│ ├── filter-systemd.yaml
│ ├── fluentbit-containerd-config.yaml
│ ├── fluentbit-fluentBit.yaml
│ ├── fluentbitconfig-fluentBitConfig.yaml
│ ├── input-systemd.yaml
│ ├── input-tail.yaml
│ ├── kustomization.yaml
│ ├── output-elasticsearch.yaml
│ ├── output-forward.yaml
│ ├── output-kafka.yaml
│ └── systemd-lua-config.yaml
├── quick-start
│ ├── fluentbit.yaml
│ ├── fluentd-forward.yaml
│ └── fluentd-http.yaml
├── regex-parser
│ ├── filter-parser.yaml
│ ├── fluentbit-fluentBit.yaml
│ ├── fluentbitconfig-fluentBitConfig.yaml
│ ├── input-tail.yaml
│ ├── log-generator.yaml
│ ├── output-stdout.yaml
│ └── parser-regex.yaml
└── setup
│ ├── fluent-operator-clusterRole.yaml
│ ├── fluent-operator-clusterRoleBinding.yaml
│ ├── fluent-operator-crd.yaml
│ ├── fluent-operator-deployment.yaml
│ ├── fluent-operator-serviceAccount.yaml
│ ├── kustomization.yaml
│ ├── namespace-namespace.yaml
│ └── setup.yaml
├── pkg
├── filenotify
│ ├── filenotify.go
│ ├── fsnotify.go
│ └── poller.go
├── fluentd
│ └── router
│ │ ├── pluginstore.go
│ │ └── route.go
├── operator
│ ├── collector-service.go
│ ├── collector-statefulset.go
│ ├── daemonset.go
│ ├── fluent-bit-service.go
│ ├── fluentd-daemonset.go
│ ├── fluentd-service.go
│ ├── pvc.go
│ ├── rbac.go
│ └── sts.go
└── utils
│ └── utils.go
└── tests
├── e2e
└── fluentd
│ ├── cfgrender_suite_test.go
│ └── cfgrender_test.go
├── scripts
├── fluentd_e2e.sh
└── fluentd_helm_e2e.sh
└── utils
└── utils.go
/.dockerignore:
--------------------------------------------------------------------------------
1 | # More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
2 | # Ignore all files which are not go type
3 | !**/*.go
4 | !**/*.mod
5 | !**/*.sum
6 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | trim_trailing_whitespace = true
5 | insert_final_newline = true
6 | charset = utf-8
7 | end_of_line = lf
8 | tab_width = 2
9 | indent_size = 2
10 | indent_style = space
11 |
12 | [{Makefile,*.go,go.*}]
13 | indent_style = tab
14 | indent_size = 4
15 | tab_width = 4
16 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yaml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: Ask a Question
4 | url: https://github.com/fluent/fluent-operator/discussions
5 | about: I have questions about Fluent Operator. Please ask and answer questions at https://github.com/fluent/fluent-operator/discussions
6 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
6 |
7 | ### What this PR does / why we need it:
8 |
9 | ### Which issue(s) this PR fixes:
10 |
13 | Fixes #
14 |
15 | ### Does this PR introduced a user-facing change?
16 |
23 | ```release-note
24 |
25 | ```
26 |
27 | ### Additional documentation, usage docs, etc.:
28 |
36 | ```docs
37 |
38 | ```
39 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "github-actions"
4 | directory: "/"
5 | schedule:
6 | interval: "monthly"
7 |
8 | - package-ecosystem: "docker"
9 | directories:
10 | - "/cmd/fluent-manager"
11 | - "/cmd/fluent-watcher/fluentbit"
12 | - "/cmd/fluent-watcher/fluentd"
13 | schedule:
14 | interval: "daily"
15 |
16 | - package-ecosystem: "docker"
17 | directory: "/docs/best-practice/forwarding-logs-via-http"
18 | schedule:
19 | interval: "monthly"
20 |
21 | - package-ecosystem: "gomod"
22 | directories:
23 | - "/"
24 | groups:
25 | k8s.io/*:
26 | patterns:
27 | - k8s.io/api
28 | - k8s.io/apimachinery
29 | - k8s.io/client-go
30 | schedule:
31 | interval: "weekly"
32 |
--------------------------------------------------------------------------------
/.github/release-drafter.yml:
--------------------------------------------------------------------------------
1 | name-template: 'v$RESOLVED_VERSION'
2 | tag-template: 'v$RESOLVED_VERSION'
3 | template: |
4 | # What's Changed
5 |
6 | $CHANGES
7 |
8 | **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
9 |
10 | categories:
11 | - title: '💥 Breaking'
12 | label: 'type: breaking'
13 | - title: '✨ New'
14 | label: 'type: feature'
15 | - title: '🐛 Bug Fixes'
16 | label: 'type: bug'
17 | - title: '🏗️ Maintenance'
18 | label: 'type: maintenance'
19 | - title: '🔒 Security'
20 | label: 'type: security'
21 | - title: '👷 CI/CD'
22 | label: 'type: cicd'
23 | - title: '📝 Documentation'
24 | label: 'type: docs'
25 | - title: 'Other changes'
26 | - title: '🏷️ Dependency Updates'
27 | label: 'type: dependencies'
28 | collapse-after: 5
29 |
30 | version-resolver:
31 | major:
32 | labels:
33 | - 'type: breaking'
34 | minor:
35 | labels:
36 | - 'type: feature'
37 | patch:
38 | labels:
39 | - 'type: bug'
40 | - 'type: maintenance'
41 | - 'type: docs'
42 | - 'type: dependencies'
43 | - 'type: cicd'
44 |
45 | exclude-labels:
46 | - 'skip-changelog'
47 |
--------------------------------------------------------------------------------
/.github/renovate.json5:
--------------------------------------------------------------------------------
1 | {
2 | $schema: "https://docs.renovatebot.com/renovate-schema.json",
3 | labels: ["dependencies"],
4 | extends: ["config:best-practices", ":disableDependencyDashboard"],
5 | }
6 |
--------------------------------------------------------------------------------
/.github/workflows/issue-auto-closer.yaml:
--------------------------------------------------------------------------------
1 | name: Autocloser
2 | on: [issues]
3 | jobs:
4 | autoclose:
5 | runs-on: ubuntu-latest
6 | steps:
7 | - name: Autoclose issues that did not follow issue template
8 | uses: roots/issue-closer-action@v1.2
9 | with:
10 | repo-token: ${{ secrets.GITHUB_TOKEN }}
11 | issue-close-message: "@${issue.user.login} this issue was automatically closed because it did not follow the issue template"
12 | issue-pattern: "(.*Describe the issue.*)|(.*Is your feature request related to a problem.*)"
13 |
--------------------------------------------------------------------------------
/.github/workflows/renovate.yaml:
--------------------------------------------------------------------------------
1 | name: Renovate
2 | on:
3 | push:
4 | paths:
5 | - ".github/workflows/renovate.yaml"
6 | - ".github/renovate-config.js"
7 | schedule:
8 | - cron: "0 7 * * 5"
9 | workflow_dispatch:
10 |
11 | env:
12 | ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }}
13 |
14 | jobs:
15 | renovate:
16 | runs-on: ubuntu-latest
17 |
18 | permissions:
19 | contents: write
20 | pull-requests: write
21 |
22 | steps:
23 | - name: Checkout
24 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25 |
26 | - name: Self-hosted Renovate
27 | uses: renovatebot/github-action@8ac70de2fe55752c573155866e30735411e3b61c # v41.0.22
28 | with:
29 | configurationFile: ".github/renovate-config.js"
30 | token: "${{ secrets.GITHUB_TOKEN }}"
31 | env:
32 | LOG_LEVEL: ${{ env.ACTIONS_STEP_DEBUG == 'true' && 'debug' || 'info' }}
33 | RENOVATE_REPOSITORIES: ${{ github.repository }}
34 | RENOVATE_ALLOW_SCRIPTS: true
35 | RENOVATE_SEPARATE_MAJOR_MINOR: false
36 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Binaries for programs and plugins
2 | *.exe
3 | *.exe~
4 | *.dll
5 | *.so
6 | *.dylib
7 |
8 | # Test binary, built with `go test -c`
9 | *.test
10 |
11 | # Output of the go coverage tool, specifically when used with LiteIDE
12 | *.out
13 |
14 | # Dependency directories (remove the comment below to include it)
15 | vendor/
16 |
17 | # IDE
18 | .idea
19 |
20 | /bin
21 |
22 | .vscode/
23 |
24 | testbin/
25 |
26 | .DS_Store
27 |
--------------------------------------------------------------------------------
/VERSION:
--------------------------------------------------------------------------------
1 | latest
2 |
--------------------------------------------------------------------------------
/apis/fluentbit/v1alpha2/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | */
15 |
16 | // +k8s:deepcopy-gen=package
17 | // +groupName=fluentbit.fluent.io
18 |
19 | package v1alpha2 // Package v1alpha2 import "github.com/fluent/fluent-operator/v2/apis/fluentbit/v1alpha2"
20 |
--------------------------------------------------------------------------------
/apis/fluentbit/v1alpha2/plugins/configmap_types.go:
--------------------------------------------------------------------------------
1 | package plugins
2 |
3 | import (
4 | "context"
5 | "fmt"
6 | "github.com/go-openapi/errors"
7 | "k8s.io/api/core/v1"
8 | "sigs.k8s.io/controller-runtime/pkg/client"
9 | "strings"
10 | )
11 |
12 | type ConfigMapLoader struct {
13 | client client.Client
14 | namespace string
15 | }
16 |
17 | func NewConfigMapLoader(c client.Client, ns string) ConfigMapLoader {
18 | return ConfigMapLoader{
19 | client: c,
20 | namespace: ns,
21 | }
22 | }
23 |
24 | func (cl ConfigMapLoader) LoadConfigMap(selector v1.ConfigMapKeySelector, namespace string) (string, error) {
25 | var configMap v1.ConfigMap
26 | if err := cl.client.Get(context.Background(), client.ObjectKey{Name: selector.Name, Namespace: namespace}, &configMap); err != nil {
27 | return "", err
28 | }
29 |
30 | if v, ok := configMap.Data[selector.Key]; !ok {
31 | return "", errors.NotFound(fmt.Sprintf("The key %s is not found.", selector.Key))
32 | } else {
33 | return strings.TrimSuffix(fmt.Sprintf("%s", v), "\n"), nil
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/apis/fluentbit/v1alpha2/plugins/filter/grep_types.go:
--------------------------------------------------------------------------------
1 | package filter
2 |
3 | import (
4 | "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins"
5 | "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins/params"
6 | )
7 |
8 | // +kubebuilder:object:generate:=true
9 |
10 | // The Grep Filter plugin allows to match or exclude specific records based in regular expression patterns.
11 | // **For full documentation, refer to https://docs.fluentbit.io/manual/pipeline/filters/grep**
12 | type Grep struct {
13 | plugins.CommonParams `json:",inline"`
14 | // Keep records which field matches the regular expression.
15 | // Value Format: FIELD REGEX
16 | Regex string `json:"regex,omitempty"`
17 | // Exclude records which field matches the regular expression.
18 | // Value Format: FIELD REGEX
19 | Exclude string `json:"exclude,omitempty"`
20 | }
21 |
22 | func (_ *Grep) Name() string {
23 | return "grep"
24 | }
25 |
26 | func (g *Grep) Params(_ plugins.SecretLoader) (*params.KVs, error) {
27 | kvs := params.NewKVs()
28 | err := g.AddCommonParams(kvs)
29 | if err != nil {
30 | return kvs, err
31 | }
32 | if g.Regex != "" {
33 | kvs.Insert("Regex", g.Regex)
34 | }
35 | if g.Exclude != "" {
36 | kvs.Insert("Exclude", g.Exclude)
37 | }
38 | return kvs, nil
39 | }
40 |
--------------------------------------------------------------------------------
/apis/fluentbit/v1alpha2/plugins/input/mqtt.go:
--------------------------------------------------------------------------------
1 | package input
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins"
7 | "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins/params"
8 | )
9 |
10 | // +kubebuilder:object:generate:=true
11 |
12 | // The MQTT input plugin, allows to retrieve messages/data from MQTT control packets over a TCP connection.
13 | // The incoming data to receive must be a JSON map.
14 | // **For full documentation, refer to https://docs.fluentbit.io/manual/pipeline/inputs/mqtt**
15 | type MQTT struct {
16 | // Listener network interface, default: 0.0.0.0
17 | Listen string `json:"listen,omitempty"`
18 | // TCP port where listening for connections, default: 1883
19 | // +kubebuilder:validation:Minimum:=1
20 | // +kubebuilder:validation:Maximum:=65535
21 | Port *int32 `json:"port,omitempty"`
22 | }
23 |
24 | func (_ *MQTT) Name() string {
25 | return "mqtt"
26 | }
27 |
28 | // implement Section() method
29 | func (m *MQTT) Params(_ plugins.SecretLoader) (*params.KVs, error) {
30 | kvs := params.NewKVs()
31 | if m.Listen != "" {
32 | kvs.Insert("Listen", m.Listen)
33 | }
34 | if m.Port != nil {
35 | kvs.Insert("Port", fmt.Sprint(*m.Port))
36 | }
37 | return kvs, nil
38 | }
39 |
--------------------------------------------------------------------------------
/apis/fluentbit/v1alpha2/plugins/input/statsd.go:
--------------------------------------------------------------------------------
1 | package input
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins"
7 | "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins/params"
8 | )
9 |
10 | // +kubebuilder:object:generate:=true
11 |
12 | // The StatsD input plugin allows you to receive metrics via StatsD protocol.
13 | // **For full documentation, refer to https://docs.fluentbit.io/manual/pipeline/inputs/statsd**
14 | type StatsD struct {
15 | // Listener network interface, default: 0.0.0.0
16 | Listen string `json:"listen,omitempty"`
17 | // UDP port where listening for connections, default: 8125
18 | // +kubebuilder:validation:Minimum:=1
19 | // +kubebuilder:validation:Maximum:=65535
20 | Port *int32 `json:"port,omitempty"`
21 | }
22 |
23 | func (_ *StatsD) Name() string {
24 | return "statsd"
25 | }
26 |
27 | // implement Section() method
28 | func (s *StatsD) Params(_ plugins.SecretLoader) (*params.KVs, error) {
29 | kvs := params.NewKVs()
30 | if s.Listen != "" {
31 | kvs.Insert("Listen", s.Listen)
32 | }
33 | if s.Port != nil {
34 | kvs.Insert("Port", fmt.Sprint(*s.Port))
35 | }
36 | return kvs, nil
37 | }
38 |
--------------------------------------------------------------------------------
/apis/fluentbit/v1alpha2/plugins/interface.go:
--------------------------------------------------------------------------------
1 | package plugins
2 |
3 | import "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins/params"
4 |
5 | // +kubebuilder:object:generate=false
6 |
7 | // The Plugin interface defines methods for transferring input, filter
8 | // and output plugins to textual section content.
9 | type Plugin interface {
10 | Name() string
11 | Params(SecretLoader) (*params.KVs, error)
12 | }
13 |
14 | // The Namespaceable interface defines a method for adding a namespace
15 | // to a plugins identifier.
16 | type Namespaceable interface {
17 | MakeNamespaced(string)
18 | }
19 |
--------------------------------------------------------------------------------
/apis/fluentbit/v1alpha2/plugins/output/null_types.go:
--------------------------------------------------------------------------------
1 | package output
2 |
3 | import (
4 | "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins"
5 | "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins/params"
6 | )
7 |
8 | // +kubebuilder:object:generate:=true
9 |
10 | // The null output plugin just throws away events.
11 | type Null struct{}
12 |
13 | func (_ *Null) Name() string {
14 | return "null"
15 | }
16 |
17 | // implement Section() method
18 | func (_ *Null) Params(_ plugins.SecretLoader) (*params.KVs, error) {
19 | return nil, nil
20 | }
21 |
--------------------------------------------------------------------------------
/apis/fluentbit/v1alpha2/plugins/parser/json_types.go:
--------------------------------------------------------------------------------
1 | package parser
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins"
7 | "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins/params"
8 | )
9 |
10 | // +kubebuilder:object:generate:=true
11 |
12 | // The JSON parser plugin.
13 | // **For full documentation, refer to https://docs.fluentbit.io/manual/pipeline/parsers/json**
14 | type JSON struct {
15 | // Time_Key
16 | TimeKey string `json:"timeKey,omitempty"`
17 | // Time_Format, eg. %Y-%m-%dT%H:%M:%S %z
18 | TimeFormat string `json:"timeFormat,omitempty"`
19 | // Time_Keep
20 | TimeKeep *bool `json:"timeKeep,omitempty"`
21 | }
22 |
23 | func (_ *JSON) Name() string {
24 | return "json"
25 | }
26 |
27 | func (j *JSON) Params(_ plugins.SecretLoader) (*params.KVs, error) {
28 | kvs := params.NewKVs()
29 | if j.TimeKey != "" {
30 | kvs.Insert("Time_Key", j.TimeKey)
31 | }
32 | if j.TimeFormat != "" {
33 | kvs.Insert("Time_Format", j.TimeFormat)
34 | }
35 | if j.TimeKeep != nil {
36 | kvs.Insert("Time_Keep", fmt.Sprint(*j.TimeKeep))
37 | }
38 | return kvs, nil
39 | }
40 |
--------------------------------------------------------------------------------
/apis/fluentbit/v1alpha2/plugins/parser/logfmt_types.go:
--------------------------------------------------------------------------------
1 | package parser
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins"
7 | "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins/params"
8 | )
9 |
10 | // +kubebuilder:object:generate:=true
11 |
12 | // The logfmt parser allows to parse the logfmt format described in https://brandur.org/logfmt .
13 | // **For full documentation, refer to https://docs.fluentbit.io/manual/pipeline/parsers/logfmt**
14 | type Logfmt struct {
15 | // Time_Key
16 | TimeKey string `json:"timeKey,omitempty"`
17 | // Time_Format, eg. %Y-%m-%dT%H:%M:%S %z
18 | TimeFormat string `json:"timeFormat,omitempty"`
19 | // Time_Keep
20 | TimeKeep *bool `json:"timeKeep,omitempty"`
21 | }
22 |
23 | func (_ *Logfmt) Name() string {
24 | return "logfmt"
25 | }
26 |
27 | func (l *Logfmt) Params(_ plugins.SecretLoader) (*params.KVs, error) {
28 | kvs := params.NewKVs()
29 | if l.TimeKey != "" {
30 | kvs.Insert("Time_Key", l.TimeKey)
31 | }
32 | if l.TimeFormat != "" {
33 | kvs.Insert("Time_Format", l.TimeFormat)
34 | }
35 | if l.TimeKeep != nil {
36 | kvs.Insert("Time_Keep", fmt.Sprint(*l.TimeKeep))
37 | }
38 | return kvs, nil
39 | }
40 |
--------------------------------------------------------------------------------
/apis/fluentbit/v1alpha2/plugins/parser/lstv_types.go:
--------------------------------------------------------------------------------
1 | package parser
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins"
7 | "github.com/fluent/fluent-operator/v3/apis/fluentbit/v1alpha2/plugins/params"
8 | )
9 |
10 | // +kubebuilder:object:generate:=true
11 |
12 | // The LSTV parser allows to parse LTSV formatted texts.
13 | // **For full documentation, refer to https://docs.fluentbit.io/manual/pipeline/parsers/ltsv**
14 | type LSTV struct {
15 | // Time_Key
16 | TimeKey string `json:"timeKey,omitempty"`
17 | // Time_Format, eg. %Y-%m-%dT%H:%M:%S %z
18 | TimeFormat string `json:"timeFormat,omitempty"`
19 | // Time_Keep
20 | TimeKeep *bool `json:"timeKeep,omitempty"`
21 | Types string `json:"types,omitempty"`
22 | }
23 |
24 | func (_ *LSTV) Name() string {
25 | return "ltsv"
26 | }
27 |
28 | func (l *LSTV) Params(_ plugins.SecretLoader) (*params.KVs, error) {
29 | kvs := params.NewKVs()
30 | if l.TimeKey != "" {
31 | kvs.Insert("Time_Key", l.TimeKey)
32 | }
33 | if l.TimeFormat != "" {
34 | kvs.Insert("Time_Format", l.TimeFormat)
35 | }
36 | if l.TimeKeep != nil {
37 | kvs.Insert("Time_Format", fmt.Sprint(*l.TimeKeep))
38 | }
39 | if l.Types != "" {
40 | kvs.Insert("Types", l.Types)
41 | }
42 | return kvs, nil
43 | }
44 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | */
15 |
16 | // +k8s:deepcopy-gen=package
17 | // +groupName=fluentd.fluent.io
18 |
19 | package v1alpha1 // import "github.com/fluent/fluent-operator/v3/apis/fluentd/v1alpha1"
20 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/plugins/configmap_types.go:
--------------------------------------------------------------------------------
1 | package plugins
2 |
3 | import (
4 | "context"
5 | "fmt"
6 | "strings"
7 |
8 | "github.com/go-openapi/errors"
9 | v1 "k8s.io/api/core/v1"
10 | "sigs.k8s.io/controller-runtime/pkg/client"
11 | )
12 |
13 | type ConfigMapLoader struct {
14 | client client.Client
15 | namespace string
16 | }
17 |
18 | func NewConfigMapLoader(c client.Client, ns string) ConfigMapLoader {
19 | return ConfigMapLoader{
20 | client: c,
21 | namespace: ns,
22 | }
23 | }
24 |
25 | func (cl ConfigMapLoader) LoadConfigMap(selector v1.ConfigMapKeySelector) (string, error) {
26 | var configMap v1.ConfigMap
27 | if err := cl.client.Get(context.Background(), client.ObjectKey{Name: selector.Name, Namespace: cl.namespace}, &configMap); err != nil {
28 | return "", err
29 | }
30 |
31 | if v, ok := configMap.Data[selector.Key]; !ok {
32 | return "", errors.NotFound(fmt.Sprintf("The key %s is not found.", selector.Key))
33 | } else {
34 | return strings.TrimSuffix(fmt.Sprintf("%s", v), "\n"), nil
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/plugins/custom/custom_types.go:
--------------------------------------------------------------------------------
1 | package custom
2 |
3 | import (
4 | "bytes"
5 | "fmt"
6 | "strings"
7 |
8 | "github.com/fluent/fluent-operator/v3/apis/fluentd/v1alpha1/plugins"
9 | "github.com/fluent/fluent-operator/v3/apis/fluentd/v1alpha1/plugins/params"
10 | )
11 |
12 | type CustomPlugin struct {
13 | Config string `json:"config"`
14 | }
15 |
16 | func (c *CustomPlugin) Name() string {
17 | return ""
18 | }
19 |
20 | func (c *CustomPlugin) Params(_ plugins.SecretLoader) (*params.PluginStore, error) {
21 | ps := params.NewPluginStore("")
22 | ps.Content = indentation(c.Config)
23 | return ps, nil
24 | }
25 |
26 | func indentation(config string) string {
27 | splits := strings.Split(config, "\n")
28 | var buf bytes.Buffer
29 | for _, split := range splits {
30 | if split != "" {
31 | buf.WriteString(fmt.Sprintf(" %s\n", split))
32 | }
33 | }
34 | return buf.String()
35 | }
36 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/plugins/filter/stdout.go:
--------------------------------------------------------------------------------
1 | package filter
2 |
3 | import "github.com/fluent/fluent-operator/v3/apis/fluentd/v1alpha1/plugins/common"
4 |
5 | // Stdout defines the parameters for filter_stdout plugin
6 | type Stdout struct {
7 | // The format section
8 | Format *common.Format `json:"format,omitempty"`
9 | // The inject section
10 | *common.Inject `json:"inject,omitempty"`
11 | }
12 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/plugins/input/monitor_agent.go:
--------------------------------------------------------------------------------
1 | package input
2 |
3 | // The in_monitor_agent Input plugin exports Fluentd's internal metrics via REST API.
4 | type MonitorAgent struct {
5 | // The port to listen to.
6 | Port *int64 `json:"port,omitempty"`
7 | // The bind address to listen to.
8 | Bind *string `json:"bind,omitempty"`
9 | // If you set this parameter, this plugin emits metrics as records.
10 | Tag *string `json:"tag,omitempty"`
11 | // The interval time between event emits. This will be used when "tag" is configured.
12 | EmitInterval *int64 `json:"emitInterval,omitempty"`
13 | // You can set this option to false to remove the config field from the response.
14 | IncludeConfig *bool `json:"includeConfig,omitempty"`
15 | // You can set this option to false to remove the retry field from the response.
16 | IncludeRetry *bool `json:"includeRetry,omitempty"`
17 | }
18 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/plugins/input/sample.go:
--------------------------------------------------------------------------------
1 | package input
2 |
3 | // The in_sample input plugin generates sample events. It is useful for testing, debugging, benchmarking and getting started with Fluentd.
4 | type Sample struct {
5 | // The tag of the event. The value is the tag assigned to the generated events.
6 | Tag *string `json:"tag,omitempty"`
7 | // The number of events in the event stream of each emit.
8 | Size *int64 `json:"size,omitempty"`
9 | // It configures how many events to generate per second.
10 | Rate *int64 `json:"rate,omitempty"`
11 | // If specified, each generated event has an auto-incremented key field.
12 | AutoIncrementKey *string `json:"autoIncrementKey,omitempty"`
13 | // The sample data to be generated. It should be either an array of JSON hashes or a single JSON hash. If it is an array of JSON hashes, the hashes in the array are cycled through in order.
14 | Sample *string `json:"sample,omitempty"`
15 | }
16 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/plugins/interface.go:
--------------------------------------------------------------------------------
1 | package plugins
2 |
3 | import "github.com/fluent/fluent-operator/v3/apis/fluentd/v1alpha1/plugins/params"
4 |
5 | // +kubebuilder:object:generate=false
6 |
7 | // The Plugin interface defines methods for transferring input, filter
8 | // and output plugins to textual section content.
9 | type Plugin interface {
10 | Name() string
11 | Params(SecretLoader) (*params.PluginStore, error)
12 | }
13 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/plugins/output/copy.go:
--------------------------------------------------------------------------------
1 | package output
2 |
3 | // Copy defines the parameters for out_Copy plugin
4 | type Copy struct {
5 | // CopyMode defines how to pass the events to plugins.
6 | // +kubebuilder:validation:Enum:=no_copy;shallow;deep;marshal
7 | CopyMode *string `json:"copyMode"`
8 | }
9 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/plugins/output/kafka.go:
--------------------------------------------------------------------------------
1 | package output
2 |
3 | // Kafka2 defines the parameters for out_kafka output plugin
4 | type Kafka2 struct {
5 | // The list of all seed brokers, with their host and port information. Default: localhost:9092
6 | Brokers *string `json:"brokers,omitempty"`
7 | // The field name for the target topic. If the field value is app, this plugin writes events to the app topic.
8 | TopicKey *string `json:"topicKey,omitempty"`
9 | // The name of the default topic. (default: nil)
10 | DefaultTopic *string `json:"defaultTopic,omitempty"`
11 | // Set fluentd event time to Kafka's CreateTime.
12 | UseEventTime *bool `json:"useEventTime,omitempty"`
13 | // The number of acks required per request.
14 | RequiredAcks *int16 `json:"requiredAcks,omitempty"`
15 | // The codec the producer uses to compress messages (default: nil).
16 | // +kubebuilder:validation:Enum:=gzip;snappy
17 | CompressionCodec *string `json:"compressionCodec,omitempty"`
18 | }
19 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/plugins/output/null.go:
--------------------------------------------------------------------------------
1 | package output
2 |
3 | // Null defines the parameters for out_null output plugin
4 | type Null struct {
5 | // NeverFlush for testing to simulate the output plugin that never succeeds to flush.
6 | NeverFlush *bool `json:"neverFlush,omitempty"`
7 | }
8 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/plugins/output/stdout.go:
--------------------------------------------------------------------------------
1 | package output
2 |
3 | // Stdout defines an empty placeholder for out_stdout output plugin
4 | type Stdout struct {
5 | }
6 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-cluster-cfg-filter-recordTransformer.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @a2170d34e9940ec56d328100e375c43e
11 |
12 | namespaces default,kube-system
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-cluster-cfg-output-cloudwatch.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @a2170d34e9940ec56d328100e375c43e
11 |
12 | namespaces default,kube-system
13 |
14 |
15 |
16 |
36 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-cluster-cfg-output-custom.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @a2170d34e9940ec56d328100e375c43e
11 |
12 | namespaces default,kube-system
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-cluster-cfg-output-datadog.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @a2170d34e9940ec56d328100e375c43e
11 |
12 | namespaces default,kube-system
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-cluster-cfg-output-es-data-stream.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @a2170d34e9940ec56d328100e375c43e
11 |
12 | namespaces default,kube-system
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-cluster-cfg-output-es.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @a2170d34e9940ec56d328100e375c43e
11 |
12 | namespaces default,kube-system
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-cluster-cfg-output-kafka.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @a2170d34e9940ec56d328100e375c43e
11 |
12 | namespaces default,kube-system
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-cluster-cfg-output-null.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @a2170d34e9940ec56d328100e375c43e
11 |
12 | namespaces default,kube-system
13 |
14 |
15 |
16 |
31 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-cluster-cfg-output-opensearch.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @a2170d34e9940ec56d328100e375c43e
11 |
12 | namespaces default,kube-system
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-global-cfg-input-monitorAgent.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type monitor_agent
3 | bind 0.0.0.0
4 | emit_interval 5
5 | include_config true
6 | include_retry true
7 | port 24220
8 | tag example
9 |
10 |
11 | @id main
12 | @type label_router
13 |
14 | @label @2d9e59757d3bfc66d93c3bc44b408922
15 |
16 | namespaces fluent
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-global-cfg-input-sample.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type sample
3 | auto_increment_key id
4 | rate 10
5 | sample {"hello": "world"}
6 | size 10
7 | tag foo.bar
8 |
9 |
10 | @id main
11 | @type label_router
12 |
13 | @label @2d9e59757d3bfc66d93c3bc44b408922
14 |
15 | namespaces fluent
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-mixed-cfgs-output-copy-2.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @2d9e59757d3bfc66d93c3bc44b408922
11 |
12 | namespaces fluent
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-mixed-cfgs-output-copy-3.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @2d9e59757d3bfc66d93c3bc44b408922
11 |
12 | namespaces fluent
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-mixed-cfgs-output-es.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @2d9e59757d3bfc66d93c3bc44b408922
11 |
12 | namespaces fluent
13 |
14 |
15 |
16 | @label @a2170d34e9940ec56d328100e375c43e
17 |
18 | namespaces default,kube-system
19 |
20 |
21 |
22 |
32 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-mixed-cfgs-output-opensearch.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @2d9e59757d3bfc66d93c3bc44b408922
11 |
12 | namespaces fluent
13 |
14 |
15 |
16 | @label @a2170d34e9940ec56d328100e375c43e
17 |
18 | namespaces default,kube-system
19 |
20 |
21 |
22 |
32 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-namespaced-cfg-output-es.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @2d9e59757d3bfc66d93c3bc44b408922
11 |
12 | namespaces fluent
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/apis/fluentd/v1alpha1/tests/expected/fluentd-namespaced-cfg-output-opensearch.cfg:
--------------------------------------------------------------------------------
1 |
2 | @type forward
3 | bind 0.0.0.0
4 | port 24224
5 |
6 |
7 | @id main
8 | @type label_router
9 |
10 | @label @2d9e59757d3bfc66d93c3bc44b408922
11 |
12 | namespaces fluent
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/apis/generated/clientset/versioned/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2022.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | // Code generated by client-gen. DO NOT EDIT.
17 |
18 | // This package has the automatically generated clientset.
19 | package versioned
20 |
--------------------------------------------------------------------------------
/apis/generated/clientset/versioned/fake/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2022.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | // Code generated by client-gen. DO NOT EDIT.
17 |
18 | // This package has the automatically generated fake clientset.
19 | package fake
20 |
--------------------------------------------------------------------------------
/apis/generated/clientset/versioned/scheme/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2022.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | // Code generated by client-gen. DO NOT EDIT.
17 |
18 | // This package contains the scheme of the automatically generated clientset.
19 | package scheme
20 |
--------------------------------------------------------------------------------
/apis/generated/clientset/versioned/typed/fluentbit/v1alpha2/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2022.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | // Code generated by client-gen. DO NOT EDIT.
17 |
18 | // This package has the automatically generated typed clients.
19 | package v1alpha2
20 |
--------------------------------------------------------------------------------
/apis/generated/clientset/versioned/typed/fluentbit/v1alpha2/fake/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2022.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | // Code generated by client-gen. DO NOT EDIT.
17 |
18 | // Package fake has the automatically generated clients.
19 | package fake
20 |
--------------------------------------------------------------------------------
/apis/generated/clientset/versioned/typed/fluentd/v1alpha1/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2022.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | // Code generated by client-gen. DO NOT EDIT.
17 |
18 | // This package has the automatically generated typed clients.
19 | package v1alpha1
20 |
--------------------------------------------------------------------------------
/apis/generated/clientset/versioned/typed/fluentd/v1alpha1/fake/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2022.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | // Code generated by client-gen. DO NOT EDIT.
17 |
18 | // Package fake has the automatically generated clients.
19 | package fake
20 |
--------------------------------------------------------------------------------
/apis/generated/clientset/versioned/typed/fluentd/v1alpha1/generated_expansion.go:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2022.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | // Code generated by client-gen. DO NOT EDIT.
17 |
18 | package v1alpha1
19 |
20 | type ClusterFilterExpansion interface{}
21 |
22 | type ClusterFluentdConfigExpansion interface{}
23 |
24 | type ClusterInputExpansion interface{}
25 |
26 | type ClusterOutputExpansion interface{}
27 |
28 | type FilterExpansion interface{}
29 |
30 | type FluentdExpansion interface{}
31 |
32 | type FluentdConfigExpansion interface{}
33 |
34 | type InputExpansion interface{}
35 |
36 | type OutputExpansion interface{}
37 |
--------------------------------------------------------------------------------
/charts/README.md:
--------------------------------------------------------------------------------
1 | The Helm charts in this directory are considered "development" and are [synced](../RELEASE.md) to the [fluent/helm-charts](https://github.com/fluent/helm-charts/tree/main/charts/fluent-operator/) repository for each release. Users are instructed to install the Fluent Operator Helm chart from the [fluent/helm-charts](https://github.com/fluent/helm-charts/tree/main/charts/fluent-operator/) repo.
--------------------------------------------------------------------------------
/charts/ct.yaml:
--------------------------------------------------------------------------------
1 | # See https://github.com/helm/chart-testing#configuration
2 | remote: origin
3 | chart-dirs:
4 | - charts/fluent-operator
5 | helm-extra-args: --timeout=500s
6 | target-branch: master
--------------------------------------------------------------------------------
/charts/fluent-operator/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *.orig
18 | *~
19 | # Various IDEs
20 | .project
21 | .idea/
22 | *.tmproj
23 | .vscode/
24 |
--------------------------------------------------------------------------------
/charts/fluent-operator/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v2
2 | name: fluent-operator
3 | description: Fluent Operator provides great flexibility in building a logging layer based on Fluent Bit and Fluentd.
4 | keywords:
5 | - logging
6 | - fluent-bit
7 | - fluentd
8 | - operator
9 | version: 3.4.2
10 | # renovate: datasource=docker depName=ghcr.io/fluent/fluent-operator/fluent-operator
11 | appVersion: "3.4.0"
12 | icon: https://raw.githubusercontent.com/fluent/fluent-operator/master/docs/images/fluent-operator-icon.svg
13 | home: https://www.fluentd.org/
14 | sources:
15 | - https://github.com/fluent/fluent-operator
16 | maintainers:
17 | - name: wenchajun
18 | email: dehaocheng@kubesphere.io
19 | dependencies:
20 | - name: fluent-bit-crds
21 | repository: "file://charts/fluent-bit-crds"
22 | version: 3.4.2
23 | condition: fluentbit.crdsEnable
24 | - name: fluentd-crds
25 | repository: "file://charts/fluentd-crds"
26 | version: 3.4.2
27 | condition: fluentd.crdsEnable
28 |
--------------------------------------------------------------------------------
/charts/fluent-operator/charts/fluent-bit-crds/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *.orig
18 | *~
19 | # Various IDEs
20 | .project
21 | .idea/
22 | *.tmproj
23 | .vscode/
24 |
--------------------------------------------------------------------------------
/charts/fluent-operator/charts/fluent-bit-crds/values.yaml:
--------------------------------------------------------------------------------
1 | # Default values for fluent-bit-crds.
2 |
--------------------------------------------------------------------------------
/charts/fluent-operator/charts/fluentd-crds/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *.orig
18 | *~
19 | # Various IDEs
20 | .project
21 | .idea/
22 | *.tmproj
23 | .vscode/
24 |
--------------------------------------------------------------------------------
/charts/fluent-operator/charts/fluentd-crds/values.yaml:
--------------------------------------------------------------------------------
1 | # Default values for fluentd-crds.
2 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/NOTES.txt:
--------------------------------------------------------------------------------
1 | Thank you for installing {{ .Chart.Name }}
2 | Your release is named {{ .Release.Name }}
3 |
4 | To learn more about the release, try:
5 |
6 | $ helm status {{ .Release.Name }} -n {{ .Release.Namespace }}
7 | $ helm get {{ .Release.Name }} -n {{ .Release.Namespace }}
8 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluent-operator-clusterRoleBinding.yaml:
--------------------------------------------------------------------------------
1 | {{- if and .Values.operator.enable .Values.operator.rbac.create }}
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRoleBinding
4 | metadata:
5 | labels:
6 | app.kubernetes.io/component: controller
7 | app.kubernetes.io/name: fluent-operator
8 | name: fluent-operator
9 | roleRef:
10 | apiGroup: rbac.authorization.k8s.io
11 | kind: ClusterRole
12 | name: fluent-operator
13 | subjects:
14 | - kind: ServiceAccount
15 | name: fluent-operator
16 | namespace: {{ .Release.Namespace | quote }}
17 | {{- end }}
18 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-clusterfilter-containerd.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentbit.enable }}
3 | {{- if .Values.fluentbit.filter.containerd.enable }}
4 | apiVersion: fluentbit.fluent.io/v1alpha2
5 | kind: ClusterFilter
6 | metadata:
7 | name: containerd
8 | labels:
9 | fluentbit.fluent.io/enabled: "true"
10 | fluentbit.fluent.io/component: logging
11 | spec:
12 | match: kube.*
13 | filters:
14 | - lua:
15 | script:
16 | key: containerd.lua
17 | name: fluent-bit-containerd-config
18 | call: containerd
19 | timeAsTable: true
20 | {{- end }}
21 | {{- end }}
22 | {{- end }}
23 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-clusterfilter-multiline.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentbit.enable }}
3 | {{- if .Values.fluentbit.filter.multiline.enable }}
4 | apiVersion: fluentbit.fluent.io/v1alpha2
5 | kind: ClusterFilter
6 | metadata:
7 | name: multiline
8 | labels:
9 | fluentbit.fluent.io/enabled: "true"
10 | fluentbit.fluent.io/component: logging
11 | spec:
12 | match: kube.*
13 | filters:
14 | - multiline:
15 | keyContent: {{ .Values.fluentbit.filter.multiline.keyContent | quote }}
16 | buffer: {{ .Values.fluentbit.filter.multiline.buffer }}
17 | emitterMemBufLimit: {{ .Values.fluentbit.filter.multiline.emitterMemBufLimit }}
18 | emitterType: {{ .Values.fluentbit.filter.multiline.emitterType }}
19 | flushMs: {{ .Values.fluentbit.filter.multiline.flushMs }}
20 | parser: "{{- join "," .Values.fluentbit.filter.multiline.parsers -}}"
21 | {{- if .Values.fluentbit.filter.multiline.mode }}
22 | mode: {{ .Values.fluentbit.filter.multiline.mode }}
23 | {{- end }}
24 | {{- if .Values.fluentbit.filter.multiline.emitterName }}
25 | emitterName: {{ .Values.fluentbit.filter.multiline.emitterName }}
26 | {{- end }}
27 | {{- end }}
28 | {{- end }}
29 | {{- end }}
30 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-clusterfilter-systemd.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentbit.enable }}
3 | {{- if .Values.fluentbit.filter.systemd.enable }}
4 | apiVersion: fluentbit.fluent.io/v1alpha2
5 | kind: ClusterFilter
6 | metadata:
7 | name: systemd
8 | labels:
9 | fluentbit.fluent.io/enabled: "true"
10 | fluentbit.fluent.io/component: logging
11 | spec:
12 | match: service.*
13 | filters:
14 | - lua:
15 | script:
16 | key: systemd.lua
17 | name: fluent-bit-lua
18 | call: add_time
19 | timeAsTable: true
20 | {{- end }}
21 | {{- end }}
22 | {{- end }}
23 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-clusterinput-metrics.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.fluentbit.enable }}
2 | {{- with .Values.fluentbit.input.fluentBitMetrics }}
3 | apiVersion: fluentbit.fluent.io/v1alpha2
4 | kind: ClusterInput
5 | metadata:
6 | name: fluentbit-metrics
7 | labels:
8 | fluentbit.fluent.io/enabled: "true"
9 | fluentbit.fluent.io/component: logging
10 | spec:
11 | fluentBitMetrics:
12 | {{- toYaml . | nindent 4 }}
13 | {{- end }}
14 | {{- end }}
15 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-clusterinput-nodeExporterMetrics.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentbit.enable }}
3 | {{- with .Values.fluentbit.input.nodeExporterMetrics }}
4 | apiVersion: fluentbit.fluent.io/v1alpha2
5 | kind: ClusterInput
6 | metadata:
7 | name: node-exporter-metrics
8 | labels:
9 | fluentbit.fluent.io/enabled: "true"
10 | fluentbit.fluent.io/component: logging
11 | spec:
12 | nodeExporterMetrics:
13 | {{- toYaml . | nindent 4 }}
14 | {{- end }}
15 | {{- end }}
16 | {{- end }}
17 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-containerd-config.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentbit.enable }}
3 | {{- if .Values.fluentbit.filter.containerd.enable }}
4 | apiVersion: v1
5 | kind: ConfigMap
6 | metadata:
7 | name: fluent-bit-containerd-config
8 | namespace: {{ .Release.Namespace | quote }}
9 | data:
10 | containerd.lua: |
11 | function containerd( tag, timestamp, record)
12 | if(record["logtag"]~=nil)
13 | then
14 | timeStr = os.date("!*t", timestamp["sec"])
15 | t = string.format("%4d-%02d-%02dT%02d:%02d:%02d.%sZ",
16 | timeStr["year"], timeStr["month"], timeStr["day"],
17 | timeStr["hour"], timeStr["min"], timeStr["sec"],
18 | timestamp["nsec"]);
19 | record["time"] = t;
20 | record["log"] = record["message"];
21 | record["message"] = nil;
22 | return 1, timestamp, record
23 | else
24 | return 0,timestamp,record
25 | end
26 | end
27 | {{- end }}
28 | {{- end }}
29 | {{- end }}
30 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-input-node-exporter-metrics-edge.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.fluentbit.kubeedge.enable }}
2 | apiVersion: fluentbit.fluent.io/v1alpha2
3 | kind: ClusterInput
4 | metadata:
5 | name: node-exporter-metrics-edge
6 | labels:
7 | fluentbit.fluent.io/enabled: "true"
8 | node-role.kubernetes.io/edge: "true"
9 | spec:
10 | nodeExporterMetrics:
11 | tag: kubeedge.metrics.*
12 | scrapeInterval: 1m
13 | path :
14 | procfs: /host/proc
15 | sysfs : /host/sys
16 | {{- end }}
17 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-input-prometheus-scrape-metrics-edge.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.fluentbit.kubeedge.enable }}
2 | apiVersion: fluentbit.fluent.io/v1alpha2
3 | kind: ClusterInput
4 | metadata:
5 | name: prometheus-scrape-metrics-edge
6 | labels:
7 | fluentbit.fluent.io/enabled: "true"
8 | node-role.kubernetes.io/edge: "true"
9 | spec:
10 | prometheusScrapeMetrics:
11 | tag: kubeedge.metrics.*
12 | host: 127.0.0.1
13 | port: 10350
14 | scrapeInterval: 1m
15 | metricsPath : /metrics/cadvisor
16 | {{- end }}
17 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-lua-config.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentbit.enable }}
3 | apiVersion: v1
4 | kind: ConfigMap
5 | metadata:
6 | name: fluent-bit-lua
7 | namespace: {{ .Release.Namespace | quote }}
8 | data:
9 | systemd.lua: |
10 | function add_time(tag, timestamp, record)
11 | new_record = {}
12 |
13 | timeStr = os.date("!*t", timestamp["sec"])
14 | t = string.format("%4d-%02d-%02dT%02d:%02d:%02d.%sZ",
15 | timeStr["year"], timeStr["month"], timeStr["day"],
16 | timeStr["hour"], timeStr["min"], timeStr["sec"],
17 | timestamp["nsec"])
18 |
19 | kubernetes = {}
20 | kubernetes["pod_name"] = record["_HOSTNAME"]
21 | kubernetes["container_name"] = record["SYSLOG_IDENTIFIER"]
22 | kubernetes["namespace_name"] = "kube-system"
23 |
24 | new_record["time"] = t
25 | new_record["log"] = record["MESSAGE"]
26 | new_record["kubernetes"] = kubernetes
27 |
28 | return 1, timestamp, new_record
29 | end
30 | {{- end }}
31 | {{- end }}
32 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-multilineParser-javaMultiline.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentbit.enable }}
3 | {{- if .Values.fluentbit.parsers.javaMultiline.enable }}
4 | apiVersion: fluentbit.fluent.io/v1alpha2
5 | kind: ClusterMultilineParser
6 | metadata:
7 | name: java-multiline
8 | labels:
9 | fluentbit.fluent.io/enabled: "true"
10 | fluentbit.fluent.io/component: logging
11 | spec:
12 | type: "regex"
13 | flushTimeout: 1000
14 | keyContent: "log"
15 | rules:
16 | - start: "start_state"
17 | regex: '/^\[?(\d+\-\d+\-\d+ \d+\:\d+\:\d+(\.\d+)?)\]? /'
18 | next: "cont"
19 | - start: "cont"
20 | regex: '/^com\..*/'
21 | next: "cont"
22 | - start: "cont"
23 | regex: '/^\s+.*/'
24 | next: "cont"
25 | - start: "cont"
26 | regex: '/^Caused.*$/'
27 | next: "cont"
28 | {{- end }}
29 | {{- end }}
30 | {{- end }}
31 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-output-forward.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentbit.enable }}
3 | {{- if .Values.fluentd.enable }}
4 | apiVersion: fluentbit.fluent.io/v1alpha2
5 | kind: ClusterOutput
6 | metadata:
7 | name: fluentd
8 | labels:
9 | fluentbit.fluent.io/enabled: "true"
10 | fluentbit.fluent.io/component: logging
11 | spec:
12 | matchRegex: (?:kube|service)\.(.*)
13 | forward:
14 | host: {{ printf "%s.%s.svc" .Values.fluentd.name .Release.Namespace | quote }}
15 | port: {{ .Values.fluentd.forward.port }}
16 | {{- end }}
17 | {{- end }}
18 | {{- end }}
19 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-output-kafka.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentbit.enable }}
3 | {{- if .Values.fluentbit.output.kafka.enable }}
4 | {{- with .Values.fluentbit.output.kafka }}
5 | apiVersion: fluentbit.fluent.io/v1alpha2
6 | kind: ClusterOutput
7 | metadata:
8 | name: kafka
9 | labels:
10 | fluentbit.fluent.io/enabled: "true"
11 | fluentbit.fluent.io/component: logging
12 | spec:
13 | logLevel: "{{ .logLevel }}"
14 | matchRegex: (?:kube|service)\.(.*)
15 | kafka:
16 | brokers: {{ .brokers | quote }}
17 | topics: {{ .topics | quote }}
18 | {{- end }}
19 | {{- end }}
20 | {{- end }}
21 | {{- end }}
22 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-output-opensearch.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentbit.enable }}
3 | {{- with .Values.fluentbit.output.opensearch }}
4 | apiVersion: fluentbit.fluent.io/v1alpha2
5 | kind: ClusterOutput
6 | metadata:
7 | name: fluentd-output-opensearch
8 | labels:
9 | fluentbit.fluent.io/enabled: "true"
10 | fluentbit.fluent.io/component: logging
11 | spec:
12 | matchRegex: (?:kube|service)\.(.*)
13 | opensearch:
14 | {{- toYaml . | nindent 4 }}
15 | {{- end }}
16 | {{- end }}
17 | {{- end }}
18 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-output-opentelemetry.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentbit.enable }}
3 | {{- if .Values.fluentbit.output.opentelemetry }}
4 | apiVersion: fluentbit.fluent.io/v1alpha2
5 | kind: ClusterOutput
6 | metadata:
7 | name: fluentd-output-opentelemetry
8 | labels:
9 | fluentbit.fluent.io/enabled: "true"
10 | fluentbit.fluent.io/component: logging
11 | spec:
12 | matchRegex: (?:kube|service)\.(.*)
13 | opentelemetry:
14 | {{- toYaml .Values.fluentbit.output.opentelemetry | nindent 4 }}
15 | {{- end }}
16 | {{- end }}
17 | {{- end }}
18 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-output-prometheus-exporter.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.fluentbit.enable }}
2 | {{- with .Values.fluentbit.output.prometheusMetricsExporter }}
3 | apiVersion: fluentbit.fluent.io/v1alpha2
4 | kind: ClusterOutput
5 | metadata:
6 | name: prometheus-exporter
7 | labels:
8 | fluentbit.fluent.io/enabled: "true"
9 | fluentbit.fluent.io/component: logging
10 | spec:
11 | match: {{ .match }}
12 | prometheusExporter:
13 | {{- toYaml .metricsExporter | nindent 4 }}
14 | {{- end }}
15 | {{- end }}
16 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-output-prometheus-remote-write-edge.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.fluentbit.kubeedge.enable }}
2 | {{- with .Values.fluentbit.kubeedge.prometheusRemoteWrite }}
3 | apiVersion: fluentbit.fluent.io/v1alpha2
4 | kind: ClusterOutput
5 | metadata:
6 | name: prometheus-remote-write-edge
7 | labels:
8 | fluentbit.fluent.io/enabled: "true"
9 | node-role.kubernetes.io/edge: "true"
10 | spec:
11 | match: kubeedge.metrics.*
12 | prometheusRemoteWrite:
13 | host: {{ .host | quote }}
14 | port: {{ .port }}
15 | uri: /api/v1/write
16 | addLabels :
17 | app : fluentbit
18 | node: ${NODE_NAME}
19 | job : kubeedge
20 | {{- end }}
21 | {{- end }}
22 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-output-stackdriver.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentbit.enable }}
3 | {{- with .Values.fluentbit.output.stackdriver }}
4 | apiVersion: fluentbit.fluent.io/v1alpha2
5 | kind: ClusterOutput
6 | metadata:
7 | name: stackdriver
8 | labels:
9 | fluentbit.fluent.io/enabled: "true"
10 | fluentbit.fluent.io/component: logging
11 | spec:
12 | matchRegex: (?:kube|service)\.(.*)
13 | stackdriver:
14 | {{- toYaml . | nindent 4 }}
15 | {{- end }}
16 | {{- end }}
17 | {{- end }}
18 |
19 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbit-output-stdout.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentbit.enable }}
3 | {{- if .Values.fluentbit.output.stdout.enable }}
4 | apiVersion: fluentbit.fluent.io/v1alpha2
5 | kind: ClusterOutput
6 | metadata:
7 | name: stdout
8 | labels:
9 | fluentbit.fluent.io/enabled: "true"
10 | fluentbit.fluent.io/component: logging
11 | spec:
12 | match: "*"
13 | stdout: {}
14 | {{- end }}
15 | {{- end }}
16 | {{- end }}
17 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentbitconfig-fluentbitconfig-edge.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.fluentbit.kubeedge.enable }}
2 | apiVersion: fluentbit.fluent.io/v1alpha2
3 | kind: ClusterFluentBitConfig
4 | metadata:
5 | name: fluent-bit-config-edge
6 | labels:
7 | app.kubernetes.io/name: fluent-bit
8 | spec:
9 | configFileFormat: {{ .Values.fluentbit.configFileFormat | default "classic" | quote }}
10 | service:
11 | parsersFile: parsers.conf
12 | inputSelector:
13 | matchLabels:
14 | fluentbit.fluent.io/enabled: "true"
15 | node-role.kubernetes.io/edge: "true"
16 | filterSelector:
17 | matchLabels:
18 | fluentbit.fluent.io/enabled: "true"
19 | node-role.kubernetes.io/edge: "true"
20 | parserSelector:
21 | matchLabels:
22 | fluentbit.fluent.io/enabled: "true"
23 | node-role.kubernetes.io/edge: "true"
24 | outputSelector:
25 | matchLabels:
26 | fluentbit.fluent.io/enabled: "true"
27 | node-role.kubernetes.io/edge: "true"
28 | {{- end }}
29 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentd-clusterfluentdconfig.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentd.enable }}
3 | apiVersion: fluentd.fluent.io/v1alpha1
4 | kind: ClusterFluentdConfig
5 | metadata:
6 | name: fluentd-config
7 | labels:
8 | config.fluentd.fluent.io/enabled: "true"
9 | spec:
10 | watchedNamespaces:
11 | {{- toYaml .Values.fluentd.watchedNamespaces | nindent 4 }}
12 | clusterFilterSelector:
13 | matchLabels:
14 | filter.fluentd.fluent.io/enabled: "true"
15 | clusterOutputSelector:
16 | matchLabels:
17 | output.fluentd.fluent.io/enabled: "true"
18 | {{- end }}
19 | {{- end }}
20 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentd-filter-kafka.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentd.enable }}
3 | {{- if .Values.fluentd.output.kafka.enable }}
4 | apiVersion: fluentd.fluent.io/v1alpha1
5 | kind: ClusterFilter
6 | metadata:
7 | name: fluentd-filter
8 | labels:
9 | filter.fluentd.fluent.io/enabled: "true"
10 | spec:
11 | filters:
12 | - recordTransformer:
13 | enableRuby: true
14 | records:
15 | - key: {{ .Values.fluentd.output.kafka.topicKey | quote }}
16 | value: ${record["kubernetes"]["namespace_name"]}
17 | {{- end }}
18 | {{- end }}
19 | {{- end }}
20 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentd-output-elasticsearch.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentd.enable }}
3 | {{- if .Values.fluentd.output.es.enable }}
4 | {{- with .Values.fluentd.output.es }}
5 | apiVersion: fluentd.fluent.io/v1alpha1
6 | kind: ClusterOutput
7 | metadata:
8 | name: fluentd-output-es
9 | labels:
10 | output.fluentd.fluent.io/enabled: "true"
11 | spec:
12 | outputs:
13 | - elasticsearch:
14 | host: {{ .host | quote }}
15 | port: {{ .port }}
16 | logstashFormat: true
17 | logstashPrefix: {{ .logstashPrefix }}
18 | {{- with .buffer }}
19 | buffer:
20 | type: {{ .type | quote }}
21 | path: {{ .path | quote }}
22 | {{- end }}
23 | {{- end }}
24 | {{- end }}
25 | {{- end }}
26 | {{- end }}
27 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentd-output-kafka.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentd.enable }}
3 | {{- if .Values.fluentd.output.kafka.enable }}
4 | {{- with .Values.fluentd.output.kafka }}
5 | apiVersion: fluentd.fluent.io/v1alpha1
6 | kind: ClusterOutput
7 | metadata:
8 | name: fluentd-output-kafka
9 | labels:
10 | output.fluentd.fluent.io/enabled: "true"
11 | spec:
12 | outputs:
13 | - kafka:
14 | brokers: {{ .brokers | quote }}
15 | useEventTime: true
16 | topicKey: {{ .topicKey | quote }}
17 | {{- with .buffer }}
18 | buffer:
19 | type: {{ .type | quote }}
20 | path: {{ .path | quote }}
21 | {{- end }}
22 | {{- end }}
23 | {{- end }}
24 | {{- end }}
25 | {{- end }}
26 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/fluentd-output-opensearch.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.Kubernetes }}
2 | {{- if .Values.fluentd.enable }}
3 | {{- if .Values.fluentd.output.opensearch.enable }}
4 | {{- with .Values.fluentd.output.opensearch }}
5 | apiVersion: fluentd.fluent.io/v1alpha1
6 | kind: ClusterOutput
7 | metadata:
8 | name: fluentd-output-opensearch
9 | labels:
10 | output.fluentd.fluent.io/enabled: "true"
11 | spec:
12 | outputs:
13 | - opensearch:
14 | host: {{ .host | quote }}
15 | port: {{ .port }}
16 | scheme: {{ .scheme | quote }}
17 | logstashFormat: true
18 | logstashPrefix: {{ .logstashPrefix | quote }}
19 | {{- with .buffer }}
20 | buffer:
21 | type: {{ .buffer.type | quote }}
22 | path: {{ .buffer.path | quote }}
23 | {{- end }}
24 | {{- end }}
25 | {{- end }}
26 | {{- end }}
27 | {{- end }}
28 |
--------------------------------------------------------------------------------
/charts/fluent-operator/templates/serviceaccount.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.operator.enable }}
2 | apiVersion: v1
3 | kind: ServiceAccount
4 | metadata:
5 | name: fluent-operator
6 | namespace: {{ .Release.Namespace | quote }}
7 | labels:
8 | app.kubernetes.io/component: operator
9 | app.kubernetes.io/name: fluent-operator
10 | {{- end }}
11 |
--------------------------------------------------------------------------------
/cmd/fluent-manager/Dockerfile:
--------------------------------------------------------------------------------
1 | ARG GO_VERSION=1.24.1
2 |
3 | # Build the manager binary \
4 | FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine3.21 as builder
5 |
6 | WORKDIR /workspace
7 | # Copy the Go Modules manifests
8 | COPY go.mod go.mod
9 | COPY go.sum go.sum
10 | # cache deps before building and copying source so that we don't need to re-download as much
11 | # and so that source changes don't invalidate our downloaded layer
12 | RUN go mod download
13 |
14 | # Copy the go source
15 | COPY cmd/fluent-manager/main.go main.go
16 | COPY apis apis/
17 | COPY controllers controllers/
18 | COPY pkg pkg/
19 |
20 | ARG TARGETOS
21 | ARG TARGETARCH
22 | RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GO111MODULE=on go build -a -o manager main.go
23 |
24 | # Use distroless as minimal base image to package the manager binary
25 | # Refer to https://github.com/GoogleContainerTools/distroless for more details
26 | FROM kubesphere/distroless-static:nonroot
27 | WORKDIR /
28 | COPY --from=builder /workspace/manager .
29 | USER nonroot:nonroot
30 |
31 | ENTRYPOINT ["/manager"]
32 |
--------------------------------------------------------------------------------
/cmd/fluent-watcher/fluentbit/Dockerfile:
--------------------------------------------------------------------------------
1 | ARG FLUENT_BIT_BASE_VERSION=3.2.4 \
2 | GO_VERSION=1.24.1
3 |
4 | FROM golang:${GO_VERSION}-alpine3.21 as buildergo
5 | RUN mkdir -p /fluent-bit
6 | RUN mkdir -p /code
7 | COPY . /code/
8 | WORKDIR /code
9 | RUN echo $(ls -al /code)
10 | RUN CGO_ENABLED=0 go build -ldflags '-w -s' -o /fluent-bit/fluent-bit /code/cmd/fluent-watcher/fluentbit/main.go
11 |
12 | FROM fluent/fluent-bit:${FLUENT_BIT_BASE_VERSION}
13 | LABEL Description="Fluent Bit docker image" Vendor="Fluent" Version="1.0"
14 |
15 | COPY conf/fluent-bit.conf conf/fluent-bit.yaml conf/parsers.conf /fluent-bit/etc/
16 | COPY --from=buildergo /fluent-bit/fluent-bit /fluent-bit/bin/fluent-bit-watcher
17 |
18 | # Entry point
19 | ENTRYPOINT ["/fluent-bit/bin/fluent-bit-watcher"]
20 |
--------------------------------------------------------------------------------
/cmd/fluent-watcher/fluentbit/Dockerfile.debug:
--------------------------------------------------------------------------------
1 | ARG FLUENT_BIT_BASE_VERSION=3.2.4 \
2 | GO_VERSION=1.24.1
3 |
4 | FROM golang:${GO_VERSION}-alpine3.21 as buildergo
5 | RUN mkdir -p /fluent-bit
6 | RUN mkdir -p /code
7 | COPY . /code/
8 | WORKDIR /code
9 | RUN echo $(ls -al /code)
10 | RUN CGO_ENABLED=0 go build -ldflags '-w -s' -o /fluent-bit/fluent-bit /code/cmd/fluent-watcher/fluentbit/main.go
11 |
12 | FROM fluent/fluent-bit:${FLUENT_BIT_BASE_VERSION}-debug
13 | LABEL Description="Fluent Bit docker image" Vendor="Fluent" Version="1.0"
14 |
15 | COPY conf/fluent-bit.conf conf/fluent-bit.yaml conf/parsers.conf /fluent-bit/etc/
16 | COPY --from=buildergo /fluent-bit/fluent-bit /fluent-bit/bin/fluent-bit-watcher
17 |
18 | # Entry point
19 | ENTRYPOINT ["/fluent-bit/bin/fluent-bit-watcher"]
20 |
--------------------------------------------------------------------------------
/cmd/fluent-watcher/fluentbit/VERSION:
--------------------------------------------------------------------------------
1 | 4.0.1
2 |
--------------------------------------------------------------------------------
/cmd/fluent-watcher/fluentd/VERSION:
--------------------------------------------------------------------------------
1 | 1.17.1
--------------------------------------------------------------------------------
/cmd/fluent-watcher/fluentd/etc/app.conf:
--------------------------------------------------------------------------------
1 | # this config file will be filled by the fluentd operator
--------------------------------------------------------------------------------
/cmd/fluent-watcher/fluentd/etc/fluent.conf:
--------------------------------------------------------------------------------
1 | # This is the root config file, which only includes components of the actual configuration
2 |
3 | # Do not collect fluentd's own logs to avoid infinite loops.
4 |
10 |
11 | @include /fluentd/etc/conf.d/*.conf
--------------------------------------------------------------------------------
/cmd/fluent-watcher/hooks/post-hook.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 |
4 | # AUTOMATICALLY GENERATED
5 | # DO NOT EDIT THIS FILE DIRECTLY, USE /post_checkout.erb
6 |
7 |
8 | set -e
9 |
10 | HOST_ARCH=$(uname -m)
11 |
12 | if [ "${HOST_ARCH}" == "aarch64" ]; then
13 | echo "Building arm64 image natively"
14 | exit
15 | fi
16 |
17 | # Enable cross-platform builds https://github.com/multiarch/qemu-user-static
18 | docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
19 |
--------------------------------------------------------------------------------
/conf/fluent-bit.conf:
--------------------------------------------------------------------------------
1 | @INCLUDE /fluent-bit/config/fluent-bit.conf
2 |
--------------------------------------------------------------------------------
/conf/fluent-bit.yaml:
--------------------------------------------------------------------------------
1 | includes:
2 | - /fluent-bit/config/fluent-bit.yaml
--------------------------------------------------------------------------------
/config/crd/bases/kustomizeconfig.yaml:
--------------------------------------------------------------------------------
1 | # This file is for teaching kustomize how to substitute name and namespace reference in CRD
2 | nameReference:
3 | - kind: Service
4 | version: v1
5 | fieldSpecs:
6 | - kind: CustomResourceDefinition
7 | version: v1
8 | group: apiextensions.k8s.io
9 | path: spec/conversion/webhook/clientConfig/service/name
10 |
11 | namespace:
12 | - kind: CustomResourceDefinition
13 | version: v1
14 | group: apiextensions.k8s.io
15 | path: spec/conversion/webhook/clientConfig/service/namespace
16 | create: false
17 |
18 | varReference:
19 | - path: metadata/annotations
--------------------------------------------------------------------------------
/config/crd/kustomizeconfig.yaml:
--------------------------------------------------------------------------------
1 | # This file is for teaching kustomize how to substitute name and namespace reference in CRD
2 | nameReference:
3 | - kind: Service
4 | version: v1
5 | fieldSpecs:
6 | - kind: CustomResourceDefinition
7 | version: v1
8 | group: apiextensions.k8s.io
9 | path: spec/conversion/webhook/clientConfig/service/name
10 |
11 | namespace:
12 | - kind: CustomResourceDefinition
13 | version: v1
14 | group: apiextensions.k8s.io
15 | path: spec/conversion/webhook/clientConfig/service/namespace
16 | create: false
17 |
18 | varReference:
19 | - path: metadata/annotations
20 |
--------------------------------------------------------------------------------
/config/crd/patches/cainjection_in_clusterfilters.yaml:
--------------------------------------------------------------------------------
1 | # The following patch adds a directive for certmanager to inject CA into the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | annotations:
6 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
7 | name: clusterfilters.fluentd.fluent.io
8 |
--------------------------------------------------------------------------------
/config/crd/patches/cainjection_in_clusterfluentdconfigs.yaml:
--------------------------------------------------------------------------------
1 | # The following patch adds a directive for certmanager to inject CA into the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | annotations:
6 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
7 | name: clusterfluentdconfigs.fluentd.fluent.io
8 |
--------------------------------------------------------------------------------
/config/crd/patches/cainjection_in_clusteroutputs.yaml:
--------------------------------------------------------------------------------
1 | # The following patch adds a directive for certmanager to inject CA into the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | annotations:
6 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
7 | name: clusteroutputs.fluentd.fluent.io
8 |
--------------------------------------------------------------------------------
/config/crd/patches/cainjection_in_filters_fluentbit.yaml:
--------------------------------------------------------------------------------
1 | # The following patch adds a directive for certmanager to inject CA into the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | annotations:
6 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
7 | name: filters.fluentd.fluent.io
8 |
--------------------------------------------------------------------------------
/config/crd/patches/cainjection_in_filters_fluentd.yaml:
--------------------------------------------------------------------------------
1 | # The following patch adds a directive for certmanager to inject CA into the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | annotations:
6 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
7 | name: filters.fluentbit.fluent.io
8 |
--------------------------------------------------------------------------------
/config/crd/patches/cainjection_in_fluentbitconfigs.yaml:
--------------------------------------------------------------------------------
1 | # The following patch adds a directive for certmanager to inject CA into the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | annotations:
6 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
7 | name: fluentbitconfigs.fluentbit.fluent.io
8 |
--------------------------------------------------------------------------------
/config/crd/patches/cainjection_in_fluentbits.yaml:
--------------------------------------------------------------------------------
1 | # The following patch adds a directive for certmanager to inject CA into the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | annotations:
6 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
7 | name: fluentbits.fluentbit.fluent.io
8 |
--------------------------------------------------------------------------------
/config/crd/patches/cainjection_in_fluentdconfigs.yaml:
--------------------------------------------------------------------------------
1 | # The following patch adds a directive for certmanager to inject CA into the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | annotations:
6 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
7 | name: fluentdconfigs.fluentd.fluent.io
8 |
--------------------------------------------------------------------------------
/config/crd/patches/cainjection_in_fluentds.yaml:
--------------------------------------------------------------------------------
1 | # The following patch adds a directive for certmanager to inject CA into the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | annotations:
6 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
7 | name: fluentds.fluentd.fluent.io
8 |
--------------------------------------------------------------------------------
/config/crd/patches/cainjection_in_inputs.yaml:
--------------------------------------------------------------------------------
1 | # The following patch adds a directive for certmanager to inject CA into the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | annotations:
6 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
7 | name: inputs.fluentbit.fluent.io
8 |
--------------------------------------------------------------------------------
/config/crd/patches/cainjection_in_outputs_fluentbit.yaml:
--------------------------------------------------------------------------------
1 | # The following patch adds a directive for certmanager to inject CA into the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | annotations:
6 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
7 | name: outputs.fluentbit.fluent.io
8 |
--------------------------------------------------------------------------------
/config/crd/patches/cainjection_in_outputs_fluentd.yaml:
--------------------------------------------------------------------------------
1 | # The following patch adds a directive for certmanager to inject CA into the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | annotations:
6 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
7 | name: outputs.fluentd.fluent.io
8 |
--------------------------------------------------------------------------------
/config/crd/patches/cainjection_in_parsers.yaml:
--------------------------------------------------------------------------------
1 | # The following patch adds a directive for certmanager to inject CA into the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | annotations:
6 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
7 | name: parsers.fluentbit.fluent.io
8 |
--------------------------------------------------------------------------------
/config/crd/patches/webhook_in_clusterfilters.yaml:
--------------------------------------------------------------------------------
1 | # The following patch enables a conversion webhook for the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | name: clusterfilters.fluentd.fluent.io
6 | spec:
7 | conversion:
8 | strategy: Webhook
9 | webhook:
10 | clientConfig:
11 | service:
12 | namespace: system
13 | name: webhook-service
14 | path: /convert
15 | conversionReviewVersions:
16 | - v1
17 |
--------------------------------------------------------------------------------
/config/crd/patches/webhook_in_clusterfluentdconfigs.yaml:
--------------------------------------------------------------------------------
1 | # The following patch enables a conversion webhook for the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | name: clusterfluentdconfigs.fluentd.fluent.io
6 | spec:
7 | conversion:
8 | strategy: Webhook
9 | webhook:
10 | clientConfig:
11 | service:
12 | namespace: system
13 | name: webhook-service
14 | path: /convert
15 | conversionReviewVersions:
16 | - v1
17 |
--------------------------------------------------------------------------------
/config/crd/patches/webhook_in_clusteroutputs.yaml:
--------------------------------------------------------------------------------
1 | # The following patch enables a conversion webhook for the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | name: clusteroutputs.fluentd.fluent.io
6 | spec:
7 | conversion:
8 | strategy: Webhook
9 | webhook:
10 | clientConfig:
11 | service:
12 | namespace: system
13 | name: webhook-service
14 | path: /convert
15 | conversionReviewVersions:
16 | - v1
17 |
--------------------------------------------------------------------------------
/config/crd/patches/webhook_in_filters_fluentbit.yaml:
--------------------------------------------------------------------------------
1 | # The following patch enables a conversion webhook for the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | name: filters.fluentbit.fluent.io
6 | spec:
7 | conversion:
8 | strategy: Webhook
9 | webhook:
10 | clientConfig:
11 | service:
12 | namespace: system
13 | name: webhook-service
14 | path: /convert
15 | conversionReviewVersions:
16 | - v1
17 |
--------------------------------------------------------------------------------
/config/crd/patches/webhook_in_filters_fluentd.yaml:
--------------------------------------------------------------------------------
1 | # The following patch enables a conversion webhook for the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | name: filters.fluentd.fluent.io
6 | spec:
7 | conversion:
8 | strategy: Webhook
9 | webhook:
10 | clientConfig:
11 | service:
12 | namespace: system
13 | name: webhook-service
14 | path: /convert
15 | conversionReviewVersions:
16 | - v1
17 |
--------------------------------------------------------------------------------
/config/crd/patches/webhook_in_fluentbitconfigs.yaml:
--------------------------------------------------------------------------------
1 | # The following patch enables a conversion webhook for the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | name: fluentbitconfigs.fluentbit.fluent.io
6 | spec:
7 | conversion:
8 | strategy: Webhook
9 | webhook:
10 | clientConfig:
11 | service:
12 | namespace: system
13 | name: webhook-service
14 | path: /convert
15 | conversionReviewVersions:
16 | - v1
17 |
--------------------------------------------------------------------------------
/config/crd/patches/webhook_in_fluentbits.yaml:
--------------------------------------------------------------------------------
1 | # The following patch enables a conversion webhook for the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | name: fluentbits.fluentbit.fluent.io
6 | spec:
7 | conversion:
8 | strategy: Webhook
9 | webhook:
10 | clientConfig:
11 | service:
12 | namespace: system
13 | name: webhook-service
14 | path: /convert
15 | conversionReviewVersions:
16 | - v1
17 |
--------------------------------------------------------------------------------
/config/crd/patches/webhook_in_fluentdconfigs.yaml:
--------------------------------------------------------------------------------
1 | # The following patch enables a conversion webhook for the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | name: fluentdconfigs.fluentd.fluent.io
6 | spec:
7 | conversion:
8 | strategy: Webhook
9 | webhook:
10 | clientConfig:
11 | service:
12 | namespace: system
13 | name: webhook-service
14 | path: /convert
15 | conversionReviewVersions:
16 | - v1
17 |
--------------------------------------------------------------------------------
/config/crd/patches/webhook_in_fluentds.yaml:
--------------------------------------------------------------------------------
1 | # The following patch enables a conversion webhook for the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | name: fluentds.fluentd.fluent.io
6 | spec:
7 | conversion:
8 | strategy: Webhook
9 | webhook:
10 | clientConfig:
11 | service:
12 | namespace: system
13 | name: webhook-service
14 | path: /convert
15 | conversionReviewVersions:
16 | - v1
17 |
--------------------------------------------------------------------------------
/config/crd/patches/webhook_in_inputs.yaml:
--------------------------------------------------------------------------------
1 | # The following patch enables a conversion webhook for the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | name: inputs.fluentd.fluent.io
6 | spec:
7 | conversion:
8 | strategy: Webhook
9 | webhook:
10 | clientConfig:
11 | service:
12 | namespace: system
13 | name: webhook-service
14 | path: /convert
15 | conversionReviewVersions:
16 | - v1
17 |
--------------------------------------------------------------------------------
/config/crd/patches/webhook_in_outputs_fluentbit.yaml:
--------------------------------------------------------------------------------
1 | # The following patch enables a conversion webhook for the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | name: outputs.fluentbit.fluent.io
6 | spec:
7 | conversion:
8 | strategy: Webhook
9 | webhook:
10 | clientConfig:
11 | service:
12 | namespace: system
13 | name: webhook-service
14 | path: /convert
15 | conversionReviewVersions:
16 | - v1
17 |
--------------------------------------------------------------------------------
/config/crd/patches/webhook_in_outputs_fluentd.yaml:
--------------------------------------------------------------------------------
1 | # The following patch enables a conversion webhook for the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | name: outputs.fluentd.fluent.io
6 | spec:
7 | conversion:
8 | strategy: Webhook
9 | webhook:
10 | clientConfig:
11 | service:
12 | namespace: system
13 | name: webhook-service
14 | path: /convert
15 | conversionReviewVersions:
16 | - v1
17 |
--------------------------------------------------------------------------------
/config/crd/patches/webhook_in_parsers.yaml:
--------------------------------------------------------------------------------
1 | # The following patch enables a conversion webhook for the CRD
2 | apiVersion: apiextensions.k8s.io/v1
3 | kind: CustomResourceDefinition
4 | metadata:
5 | name: parsers.fluentd.fluent.io
6 | spec:
7 | conversion:
8 | strategy: Webhook
9 | webhook:
10 | clientConfig:
11 | service:
12 | namespace: system
13 | name: webhook-service
14 | path: /convert
15 | conversionReviewVersions:
16 | - v1
17 |
--------------------------------------------------------------------------------
/config/default/manager_auth_proxy_patch.yaml:
--------------------------------------------------------------------------------
1 | # This patch inject a sidecar container which is a HTTP proxy for the
2 | # controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews.
3 | apiVersion: apps/v1
4 | kind: Deployment
5 | metadata:
6 | name: controller-manager
7 | namespace: system
8 | spec:
9 | template:
10 | spec:
11 | containers:
12 | - name: kube-rbac-proxy
13 | image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
14 | args:
15 | - "--secure-listen-address=0.0.0.0:8443"
16 | - "--upstream=http://127.0.0.1:8080/"
17 | - "--logtostderr=true"
18 | - "--v=10"
19 | ports:
20 | - containerPort: 8443
21 | name: https
22 | - name: manager
23 | args:
24 | - "--health-probe-bind-address=:8081"
25 | - "--metrics-bind-address=127.0.0.1:8080"
26 | - "--leader-elect"
27 |
--------------------------------------------------------------------------------
/config/default/manager_config_patch.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: controller-manager
5 | namespace: system
6 | spec:
7 | template:
8 | spec:
9 | containers:
10 | - name: manager
11 | args:
12 | - "--config=controller_manager_config.yaml"
13 | volumeMounts:
14 | - name: manager-config
15 | mountPath: /controller_manager_config.yaml
16 | subPath: controller_manager_config.yaml
17 | volumes:
18 | - name: manager-config
19 | configMap:
20 | name: manager-config
21 |
--------------------------------------------------------------------------------
/config/manager/controller_manager_config.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
2 | kind: ControllerManagerConfig
3 | health:
4 | healthProbeBindAddress: :8081
5 | metrics:
6 | bindAddress: 127.0.0.1:8080
7 | webhook:
8 | port: 9443
9 | leaderElection:
10 | leaderElect: true
11 | resourceName: 45c4fdd2.fluent.io
12 |
--------------------------------------------------------------------------------
/config/manager/kustomization.yaml:
--------------------------------------------------------------------------------
1 | resources:
2 | - manager.yaml
3 |
4 | generatorOptions:
5 | disableNameSuffixHash: true
6 |
7 | configMapGenerator:
8 | - name: manager-config
9 | files:
10 | - controller_manager_config.yaml
11 |
--------------------------------------------------------------------------------
/config/prometheus/kustomization.yaml:
--------------------------------------------------------------------------------
1 | resources:
2 | - monitor.yaml
3 |
--------------------------------------------------------------------------------
/config/prometheus/monitor.yaml:
--------------------------------------------------------------------------------
1 |
2 | # Prometheus Monitor Service (Metrics)
3 | apiVersion: monitoring.coreos.com/v1
4 | kind: ServiceMonitor
5 | metadata:
6 | labels:
7 | control-plane: controller-manager
8 | name: controller-manager-metrics-monitor
9 | namespace: system
10 | spec:
11 | endpoints:
12 | - path: /metrics
13 | port: https
14 | scheme: https
15 | bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
16 | tlsConfig:
17 | insecureSkipVerify: true
18 | selector:
19 | matchLabels:
20 | control-plane: controller-manager
21 |
--------------------------------------------------------------------------------
/config/rbac/auth_proxy_client_clusterrole.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: rbac.authorization.k8s.io/v1
2 | kind: ClusterRole
3 | metadata:
4 | name: metrics-reader
5 | rules:
6 | - nonResourceURLs:
7 | - "/metrics"
8 | verbs:
9 | - get
10 |
--------------------------------------------------------------------------------
/config/rbac/auth_proxy_role.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: rbac.authorization.k8s.io/v1
2 | kind: ClusterRole
3 | metadata:
4 | name: proxy-role
5 | rules:
6 | - apiGroups:
7 | - authentication.k8s.io
8 | resources:
9 | - tokenreviews
10 | verbs:
11 | - create
12 | - apiGroups:
13 | - authorization.k8s.io
14 | resources:
15 | - subjectaccessreviews
16 | verbs:
17 | - create
18 |
--------------------------------------------------------------------------------
/config/rbac/auth_proxy_role_binding.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: rbac.authorization.k8s.io/v1
2 | kind: ClusterRoleBinding
3 | metadata:
4 | name: proxy-rolebinding
5 | roleRef:
6 | apiGroup: rbac.authorization.k8s.io
7 | kind: ClusterRole
8 | name: proxy-role
9 | subjects:
10 | - kind: ServiceAccount
11 | name: controller-manager
12 | namespace: system
13 |
--------------------------------------------------------------------------------
/config/rbac/auth_proxy_service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | labels:
5 | control-plane: controller-manager
6 | name: controller-manager-metrics-service
7 | namespace: system
8 | spec:
9 | ports:
10 | - name: https
11 | port: 8443
12 | targetPort: https
13 | selector:
14 | control-plane: controller-manager
15 |
--------------------------------------------------------------------------------
/config/rbac/clusterfilter_editor_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to edit clusterfilters.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: clusterfilter-editor-role
6 | rules:
7 | - apiGroups:
8 | - fluentd.fluent.io
9 | resources:
10 | - clusterfilters
11 | verbs:
12 | - create
13 | - delete
14 | - get
15 | - list
16 | - patch
17 | - update
18 | - watch
19 | - apiGroups:
20 | - fluentd.fluent.io
21 | resources:
22 | - clusterfilters/status
23 | verbs:
24 | - get
25 |
--------------------------------------------------------------------------------
/config/rbac/clusterfilter_viewer_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to view clusterfilters.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: clusterfilter-viewer-role
6 | rules:
7 | - apiGroups:
8 | - fluentd.fluent.io
9 | resources:
10 | - clusterfilters
11 | verbs:
12 | - get
13 | - list
14 | - watch
15 | - apiGroups:
16 | - fluentd.fluent.io
17 | resources:
18 | - clusterfilters/status
19 | verbs:
20 | - get
21 |
--------------------------------------------------------------------------------
/config/rbac/clusterfluentdconfig_editor_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to edit clusterfluentdconfigs.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: clusterfluentdconfig-editor-role
6 | rules:
7 | - apiGroups:
8 | - fluentd.fluent.io
9 | resources:
10 | - clusterfluentdconfigs
11 | verbs:
12 | - create
13 | - delete
14 | - get
15 | - list
16 | - patch
17 | - update
18 | - watch
19 | - apiGroups:
20 | - fluentd.fluent.io
21 | resources:
22 | - clusterfluentdconfigs/status
23 | verbs:
24 | - get
25 |
--------------------------------------------------------------------------------
/config/rbac/clusterfluentdconfig_viewer_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to view clusterfluentdconfigs.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: clusterfluentdconfig-viewer-role
6 | rules:
7 | - apiGroups:
8 | - fluentd.fluent.io
9 | resources:
10 | - clusterfluentdconfigs
11 | verbs:
12 | - get
13 | - list
14 | - watch
15 | - apiGroups:
16 | - fluentd.fluent.io
17 | resources:
18 | - clusterfluentdconfigs/status
19 | verbs:
20 | - get
21 |
--------------------------------------------------------------------------------
/config/rbac/clusteroutput_editor_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to edit clusteroutputs.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: clusteroutput-editor-role
6 | rules:
7 | - apiGroups:
8 | - fluentd.fluent.io
9 | resources:
10 | - clusteroutputs
11 | verbs:
12 | - create
13 | - delete
14 | - get
15 | - list
16 | - patch
17 | - update
18 | - watch
19 | - apiGroups:
20 | - fluentd.fluent.io
21 | resources:
22 | - clusteroutputs/status
23 | verbs:
24 | - get
25 |
--------------------------------------------------------------------------------
/config/rbac/clusteroutput_viewer_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to view clusteroutputs.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: clusteroutput-viewer-role
6 | rules:
7 | - apiGroups:
8 | - fluentd.fluent.io
9 | resources:
10 | - clusteroutputs
11 | verbs:
12 | - get
13 | - list
14 | - watch
15 | - apiGroups:
16 | - fluentd.fluent.io
17 | resources:
18 | - clusteroutputs/status
19 | verbs:
20 | - get
21 |
--------------------------------------------------------------------------------
/config/rbac/filter_editor_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to edit filters.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: filter-editor-role
6 | rules:
7 | - apiGroups:
8 | - fluentbit.fluent.io
9 | - fluentd.fluent.io
10 | resources:
11 | - filters
12 | verbs:
13 | - create
14 | - delete
15 | - get
16 | - list
17 | - patch
18 | - update
19 | - watch
20 | - apiGroups:
21 | - fluentbit.fluent.io
22 | - fluentd.fluent.io
23 | resources:
24 | - filters/status
25 | verbs:
26 | - get
27 |
--------------------------------------------------------------------------------
/config/rbac/filter_viewer_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to view filters.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: filter-viewer-role
6 | rules:
7 | - apiGroups:
8 | - fluentbit.fluent.io
9 | - fluentd.fluent.io
10 | resources:
11 | - filters
12 | verbs:
13 | - get
14 | - list
15 | - watch
16 | - apiGroups:
17 | - fluentbit.fluent.io
18 | - fluentd.fluent.io
19 | resources:
20 | - filters/status
21 | verbs:
22 | - get
23 |
--------------------------------------------------------------------------------
/config/rbac/fluentbit_editor_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to edit fluentbits.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: fluentbit-editor-role
6 | rules:
7 | - apiGroups:
8 | - fluentbit.fluent.io
9 | resources:
10 | - fluentbits
11 | verbs:
12 | - create
13 | - delete
14 | - get
15 | - list
16 | - patch
17 | - update
18 | - watch
19 | - apiGroups:
20 | - fluentbit.fluent.io
21 | resources:
22 | - fluentbits/status
23 | verbs:
24 | - get
25 |
--------------------------------------------------------------------------------
/config/rbac/fluentbit_viewer_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to view fluentbits.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: fluentbit-viewer-role
6 | rules:
7 | - apiGroups:
8 | - fluentbit.fluent.io
9 | resources:
10 | - fluentbits
11 | verbs:
12 | - get
13 | - list
14 | - watch
15 | - apiGroups:
16 | - fluentbit.fluent.io
17 | resources:
18 | - fluentbits/status
19 | verbs:
20 | - get
21 |
--------------------------------------------------------------------------------
/config/rbac/fluentbitconfig_editor_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to edit fluentbitconfigs.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: fluentbitconfig-editor-role
6 | rules:
7 | - apiGroups:
8 | - fluentbit.fluent.io
9 | resources:
10 | - fluentbitconfigs
11 | verbs:
12 | - create
13 | - delete
14 | - get
15 | - list
16 | - patch
17 | - update
18 | - watch
19 | - apiGroups:
20 | - fluentbit.fluent.io
21 | resources:
22 | - fluentbitconfigs/status
23 | verbs:
24 | - get
25 |
--------------------------------------------------------------------------------
/config/rbac/fluentbitconfig_viewer_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to view fluentbitconfigs.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: fluentbitconfig-viewer-role
6 | rules:
7 | - apiGroups:
8 | - fluentbit.fluent.io
9 | resources:
10 | - fluentbitconfigs
11 | verbs:
12 | - get
13 | - list
14 | - watch
15 | - apiGroups:
16 | - fluentbit.fluent.io
17 | resources:
18 | - fluentbitconfigs/status
19 | verbs:
20 | - get
21 |
--------------------------------------------------------------------------------
/config/rbac/fluentd_editor_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to edit fluentds.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: fluentd-editor-role
6 | rules:
7 | - apiGroups:
8 | - fluentd.fluent.io
9 | resources:
10 | - fluentds
11 | verbs:
12 | - create
13 | - delete
14 | - get
15 | - list
16 | - patch
17 | - update
18 | - watch
19 | - apiGroups:
20 | - fluentd.fluent.io
21 | resources:
22 | - fluentds/status
23 | verbs:
24 | - get
25 |
--------------------------------------------------------------------------------
/config/rbac/fluentd_viewer_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to view fluentds.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: fluentd-viewer-role
6 | rules:
7 | - apiGroups:
8 | - fluentd.fluent.io
9 | resources:
10 | - fluentds
11 | verbs:
12 | - get
13 | - list
14 | - watch
15 | - apiGroups:
16 | - fluentd.fluent.io
17 | resources:
18 | - fluentds/status
19 | verbs:
20 | - get
21 |
--------------------------------------------------------------------------------
/config/rbac/fluentdconfig_editor_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to edit fluentdconfigs.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: fluentdconfig-editor-role
6 | rules:
7 | - apiGroups:
8 | - fluentd.fluent.io
9 | resources:
10 | - fluentdconfigs
11 | verbs:
12 | - create
13 | - delete
14 | - get
15 | - list
16 | - patch
17 | - update
18 | - watch
19 | - apiGroups:
20 | - fluentd.fluent.io
21 | resources:
22 | - fluentdconfigs/status
23 | verbs:
24 | - get
25 |
--------------------------------------------------------------------------------
/config/rbac/fluentdconfig_viewer_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to view fluentdconfigs.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: fluentdconfig-viewer-role
6 | rules:
7 | - apiGroups:
8 | - fluentd.fluent.io
9 | resources:
10 | - fluentdconfigs
11 | verbs:
12 | - get
13 | - list
14 | - watch
15 | - apiGroups:
16 | - fluentd.fluent.io
17 | resources:
18 | - fluentdconfigs/status
19 | verbs:
20 | - get
21 |
--------------------------------------------------------------------------------
/config/rbac/input_editor_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to edit inputs.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: input-editor-role
6 | rules:
7 | - apiGroups:
8 | - fluentbit.fluent.io
9 | resources:
10 | - inputs
11 | verbs:
12 | - create
13 | - delete
14 | - get
15 | - list
16 | - patch
17 | - update
18 | - watch
19 | - apiGroups:
20 | - fluentbit.fluent.io
21 | resources:
22 | - inputs/status
23 | verbs:
24 | - get
25 |
--------------------------------------------------------------------------------
/config/rbac/input_viewer_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to view inputs.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: input-viewer-role
6 | rules:
7 | - apiGroups:
8 | - fluentbit.fluent.io
9 | resources:
10 | - inputs
11 | verbs:
12 | - get
13 | - list
14 | - watch
15 | - apiGroups:
16 | - fluentbit.fluent.io
17 | resources:
18 | - inputs/status
19 | verbs:
20 | - get
21 |
--------------------------------------------------------------------------------
/config/rbac/kustomization.yaml:
--------------------------------------------------------------------------------
1 | resources:
2 | # All RBAC will be applied under this service account in
3 | # the deployment namespace. You may comment out this resource
4 | # if your manager will use a service account that exists at
5 | # runtime. Be sure to update RoleBinding and ClusterRoleBinding
6 | # subjects if changing service account names.
7 | - service_account.yaml
8 | - role.yaml
9 | - role_binding.yaml
10 | - leader_election_role.yaml
11 | - leader_election_role_binding.yaml
12 | # Comment the following 4 lines if you want to disable
13 | # the auth proxy (https://github.com/brancz/kube-rbac-proxy)
14 | # which protects your /metrics endpoint.
15 | - auth_proxy_service.yaml
16 | - auth_proxy_role.yaml
17 | - auth_proxy_role_binding.yaml
18 | - auth_proxy_client_clusterrole.yaml
19 |
20 | patchesStrategicMerge:
21 | # To do namespaced RBAC uncomment below
22 | # - scoped/role.yaml
--------------------------------------------------------------------------------
/config/rbac/leader_election_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions to do leader election.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: Role
4 | metadata:
5 | name: leader-election-role
6 | rules:
7 | - apiGroups:
8 | - ""
9 | resources:
10 | - configmaps
11 | verbs:
12 | - get
13 | - list
14 | - watch
15 | - create
16 | - update
17 | - patch
18 | - delete
19 | - apiGroups:
20 | - coordination.k8s.io
21 | resources:
22 | - leases
23 | verbs:
24 | - get
25 | - list
26 | - watch
27 | - create
28 | - update
29 | - patch
30 | - delete
31 | - apiGroups:
32 | - ""
33 | resources:
34 | - events
35 | verbs:
36 | - create
37 | - patch
38 |
--------------------------------------------------------------------------------
/config/rbac/leader_election_role_binding.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: rbac.authorization.k8s.io/v1
2 | kind: RoleBinding
3 | metadata:
4 | name: leader-election-rolebinding
5 | roleRef:
6 | apiGroup: rbac.authorization.k8s.io
7 | kind: Role
8 | name: leader-election-role
9 | subjects:
10 | - kind: ServiceAccount
11 | name: controller-manager
12 | namespace: system
13 |
--------------------------------------------------------------------------------
/config/rbac/output_editor_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to edit outputs.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: output-editor-role
6 | rules:
7 | - apiGroups:
8 | - fluentbit.fluent.io
9 | - fluentd.fluent.io
10 | resources:
11 | - outputs
12 | verbs:
13 | - create
14 | - delete
15 | - get
16 | - list
17 | - patch
18 | - update
19 | - watch
20 | - apiGroups:
21 | - fluentbit.fluent.io
22 | - fluentd.fluent.io
23 | resources:
24 | - outputs/status
25 | verbs:
26 | - get
27 |
--------------------------------------------------------------------------------
/config/rbac/output_viewer_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to view outputs.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: output-viewer-role
6 | rules:
7 | - apiGroups:
8 | - fluentbit.fluent.io
9 | - fluentd.fluent.io
10 | resources:
11 | - outputs
12 | verbs:
13 | - get
14 | - list
15 | - watch
16 | - apiGroups:
17 | - fluentbit.fluent.io
18 | - fluentd.fluent.io
19 | resources:
20 | - outputs/status
21 | verbs:
22 | - get
23 |
--------------------------------------------------------------------------------
/config/rbac/parser_editor_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to edit parsers.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: parser-editor-role
6 | rules:
7 | - apiGroups:
8 | - fluentbit.fluent.io
9 | resources:
10 | - parsers
11 | verbs:
12 | - create
13 | - delete
14 | - get
15 | - list
16 | - patch
17 | - update
18 | - watch
19 | - apiGroups:
20 | - fluentbit.fluent.io
21 | resources:
22 | - parsers/status
23 | verbs:
24 | - get
25 |
--------------------------------------------------------------------------------
/config/rbac/parser_viewer_role.yaml:
--------------------------------------------------------------------------------
1 | # permissions for end users to view parsers.
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | name: parser-viewer-role
6 | rules:
7 | - apiGroups:
8 | - fluentbit.fluent.io
9 | resources:
10 | - parsers
11 | verbs:
12 | - get
13 | - list
14 | - watch
15 | - apiGroups:
16 | - fluentbit.fluent.io
17 | resources:
18 | - parsers/status
19 | verbs:
20 | - get
21 |
--------------------------------------------------------------------------------
/config/rbac/role_binding.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: rbac.authorization.k8s.io/v1
2 | kind: ClusterRoleBinding
3 | metadata:
4 | name: manager-rolebinding
5 | roleRef:
6 | apiGroup: rbac.authorization.k8s.io
7 | kind: ClusterRole
8 | name: manager-role
9 | subjects:
10 | - kind: ServiceAccount
11 | name: controller-manager
12 | namespace: system
13 |
--------------------------------------------------------------------------------
/config/rbac/service_account.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ServiceAccount
3 | metadata:
4 | name: controller-manager
5 | namespace: system
6 |
--------------------------------------------------------------------------------
/config/samples/fluentbit_v1alpha2_clustermultilineparser.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: fluentbit.fluent.io/v1alpha2
2 | kind: ClusterMultilineParser
3 | metadata:
4 | name: java-multiline
5 | labels:
6 | fluentbit.fluent.io/enabled: "true"
7 | fluentbit.fluent.io/component: logging
8 | spec:
9 | type: "regex"
10 | flushTimeout: 1000
11 | keyContent: "log"
12 | rules:
13 | - start: "start_state"
14 | regex: '/\[?(\d+\-\d+\-\d+ \d+\:\d+\:\d+(\.\d+)?)\]? /'
15 | next: "cont"
16 | - start: "cont"
17 | regex: '/^(?!\[?\d+\-\d+\-\d+).*/'
18 | next: "cont"
--------------------------------------------------------------------------------
/config/samples/fluentbit_v1alpha2_filter.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: fluentbit.fluent.io/v1alpha2
2 | kind: Filter
3 | metadata:
4 | name: filter-sample
5 | labels:
6 | fluentbit.fluent.io/enabled: "true"
7 | spec:
8 | match: kube.*
9 | filters:
10 | - kubernetes:
11 | kubeURL: https://kubernetes.default.svc:443
12 | kubeCAFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
13 | kubeTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
14 | labels: false
15 | annotations: false
16 | - nest:
17 | operation: lift
18 | nestedUnder: kubernetes
19 | addPrefix: kubernetes_
20 | - modify:
21 | rules:
22 | - remove: stream
23 | - remove: kubernetes_pod_id
24 | - remove: kubernetes_host
25 | - remove: kubernetes_pod_id
26 | - remove: kubernetes_container_hash
27 | - nest:
28 | operation: nest
29 | wildcard:
30 | - kubernetes_*
31 | nestUnder: kubernetes
32 | removePrefix: kubernetes_
33 |
--------------------------------------------------------------------------------
/config/samples/fluentbit_v1alpha2_fluentbit.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: fluentbit.fluent.io/v1alpha2
2 | kind: FluentBit
3 | metadata:
4 | name: fluentbit-sample
5 | labels:
6 | app: fluent-bit
7 | spec:
8 | # renovate: datasource=docker depName=ghcr.io/fluent/fluent-operator/fluent-bit
9 | image: ghcr.io/fluent/fluent-operator/fluent-bit:4.0.1
10 | imagePullPolicy: IfNotPresent
11 | positionDB:
12 | hostPath:
13 | path: /var/lib/fluent-bit/
14 | fluentBitConfigName: fluentbitconfig-sample
15 | disableLogVolumes: false
16 |
--------------------------------------------------------------------------------
/config/samples/fluentbit_v1alpha2_fluentbitconfig.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: fluentbit.fluent.io/v1alpha2
2 | kind: FluentBitConfig
3 | metadata:
4 | name: fluentbitconfig-sample
5 | spec:
6 | service:
7 | flush: 1
8 | daemon: false
9 | logLevel: info
10 | parsersFile: parsers.conf
11 | inputSelector:
12 | matchExpressions:
13 | - key: fluentbit.fluent.io/enabled
14 | operator: In
15 | values: ["true"]
16 | filterSelector:
17 | matchExpressions:
18 | - key: fluentbit.fluent.io/enabled
19 | operator: In
20 | values: ["true"]
21 | outputSelector:
22 | matchExpressions:
23 | - key: fluentbit.fluent.io/enabled
24 | operator: In
25 | values: ["true"]
26 |
--------------------------------------------------------------------------------
/config/samples/fluentbit_v1alpha2_input.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: fluentbit.fluent.io/v1alpha2
2 | kind: Input
3 | metadata:
4 | name: input-sample
5 | labels:
6 | fluentbit.fluent.io/enabled: "true"
7 | spec:
8 | tail:
9 | tag: kube.*
10 | path: /var/log/containers/*.log
11 | parser: docker
12 | refreshIntervalSeconds: 10
13 | memBufLimit: 5MB
14 | skipLongLines: true
15 | db: /tail/pos.db
16 | dbSync: Normal
17 |
--------------------------------------------------------------------------------
/config/samples/fluentbit_v1alpha2_output.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: fluentbit.fluent.io/v1alpha2
2 | kind: Output
3 | metadata:
4 | name: output-sample
5 | labels:
6 | fluentbit.fluent.io/enabled: "true"
7 | spec:
8 | match: kube.*
9 | es:
10 | host: elasticsearch-logging-data.kubesphere-logging-system.svc
11 | port: 9200
12 | logstashPrefix: ks-logstash-log
13 | logstashFormat: true
14 | timeKey: "@timestamp"
--------------------------------------------------------------------------------
/config/samples/fluentbit_v1alpha2_parser.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: fluentbit.fluent.io/v1alpha2
2 | kind: Parser
3 | metadata:
4 | name: parser-sample
5 | spec:
6 | regex:
7 | timeKey: time
8 | timeFormat: "%d/%b/%Y:%H:%M:%S %z"
9 | types: "code:integer size:integer"
10 | regex: '^(?[^ ]*) [^ ]* (?[^ ]*) \[(?