@luminati-io/kubernetes-models-fluent-operator
Version:
Models for https://github.com/fluent/fluent-operator
221 lines (220 loc) • 8.46 kB
JavaScript
import { addSchema } from "@kubernetes-models/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1ObjectMeta";
import { Model, setSchema, createTypeMetaGuard } from "@kubernetes-models/base";
import { register } from "@kubernetes-models/validate";
const schemaId = "fluentbit.fluent.io.v1alpha2.FluentBitConfig";
const schema = {
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"enum": [
"fluentbit.fluent.io/v1alpha2"
]
},
"kind": {
"type": "string",
"enum": [
"FluentBitConfig"
]
},
"metadata": {
"oneOf": [
{
"$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#"
},
{
"type": "null"
}
]
},
"spec": {
"properties": {
"clusterParserSelector": {
"properties": {
"matchExpressions": {
"items": {
"properties": {
"key": {
"type": "string"
},
"operator": {
"type": "string"
},
"values": {
"items": {
"type": "string"
},
"type": "array",
"nullable": true
}
},
"required": [
"key",
"operator"
],
"type": "object"
},
"type": "array",
"nullable": true
},
"matchLabels": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"properties": {},
"nullable": true
}
},
"type": "object",
"nullable": true
},
"filterSelector": {
"properties": {
"matchExpressions": {
"items": {
"properties": {
"key": {
"type": "string"
},
"operator": {
"type": "string"
},
"values": {
"items": {
"type": "string"
},
"type": "array",
"nullable": true
}
},
"required": [
"key",
"operator"
],
"type": "object"
},
"type": "array",
"nullable": true
},
"matchLabels": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"properties": {},
"nullable": true
}
},
"type": "object",
"nullable": true
},
"outputSelector": {
"properties": {
"matchExpressions": {
"items": {
"properties": {
"key": {
"type": "string"
},
"operator": {
"type": "string"
},
"values": {
"items": {
"type": "string"
},
"type": "array",
"nullable": true
}
},
"required": [
"key",
"operator"
],
"type": "object"
},
"type": "array",
"nullable": true
},
"matchLabels": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"properties": {},
"nullable": true
}
},
"type": "object",
"nullable": true
},
"parserSelector": {
"properties": {
"matchExpressions": {
"items": {
"properties": {
"key": {
"type": "string"
},
"operator": {
"type": "string"
},
"values": {
"items": {
"type": "string"
},
"type": "array",
"nullable": true
}
},
"required": [
"key",
"operator"
],
"type": "object"
},
"type": "array",
"nullable": true
},
"matchLabels": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"properties": {},
"nullable": true
}
},
"type": "object",
"nullable": true
}
},
"type": "object",
"nullable": true
}
},
"required": [
"apiVersion",
"kind"
]
};
/**
* FluentBitConfig is the Schema for the API
*/
export class FluentBitConfig extends Model {
constructor(data) {
super({
apiVersion: FluentBitConfig.apiVersion,
kind: FluentBitConfig.kind,
...data
});
}
}
FluentBitConfig.apiVersion = "fluentbit.fluent.io/v1alpha2";
FluentBitConfig.kind = "FluentBitConfig";
FluentBitConfig.is = createTypeMetaGuard(FluentBitConfig);
setSchema(FluentBitConfig, schemaId, () => {
addSchema();
register(schemaId, schema);
});