kcr_fluentd_fluent_io 3.20260124.214859

Kubernetes Custom Resource Bindings
Documentation
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/fluent/fluent-operator/fluentd.fluent.io/v1alpha1/fluentdconfigs.yaml
// kopium version: 0.22.5

#[allow(unused_imports)]
mod prelude {
    pub use kube::CustomResource;
    pub use serde::{Serialize, Deserialize};
    pub use std::collections::BTreeMap;
}
use self::prelude::*;

/// FluentdConfigSpec defines the desired state of FluentdConfig
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "fluentd.fluent.io", version = "v1alpha1", kind = "FluentdConfig", plural = "fluentdconfigs")]
#[kube(namespaced)]
#[kube(status = "FluentdConfigStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct FluentdConfigSpec {
    /// Select cluster filter plugins
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterFilterSelector")]
    pub cluster_filter_selector: Option<FluentdConfigClusterFilterSelector>,
    /// Select cluster input plugins
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterInputSelector")]
    pub cluster_input_selector: Option<FluentdConfigClusterInputSelector>,
    /// Select cluster output plugins
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterOutputSelector")]
    pub cluster_output_selector: Option<FluentdConfigClusterOutputSelector>,
    /// Emit mode. If batch, the plugin will emit events per labels matched. Enum: record, batch.
    /// will make no effect if EnableFilterKubernetes is set false.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub emit_mode: Option<FluentdConfigEmitMode>,
    /// Select namespaced filter plugins
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "filterSelector")]
    pub filter_selector: Option<FluentdConfigFilterSelector>,
    /// Select cluster input plugins
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "inputSelector")]
    pub input_selector: Option<FluentdConfigInputSelector>,
    /// Select namespaced output plugins
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "outputSelector")]
    pub output_selector: Option<FluentdConfigOutputSelector>,
    /// Sticky tags will match only one record from an event stream. The same tag will be treated the same way.
    /// will make no effect if EnableFilterKubernetes is set false.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "stickyTags")]
    pub sticky_tags: Option<String>,
    /// A set of container names. Ignored if left empty.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "watchedConstainers")]
    pub watched_constainers: Option<Vec<String>>,
    /// A set of hosts. Ignored if left empty.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "watchedHosts")]
    pub watched_hosts: Option<Vec<String>>,
    /// Use this field to filter the logs, will make no effect if EnableFilterKubernetes is set false.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "watchedLabels")]
    pub watched_labels: Option<BTreeMap<String, String>>,
}

/// Select cluster filter plugins
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FluentdConfigClusterFilterSelector {
    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
    pub match_expressions: Option<Vec<FluentdConfigClusterFilterSelectorMatchExpressions>>,
    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
    pub match_labels: Option<BTreeMap<String, String>>,
}

/// A label selector requirement is a selector that contains values, a key, and an operator that
/// relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FluentdConfigClusterFilterSelectorMatchExpressions {
    /// key is the label key that the selector applies to.
    pub key: String,
    /// operator represents a key's relationship to a set of values.
    /// Valid operators are In, NotIn, Exists and DoesNotExist.
    pub operator: String,
    /// values is an array of string values. If the operator is In or NotIn,
    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
    /// the values array must be empty. This array is replaced during a strategic
    /// merge patch.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub values: Option<Vec<String>>,
}

/// Select cluster input plugins
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FluentdConfigClusterInputSelector {
    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
    pub match_expressions: Option<Vec<FluentdConfigClusterInputSelectorMatchExpressions>>,
    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
    pub match_labels: Option<BTreeMap<String, String>>,
}

/// A label selector requirement is a selector that contains values, a key, and an operator that
/// relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FluentdConfigClusterInputSelectorMatchExpressions {
    /// key is the label key that the selector applies to.
    pub key: String,
    /// operator represents a key's relationship to a set of values.
    /// Valid operators are In, NotIn, Exists and DoesNotExist.
    pub operator: String,
    /// values is an array of string values. If the operator is In or NotIn,
    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
    /// the values array must be empty. This array is replaced during a strategic
    /// merge patch.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub values: Option<Vec<String>>,
}

