minio-sink/kamelet.json

194 lines
7.0 KiB
JSON
Raw Permalink Normal View History

2026-10-12 02:35:25 +00:00
{
"apiVersion": "camel.apache.org/v1",
"kind": "Kamelet",
"metadata": {
"name": "minio-sink",
"annotations": {
"camel.apache.org/kamelet.support.level": "Stable",
"camel.apache.org/catalog.version": "4.22.1",
"camel.apache.org/kamelet.icon": "data:image/svg+xml;base64,PHN2ZyBkYXRhLW5hbWU9IkxheWVyIDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDE2Mi42MTIgMjQuNDY1Ij48cGF0aCBkPSJNNTIuNzUxLjQxNGg5LjEwOHYyMy42M2gtOS4xMDh6TTQxLjcxMS43NGwtMTguNDg4IDkuOTJhLjkxOS45MTkgMCAwIDEtLjg1NiAwTDMuODc5Ljc0QTIuODA4IDIuODA4IDAgMCAwIDIuNTU4LjQxNGgtLjAyM0EyLjQgMi40IDAgMCAwIDAgMi42NDF2MjEuMzc2aDkuMVYxMy44NDJhLjkxOC45MTggMCAwIDEgMS4zODUtLjY4MmwxMC4zNjEgNS41NjhhMy42MzQgMy42MzQgMCAwIDAgMy4zMzYuMDI4bDEwLjkzMy01LjYzNGEuOTE3LjkxNyAwIDAgMSAxLjM3MS42OXYxMC4yMDVoOS4xVjIuNjQxQTIuNCAyLjQgMCAwIDAgNDMuMDU1LjQxNGgtLjAyM2EyLjgwOCAyLjgwOCAwIDAgMC0xLjMyMS4zMjZ6bTY1LjU2NC0uMzI2aC05LjIzN3YxMC43NTVhLjkxMy45MTMgMCAwIDEtMS4zMzguNzA2TDcyLjc2Mi42NzVhMi44MjQgMi44MjQgMCAwIDAtMS4xOTEtLjI2MWgtLjAxNmEyLjQgMi40IDAgMCAwLTIuNTM1IDIuMjI3djIxLjM3N2g5LjE2M1YxMy4yNzVhLjkxNC45MTQgMCAwIDEgMS4zMzctLjcwN2wyNC4wMzIgMTEuMmEyLjgxMyAyLjgxMyAwIDAgMCAxLjE4OC4yNiAyLjQgMi40IDAgMCAwIDIuNTM1LTIuMjI3em03LjE2MSAyMy42M1YuNDE0aDQuMTkxdjIzLjYzem0yOC44NTYuNDIxYy0xMS4yNzQgMC0xOS4yNzItNC43LTE5LjI3Mi0xMi4yMzJDMTI0LjAyIDQuNzQxIDEzMi4wNjYgMCAxNDMuMjkyIDBzMTkuMzIgNC43IDE5LjMyIDEyLjIzMy03LjkwMiAxMi4yMzItMTkuMzIgMTIuMjMyem0wLTIxLjMzM2MtOC4zODMgMC0xNC44NCAzLjIxNy0xNC44NCA5LjEgMCA1LjkyNiA2LjQ1NyA5LjEgMTQuODQgOS4xczE0Ljg4Ny0zLjE3NCAxNC44ODctOS4xYzAtNS44ODMtNi41MDQtOS4xLTE0Ljg4Ny05LjF6IiBmaWxsPSIjYzcyYzQ4Ii8+PC9zdmc+",
"camel.apache.org/provider": "Apache Software Foundation",
"camel.apache.org/kamelet.group": "Minio",
"camel.apache.org/kamelet.namespace": "Cloud"
},
"labels": {
"camel.apache.org/kamelet.type": "sink"
}
},
"spec": {
"definition": {
"title": "Minio Sink",
"description": "Upload data to MinIO.",
"required": [
"bucketName",
"accessKey",
"secretKey",
"endpoint"
],
"type": "object",
"properties": {
"bucketName": {
"title": "Bucket Name",
"description": "The Minio Bucket name.",
"type": "string"
},
"accessKey": {
"title": "Access Key",
"description": "The access key obtained from MinIO.",
"type": "string",
"format": "password",
"x-descriptors": [
"urn:camel:group:credentials"
]
},
"secretKey": {
"title": "Secret Key",
"description": "The secret key obtained from MinIO.",
"type": "string",
"format": "password",
"x-descriptors": [
"urn:camel:group:credentials"
]
},
"endpoint": {
"title": "Endpoint",
"description": "The MinIO Endpoint. You can specify an URL, domain name, IPv4 address, or IPv6 address.",
"type": "string",
"example": "http://localhost:9000"
},
"autoCreateBucket": {
"title": "Autocreate Bucket",
"description": "Specify to automatically create the MinIO bucket.",
"type": "boolean",
"default": false
},
"keyName": {
"title": "Key Name",
"description": "The key name for saving an element in the bucket.",
"type": "string"
}
}
},
"dependencies": [
"camel:core",
"camel:minio",
"camel:kamelet"
],
"template": {
"from": {
"uri": "kamelet:source",
"steps": [
{
"choice": {
"precondition": true,
"when": [
{
"simple": "${propertiesExist:!keyName}",
"steps": [
{
"choice": {
"when": [
{
"simple": "${header[file]}",
"steps": [
{
"setHeader": {
"name": "CamelMinioObjectName",
"simple": "${header[file]}"
}
}
]
},
{
"simple": "${header[ce-file]}",
"steps": [
{
"setHeader": {
"name": "CamelMinioObjectName",
"simple": "${header[ce-file]}"
}
}
]
}
],
"otherwise": {
"steps": [
{
"setHeader": {
"name": "CamelMinioObjectName",
"simple": "${exchangeId}"
}
}
]
}
}
}
]
}
]
}
},
{
"to": {
"uri": "minio:{{bucketName}}",
"parameters": {
"autoCreateBucket": "{{autoCreateBucket}}",
"secretKey": "{{secretKey}}",
"accessKey": "{{accessKey}}",
"endpoint": "{{endpoint}}",
"keyName": "{{?keyName}}"
}
}
}
]
}
}
},
"propertiesSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "Minio Sink",
"description": "Upload data to MinIO.",
"required": [
"bucketName",
"accessKey",
"secretKey",
"endpoint"
],
"properties": {
"bucketName": {
"type": "string",
"title": "Bucket Name",
"description": "The Minio Bucket name."
},
"accessKey": {
"type": "string",
"title": "Access Key",
"description": "The access key obtained from MinIO.",
"format": "password"
},
"secretKey": {
"type": "string",
"title": "Secret Key",
"description": "The secret key obtained from MinIO.",
"format": "password"
},
"endpoint": {
"type": "string",
"title": "Endpoint",
"description": "The MinIO Endpoint. You can specify an URL, domain name, IPv4 address, or IPv6 address."
},
"autoCreateBucket": {
"type": "boolean",
"title": "Autocreate Bucket",
"description": "Specify to automatically create the MinIO bucket.",
"default": false
},
"keyName": {
"type": "string",
"title": "Key Name",
"description": "The key name for saving an element in the bucket."
}
}
}
}