# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1alpha1
kind: Kamelet
metadata:
  name: cron-source
  annotations:
    camel.apache.org/kamelet.support.level: "Stable"
    camel.apache.org/catalog.version: "3.21.0"
    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAwIiBoZWlnaHQ9IjI1MDAiIHZpZXdCb3g9IjAgMCAxOTIuNzU2IDE5Mi43NTYiPjxnIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDE5Mi43NTZ2MTkyLjc1NkgwVjB6Ii8+PHBhdGggZD0iTTQyLjE2IDEwMy4wNzJsNS45MDEgMS40OTZjLTEuMjQyIDQuODY1LTMuNDc2IDguNTc0LTYuNzAxIDExLjEyOXMtNy4xNjcgMy44MzItMTEuODI2IDMuODMyYy00LjgyMyAwLTguNzQ2LS45ODItMTEuNzY3LTIuOTQ3LTMuMDIxLTEuOTY1LTUuMzIyLTQuODExLTYuODk4LTguNTM3LTEuNTc2LTMuNzI1LTIuMzY1LTcuNzI3LTIuMzY1LTEyLjAwMiAwLTQuNjYzLjg5LTguNzMgMi42NjktMTIuMjAyIDEuNzc5LTMuNDcyIDQuMzEyLTYuMTA4IDcuNTk3LTcuOTEgMy4yODU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C4yNjgtNi4yODMtNy41ODYtOC4yNTZjLTMuMzE2LTEuOTc0LTcuMDQxLTIuOTYxLTExLjE3Mi0yLjk2MS02LjMxMSAwLTExLjQ1OSAyLjEwMi0xNS40NDcgNi4zMDMtMy45ODggNC4yMDItNS45ODIgMTAuMDE2LTUuOTgyIDE3LjQ0NCAwIDMuOTI1Ljg1MyA3LjY1IDIuNTYyIDExLjE3ek0xNDguOTc1IDExOC43NVY3NC4wMDVoNi4xMDNsMjMuNDY3IDM1LjEydi0zNS4xMmg1LjcwN3Y0NC43NDVoLTYuMTA0bC0yMy40NjYtMzUuMTE5djM1LjExOWgtNS43MDd6IiBmaWxsPSIjY2MyMjI5Ii8+PC9nPjwvc3ZnPg=="
    camel.apache.org/provider: "Apache Software Foundation"
    camel.apache.org/kamelet.group: "Cron"
    camel.apache.org/kamelet.namespace: "Scheduling"
  labels:
    camel.apache.org/kamelet.type: "source"
spec:
  definition:
    title: "Cron Source"
    description: |-
      Send events at specific time.
    required:
      - schedule
      - message
    type: object
    properties:
      schedule:
        title: Cron Schedule
        description: A cron expression that will be used to trigger events generation.
        type: string
        example: "0/3 10 * * * ?"
      message:
        title: Message
        description: The message to generate
        type: string
        example: hello world
  types:
    out:
      mediaType: text/plain
  dependencies:
  - "camel:quartz"
  - "camel:core"
  - "camel:cron"
  - "camel:kamelet"
  template:
    from:
      uri: "cron:tick"
      parameters:
        schedule: "{{schedule}}"
      steps:
      - set-body:
          constant: "{{message}}"
      - to: "kamelet:sink"