/// Select cluster output plugins
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FluentdConfigClusterOutputSelector {
    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
    pub match_expressions: Option<Vec<FluentdConfigClusterOutputSelectorMatchExpressions>>,
    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
    pub match_labels: Option<BTreeMap<String, String>>,
}

/// A label selector requirement is a selector that contains values, a key, and an operator that
/// relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FluentdConfigClusterOutputSelectorMatchExpressions {
    /// key is the label key that the selector applies to.
    pub key: String,
    /// operator represents a key's relationship to a set of values.
    /// Valid operators are In, NotIn, Exists and DoesNotExist.
    pub operator: String,
    /// values is an array of string values. If the operator is In or NotIn,
    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
    /// the values array must be empty. This array is replaced during a strategic
    /// merge patch.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub values: Option<Vec<String>>,
}

/// FluentdConfigSpec defines the desired state of FluentdConfig
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum FluentdConfigEmitMode {
    #[serde(rename = "record")]
    Record,
    #[serde(rename = "batch")]
    Batch,
}

/// Select namespaced filter plugins
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FluentdConfigFilterSelector {
    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
    pub match_expressions: Option<Vec<FluentdConfigFilterSelectorMatchExpressions>>,
    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
    pub match_labels: Option<BTreeMap<String, String>>,
}

/// A label selector requirement is a selector that contains values, a key, and an operator that
/// relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FluentdConfigFilterSelectorMatchExpressions {
    /// key is the label key that the selector applies to.
    pub key: String,
    /// operator represents a key's relationship to a set of values.
    /// Valid operators are In, NotIn, Exists and DoesNotExist.
    pub operator: String,
    /// values is an array of string values. If the operator is In or NotIn,
    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
    /// the values array must be empty. This array is replaced during a strategic
    /// merge patch.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub values: Option<Vec<String>>,
}

/// Select cluster input plugins
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FluentdConfigInputSelector {
    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
    pub match_expressions: Option<Vec<FluentdConfigInputSelectorMatchExpressions>>,
    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
    pub match_labels: Option<BTreeMap<String, String>>,
}

/// A label selector requirement is a selector that contains values, a key, and an operator that
/// relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FluentdConfigInputSelectorMatchExpressions {
    /// key is the label key that the selector applies to.
    pub key: String,
    /// operator represents a key's relationship to a set of values.
    /// Valid operators are In, NotIn, Exists and DoesNotExist.
    pub operator: String,
    /// values is an array of string values. If the operator is In or NotIn,
    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
    /// the values array must be empty. This array is replaced during a strategic
    /// merge patch.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub values: Option<Vec<String>>,
}

/// Select namespaced output plugins
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FluentdConfigOutputSelector {
    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
    pub match_expressions: Option<Vec<FluentdConfigOutputSelectorMatchExpressions>>,
    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
    pub match_labels: Option<BTreeMap<String, String>>,
}

/// A label selector requirement is a selector that contains values, a key, and an operator that
/// relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FluentdConfigOutputSelectorMatchExpressions {
    /// key is the label key that the selector applies to.
    pub key: String,
    /// operator represents a key's relationship to a set of values.
    /// Valid operators are In, NotIn, Exists and DoesNotExist.
    pub operator: String,
    /// values is an array of string values. If the operator is In or NotIn,
    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
    /// the values array must be empty. This array is replaced during a strategic
    /// merge patch.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub values: Option<Vec<String>>,
}

/// FluentdConfigStatus defines the observed state of FluentdConfig
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct FluentdConfigStatus {
    /// Messages defines the plugin errors which is selected by this fluentdconfig
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub messages: Option<String>,
    /// The state of this fluentd config
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub state: Option<String>,
}