@luminati-io/kubernetes-models-fluent-operator
Version:
Models for https://github.com/fluent/fluent-operator
269 lines (268 loc) • 9.93 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 = "fluentd.fluent.io.v1alpha1.FluentdConfig";
const schema = {
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"enum": [
"fluentd.fluent.io/v1alpha1"
]
},
"kind": {
"type": "string",
"enum": [
"FluentdConfig"
]
},
"metadata": {
"oneOf": [
{
"$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#"
},
{
"type": "null"
}
]
},
"spec": {
"properties": {
"clusterFilterSelector": {
"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
},
"clusterOutputSelector": {
"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
},
"emit_mode": {
"enum": [
"record",
"batch"
],
"type": "string",
"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
},
"stickyTags": {
"type": "string",
"nullable": true
},
"watchedConstainers": {
"items": {
"type": "string"
},
"type": "array",
"nullable": true
},
"watchedHosts": {
"items": {
"type": "string"
},
"type": "array",
"nullable": true
},
"watchedLabels": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"properties": {},
"nullable": true
}
},
"type": "object",
"nullable": true
},
"status": {
"properties": {
"messages": {
"type": "string",
"nullable": true
},
"state": {
"type": "string",
"nullable": true
}
},
"type": "object",
"nullable": true
}
},
"required": [
"apiVersion",
"kind"
]
};
/**
* FluentdConfig is the Schema for the fluentdconfigs API
*/
export class FluentdConfig extends Model {
constructor(data) {
super({
apiVersion: FluentdConfig.apiVersion,
kind: FluentdConfig.kind,
...data
});
}
}
FluentdConfig.apiVersion = "fluentd.fluent.io/v1alpha1";
FluentdConfig.kind = "FluentdConfig";
FluentdConfig.is = createTypeMetaGuard(FluentdConfig);
setSchema(FluentdConfig, schemaId, () => {
addSchema();
register(schemaId, schema);
});