@luminati-io/kubernetes-models-fluent-operator
Version:
Models for https://github.com/fluent/fluent-operator
358 lines (357 loc) • 15.2 kB
TypeScript
import { IObjectMeta } from "@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta";
import { Model, ModelData } from "@kubernetes-models/base";
/**
* Filter is the Schema for the filters API
*/
export interface IFilter {
/**
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
*/
"apiVersion": "fluentd.fluent.io/v1alpha1";
/**
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*/
"kind": "Filter";
"metadata"?: IObjectMeta;
/**
* FilterSpec defines the desired state of Filter
*/
"spec"?: {
"filters"?: Array<{
/**
* Custom plugin type
*/
"customPlugin"?: {
"config": string;
};
/**
* The filter_grep filter plugin
*/
"grep"?: {
"and"?: Array<{
/**
* Exclude defines the parameters for the exclude plugin
*/
"exclude"?: {
"key"?: string;
"pattern"?: string;
};
/**
* Regexp defines the parameters for the regexp plugin
*/
"regexp"?: {
"key"?: string;
"pattern"?: string;
};
}>;
"exclude"?: Array<{
"key"?: string;
"pattern"?: string;
}>;
"or"?: Array<{
/**
* Exclude defines the parameters for the exclude plugin
*/
"exclude"?: {
"key"?: string;
"pattern"?: string;
};
/**
* Regexp defines the parameters for the regexp plugin
*/
"regexp"?: {
"key"?: string;
"pattern"?: string;
};
}>;
"regexp"?: Array<{
"key"?: string;
"pattern"?: string;
}>;
};
/**
* The @log_level parameter specifies the plugin-specific logging level
*/
"logLevel"?: string;
/**
* The filter_parser filter plugin
*/
"parser"?: {
/**
* Emits invalid record to @ERROR label. Invalid cases are: key does not exist;the format is not matched;an unexpected error. If you want to ignore these errors, set false.
*/
"emitInvalidRecordToError"?: boolean;
/**
* Stores the parsed values as a hash value in a field.
*/
"hashValueField"?: string;
/**
* Stores the parsed values with the specified key name prefix.
*/
"injectKeyPrefix"?: string;
/**
* Specifies the field name in the record to parse. Required parameter. i.e: If set keyName to log, {"key":"value","log":"{\"time\":1622473200,\"user\":1}"} => {"user":1}
*/
"keyName": string;
/**
* Parse defines various parameters for the parse plugin
*/
"parse": {
/**
* If true, use Fluent::Eventnow(current time) as a timestamp when time_key is specified.
*/
"estimateCurrentEvent"?: boolean;
/**
* Specifies the regular expression for matching logs. Regular expression also supports i and m suffix.
*/
"expression"?: string;
/**
* The @id parameter specifies a unique name for the configuration.
*/
"id"?: string;
/**
* If true, keep time field in th record.
*/
"keepTimeKey"?: boolean;
/**
* If true, uses local time.
*/
"localtime"?: boolean;
/**
* The @log_level parameter specifies the plugin-specific logging level
*/
"logLevel"?: string;
/**
* Process value according to the specified format. This is available only when time_type is string
*/
"timeFormat"?: string;
/**
* Uses the specified time format as a fallback in the specified order. You can parse undetermined time format by using time_format_fallbacks. This options is enabled when time_type is mixed.
*/
"timeFormatFallbacks"?: string;
/**
* Specify time field for event time. If the event doesn't have this field, current time is used.
*/
"timeKey"?: string;
/**
* parses/formats value according to this type, default is string
*/
"timeType"?: "float" | "unixtime" | "string" | "mixed";
/**
* Specify timeout for parse processing.
*/
"timeout"?: string;
/**
* Uses the specified timezone.
*/
"timezone"?: string;
/**
* The @type parameter specifies the type of the plugin.
*/
"type": "regexp" | "apache2" | "apache_error" | "nginx" | "syslog" | "csv" | "tsv" | "ltsv" | "json" | "multiline" | "none";
/**
* Specify types for converting field into another, i.e: types user_id:integer,paid:bool,paid_usd_amount:float
*/
"types"?: string;
/**
* If true, uses UTC.
*/
"utc"?: boolean;
};
/**
* Removes key_name field when parsing is succeeded.
*/
"removeKeyNameField"?: boolean;
/**
* If true, invalid string is replaced with safe characters and re-parse it.
*/
"replaceInvalidSequence"?: boolean;
/**
* Keeps the original key-value pair in the parsed result. Default is false. i.e: If set keyName to log, reverseData to true, {"key":"value","log":"{\"user\":1,\"num\":2}"} => {"key":"value","log":"{\"user\":1,\"num\":2}","user":1,"num":2}
*/
"reserveData"?: boolean;
/**
* Keeps the original event time in the parsed result. Default is false.
*/
"reserveTime"?: boolean;
};
/**
* The filter_record_transformer filter plugin
*/
"recordTransformer"?: {
/**
* Automatically casts the field types. Default is false. This option is effective only for field values comprised of a single placeholder.
*/
"autoTypecast"?: boolean;
/**
* When set to true, the full Ruby syntax is enabled in the ${...} expression. The default value is false. i.e: jsonized_record ${record.to_json}
*/
"enableRuby"?: boolean;
/**
* A list of keys to keep. Only relevant if renew_record is set to true.
*/
"keepKeys"?: string;
"records"?: Array<{
/**
* New field can be defined as key
*/
"key": string;
/**
* The value must from Record properties. See https://docs.fluentd.org/filter/record_transformer#less-than-record-greater-than-directive
*/
"value": string;
}>;
/**
* A list of keys to delete. Supports nested field via record_accessor syntax since v1.1.0.
*/
"removeKeys"?: string;
/**
* By default, the record transformer filter mutates the incoming data. However, if this parameter is set to true, it modifies a new empty hash instead.
*/
"renewRecord"?: boolean;
/**
* renew_time_key foo overwrites the time of events with a value of the record field foo if exists. The value of foo must be a Unix timestamp.
*/
"renewTimeKey"?: string;
};
/**
* The filter_stdout filter plugin
*/
"stdout"?: {
/**
* The format section
*/
"format"?: {
/**
* Delimiter for each field.
*/
"delimiter"?: string;
/**
* The @id parameter specifies a unique name for the configuration.
*/
"id"?: string;
/**
* If true, uses local time.
*/
"localtime"?: boolean;
/**
* The @log_level parameter specifies the plugin-specific logging level
*/
"logLevel"?: string;
/**
* Specify newline characters.
*/
"newline"?: "lf" | "crlf";
/**
* Output tag field if true.
*/
"outputTag"?: boolean;
/**
* Output time field if true.
*/
"outputTime"?: boolean;
/**
* Process value according to the specified format. This is available only when time_type is string
*/
"timeFormat"?: string;
/**
* Uses the specified time format as a fallback in the specified order. You can parse undetermined time format by using time_format_fallbacks. This options is enabled when time_type is mixed.
*/
"timeFormatFallbacks"?: string;
/**
* parses/formats value according to this type, default is string
*/
"timeType"?: "float" | "unixtime" | "string" | "mixed";
/**
* Uses the specified timezone.
*/
"timezone"?: string;
/**
* The @type parameter specifies the type of the plugin.
*/
"type"?: "out_file" | "json" | "ltsv" | "csv" | "msgpack" | "hash" | "single_value";
/**
* If true, uses UTC.
*/
"utc"?: boolean;
};
/**
* The inject section
*/
"inject"?: {
/**
* Hostname value
*/
"hostname"?: string;
/**
* The field name to inject hostname
*/
"hostnameKey"?: string;
/**
* Time section
*/
"inline"?: {
/**
* If true, uses local time.
*/
"localtime"?: boolean;
/**
* Process value according to the specified format. This is available only when time_type is string
*/
"timeFormat"?: string;
/**
* Uses the specified time format as a fallback in the specified order. You can parse undetermined time format by using time_format_fallbacks. This options is enabled when time_type is mixed.
*/
"timeFormatFallbacks"?: string;
/**
* parses/formats value according to this type, default is string
*/
"timeType"?: "float" | "unixtime" | "string" | "mixed";
/**
* Uses the specified timezone.
*/
"timezone"?: string;
/**
* If true, uses UTC.
*/
"utc"?: boolean;
};
/**
* The field name to inject tag
*/
"tagKey"?: string;
/**
* The field name to inject time
*/
"timeKey"?: string;
/**
* The field name to inject worker_id
*/
"workerIdKey"?: string;
};
};
/**
* Which tag to be matched.
*/
"tag"?: string;
}>;
};
/**
* FilterStatus defines the observed state of Filter
*/
"status"?: {};
}
/**
* Filter is the Schema for the filters API
*/
export declare class Filter extends Model<IFilter> implements IFilter {
"apiVersion": IFilter["apiVersion"];
"kind": IFilter["kind"];
"metadata"?: IFilter["metadata"];
"spec"?: IFilter["spec"];
"status"?: IFilter["status"];
static apiVersion: IFilter["apiVersion"];
static kind: IFilter["kind"];
static is: import("@kubernetes-models/base").TypeMetaGuard<IFilter>;
constructor(data?: ModelData<IFilter>);
}