github.com/argoproj/argo-events@v1.9.1/pkg/apis/sensor/v1alpha1/generated.proto (about) 1 /* 2 Copyright 2021 BlackRock, Inc. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 // This file was autogenerated by go-to-protobuf. Do not edit it manually! 18 19 syntax = "proto2"; 20 21 package github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1; 22 23 import "github.com/argoproj/argo-events/pkg/apis/common/generated.proto"; 24 import "k8s.io/api/core/v1/generated.proto"; 25 import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; 26 import "k8s.io/apimachinery/pkg/runtime/generated.proto"; 27 import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; 28 29 // Package-wide variables from generator "generated". 30 option go_package = "v1alpha1"; 31 32 // AWSLambdaTrigger refers to specification of the trigger to invoke an AWS Lambda function 33 message AWSLambdaTrigger { 34 // FunctionName refers to the name of the function to invoke. 35 optional string functionName = 1; 36 37 // AccessKey refers K8s secret containing aws access key 38 // +optional 39 optional k8s.io.api.core.v1.SecretKeySelector accessKey = 2; 40 41 // SecretKey refers K8s secret containing aws secret key 42 // +optional 43 optional k8s.io.api.core.v1.SecretKeySelector secretKey = 3; 44 45 // Region is AWS region 46 optional string region = 4; 47 48 // Payload is the list of key-value extracted from an event payload to construct the request payload. 49 repeated TriggerParameter payload = 5; 50 51 // Parameters is the list of key-value extracted from event's payload that are applied to 52 // the trigger resource. 53 // +optional 54 repeated TriggerParameter parameters = 6; 55 56 // Choose from the following options. 57 // 58 // * RequestResponse (default) - Invoke the function synchronously. Keep 59 // the connection open until the function returns a response or times out. 60 // The API response includes the function response and additional data. 61 // 62 // * Event - Invoke the function asynchronously. Send events that fail multiple 63 // times to the function's dead-letter queue (if it's configured). The API 64 // response only includes a status code. 65 // 66 // * DryRun - Validate parameter values and verify that the user or role 67 // has permission to invoke the function. 68 // +optional 69 optional string invocationType = 7; 70 71 // RoleARN is the Amazon Resource Name (ARN) of the role to assume. 72 // +optional 73 optional string roleARN = 8; 74 } 75 76 // ArgoWorkflowTrigger is the trigger for the Argo Workflow 77 message ArgoWorkflowTrigger { 78 // Source of the K8s resource file(s) 79 optional ArtifactLocation source = 1; 80 81 // Operation refers to the type of operation performed on the argo workflow resource. 82 // Default value is Submit. 83 // +optional 84 optional string operation = 2; 85 86 // Parameters is the list of parameters to pass to resolved Argo Workflow object 87 repeated TriggerParameter parameters = 3; 88 89 // Args is the list of arguments to pass to the argo CLI 90 repeated string args = 4; 91 } 92 93 // ArtifactLocation describes the source location for an external artifact 94 message ArtifactLocation { 95 // S3 compliant artifact 96 optional github.com.argoproj.argo_events.pkg.apis.common.S3Artifact s3 = 1; 97 98 // Inline artifact is embedded in sensor spec as a string 99 optional string inline = 2; 100 101 // File artifact is artifact stored in a file 102 optional FileArtifact file = 3; 103 104 // URL to fetch the artifact from 105 optional URLArtifact url = 4; 106 107 // Configmap that stores the artifact 108 optional k8s.io.api.core.v1.ConfigMapKeySelector configmap = 5; 109 110 // Git repository hosting the artifact 111 optional GitArtifact git = 6; 112 113 // Resource is generic template for K8s resource 114 optional github.com.argoproj.argo_events.pkg.apis.common.Resource resource = 7; 115 } 116 117 // AzureEventHubsTrigger refers to specification of the Azure Event Hubs Trigger 118 message AzureEventHubsTrigger { 119 // FQDN refers to the namespace dns of Azure Event Hubs to be used i.e. <namespace>.servicebus.windows.net 120 optional string fqdn = 1; 121 122 // HubName refers to the Azure Event Hub to send events to 123 optional string hubName = 2; 124 125 // SharedAccessKeyName refers to the name of the Shared Access Key 126 optional k8s.io.api.core.v1.SecretKeySelector sharedAccessKeyName = 3; 127 128 // SharedAccessKey refers to a K8s secret containing the primary key for the 129 optional k8s.io.api.core.v1.SecretKeySelector sharedAccessKey = 4; 130 131 // Payload is the list of key-value extracted from an event payload to construct the request payload. 132 repeated TriggerParameter payload = 5; 133 134 // Parameters is the list of key-value extracted from event's payload that are applied to 135 // the trigger resource. 136 // +optional 137 repeated TriggerParameter parameters = 6; 138 } 139 140 message AzureServiceBusTrigger { 141 // ConnectionString is the connection string for the Azure Service Bus 142 optional k8s.io.api.core.v1.SecretKeySelector connectionString = 1; 143 144 // QueueName is the name of the Azure Service Bus Queue 145 optional string queueName = 2; 146 147 // TopicName is the name of the Azure Service Bus Topic 148 optional string topicName = 3; 149 150 // SubscriptionName is the name of the Azure Service Bus Topic Subscription 151 optional string subscriptionName = 4; 152 153 // TLS configuration for the service bus client 154 // +optional 155 optional github.com.argoproj.argo_events.pkg.apis.common.TLSConfig tls = 5; 156 157 // Payload is the list of key-value extracted from an event payload to construct the request payload. 158 repeated TriggerParameter payload = 6; 159 160 // Parameters is the list of key-value extracted from event's payload that are applied to 161 // the trigger resource. 162 // +optional 163 repeated TriggerParameter parameters = 7; 164 } 165 166 message ConditionsResetByTime { 167 // Cron is a cron-like expression. For reference, see: https://en.wikipedia.org/wiki/Cron 168 optional string cron = 1; 169 170 // +optional 171 optional string timezone = 2; 172 } 173 174 message ConditionsResetCriteria { 175 // Schedule is a cron-like expression. For reference, see: https://en.wikipedia.org/wiki/Cron 176 optional ConditionsResetByTime byTime = 1; 177 } 178 179 // CustomTrigger refers to the specification of the custom trigger. 180 message CustomTrigger { 181 // ServerURL is the url of the gRPC server that executes custom trigger 182 optional string serverURL = 1; 183 184 // Secure refers to type of the connection between sensor to custom trigger gRPC 185 optional bool secure = 2; 186 187 // CertSecret refers to the secret that contains cert for secure connection between sensor and custom trigger gRPC server. 188 optional k8s.io.api.core.v1.SecretKeySelector certSecret = 3; 189 190 // ServerNameOverride for the secure connection between sensor and custom trigger gRPC server. 191 optional string serverNameOverride = 4; 192 193 // Spec is the custom trigger resource specification that custom trigger gRPC server knows how to interpret. 194 map<string, string> spec = 5; 195 196 // Parameters is the list of parameters that is applied to resolved custom trigger trigger object. 197 repeated TriggerParameter parameters = 6; 198 199 // Payload is the list of key-value extracted from an event payload to construct the request payload. 200 repeated TriggerParameter payload = 7; 201 } 202 203 // DataFilter describes constraints and filters for event data 204 // Regular Expressions are purposefully not a feature as they are overkill for our uses here 205 // See Rob Pike's Post: https://commandcenter.blogspot.com/2011/08/regular-expressions-in-lexing-and.html 206 message DataFilter { 207 // Path is the JSONPath of the event's (JSON decoded) data key 208 // Path is a series of keys separated by a dot. A key may contain wildcard characters '*' and '?'. 209 // To access an array value use the index as the key. The dot and wildcard characters can be escaped with '\\'. 210 // See https://github.com/tidwall/gjson#path-syntax for more information on how to use this. 211 optional string path = 1; 212 213 // Type contains the JSON type of the data 214 optional string type = 2; 215 216 // Value is the allowed string values for this key 217 // Booleans are passed using strconv.ParseBool() 218 // Numbers are parsed using as float64 using strconv.ParseFloat() 219 // Strings are taken as is 220 // Nils this value is ignored 221 repeated string value = 3; 222 223 // Comparator compares the event data with a user given value. 224 // Can be ">=", ">", "=", "!=", "<", or "<=". 225 // Is optional, and if left blank treated as equality "=". 226 optional string comparator = 4; 227 228 // Template is a go-template for extracting a string from the event's data. 229 // A Template is evaluated with provided path, type and value. 230 // The templating follows the standard go-template syntax as well as sprig's extra functions. 231 // See https://pkg.go.dev/text/template and https://masterminds.github.io/sprig/ 232 optional string template = 5; 233 } 234 235 // EmailTrigger refers to the specification of the email notification trigger. 236 message EmailTrigger { 237 // Parameters is the list of key-value extracted from event's payload that are applied to 238 // the trigger resource. 239 // +optional 240 repeated TriggerParameter parameters = 1; 241 242 // Username refers to the username used to connect to the smtp server. 243 // +optional 244 optional string username = 2; 245 246 // SMTPPassword refers to the Kubernetes secret that holds the smtp password used to connect to smtp server. 247 // +optional 248 optional k8s.io.api.core.v1.SecretKeySelector smtpPassword = 3; 249 250 // Host refers to the smtp host url to which email is send. 251 optional string host = 4; 252 253 // Port refers to the smtp server port to which email is send. 254 // Defaults to 0. 255 // +optional 256 optional int32 port = 5; 257 258 // To refers to the email addresses to which the emails are send. 259 // +optional 260 repeated string to = 6; 261 262 // From refers to the address from which the email is send from. 263 // +optional 264 optional string from = 7; 265 266 // Subject refers to the subject line for the email send. 267 // +optional 268 optional string subject = 8; 269 270 // Body refers to the body/content of the email send. 271 // +optional 272 optional string body = 9; 273 } 274 275 // Event represents the cloudevent received from an event source. 276 // +protobuf.options.(gogoproto.goproto_stringer)=false 277 message Event { 278 optional EventContext context = 1; 279 280 optional bytes data = 2; 281 } 282 283 // EventContext holds the context of the cloudevent received from an event source. 284 // +protobuf.options.(gogoproto.goproto_stringer)=false 285 message EventContext { 286 // ID of the event; must be non-empty and unique within the scope of the producer. 287 optional string id = 1; 288 289 // Source - A URI describing the event producer. 290 optional string source = 2; 291 292 // SpecVersion - The version of the CloudEvents specification used by the event. 293 optional string specversion = 3; 294 295 // Type - The type of the occurrence which has happened. 296 optional string type = 4; 297 298 // DataContentType - A MIME (RFC2046) string describing the media type of `data`. 299 optional string datacontenttype = 5; 300 301 // Subject - The subject of the event in the context of the event producer 302 optional string subject = 6; 303 304 // Time - A Timestamp when the event happened. 305 optional k8s.io.apimachinery.pkg.apis.meta.v1.Time time = 7; 306 } 307 308 // EventDependency describes a dependency 309 message EventDependency { 310 // Name is a unique name of this dependency 311 optional string name = 1; 312 313 // EventSourceName is the name of EventSource that Sensor depends on 314 optional string eventSourceName = 2; 315 316 // EventName is the name of the event 317 optional string eventName = 3; 318 319 // Filters and rules governing toleration of success and constraints on the context and data of an event 320 optional EventDependencyFilter filters = 4; 321 322 // Transform transforms the event data 323 optional EventDependencyTransformer transform = 5; 324 325 // FiltersLogicalOperator defines how different filters are evaluated together. 326 // Available values: and (&&), or (||) 327 // Is optional and if left blank treated as and (&&). 328 optional string filtersLogicalOperator = 6; 329 } 330 331 // EventDependencyFilter defines filters and constraints for a event. 332 message EventDependencyFilter { 333 // Time filter on the event with escalation 334 optional TimeFilter time = 1; 335 336 // Context filter constraints 337 optional EventContext context = 2; 338 339 // Data filter constraints with escalation 340 repeated DataFilter data = 3; 341 342 // Exprs contains the list of expressions evaluated against the event payload. 343 repeated ExprFilter exprs = 4; 344 345 // DataLogicalOperator defines how multiple Data filters (if defined) are evaluated together. 346 // Available values: and (&&), or (||) 347 // Is optional and if left blank treated as and (&&). 348 optional string dataLogicalOperator = 5; 349 350 // ExprLogicalOperator defines how multiple Exprs filters (if defined) are evaluated together. 351 // Available values: and (&&), or (||) 352 // Is optional and if left blank treated as and (&&). 353 optional string exprLogicalOperator = 6; 354 355 // Script refers to a Lua script evaluated to determine the validity of an event. 356 optional string script = 7; 357 } 358 359 // EventDependencyTransformer transforms the event 360 message EventDependencyTransformer { 361 // JQ holds the jq command applied for transformation 362 // +optional 363 optional string jq = 1; 364 365 // Script refers to a Lua script used to transform the event 366 // +optional 367 optional string script = 2; 368 } 369 370 message ExprFilter { 371 // Expr refers to the expression that determines the outcome of the filter. 372 optional string expr = 1; 373 374 // Fields refers to set of keys that refer to the paths within event payload. 375 repeated PayloadField fields = 2; 376 } 377 378 // FileArtifact contains information about an artifact in a filesystem 379 message FileArtifact { 380 optional string path = 1; 381 } 382 383 // GitArtifact contains information about an artifact stored in git 384 message GitArtifact { 385 // Git URL 386 optional string url = 1; 387 388 // Directory to clone the repository. We clone complete directory because GitArtifact is not limited to any specific Git service providers. 389 // Hence we don't use any specific git provider client. 390 optional string cloneDirectory = 2; 391 392 // Creds contain reference to git username and password 393 // +optional 394 optional GitCreds creds = 3; 395 396 // SSHKeySecret refers to the secret that contains SSH key 397 optional k8s.io.api.core.v1.SecretKeySelector sshKeySecret = 4; 398 399 // Path to file that contains trigger resource definition 400 optional string filePath = 5; 401 402 // Branch to use to pull trigger resource 403 // +optional 404 optional string branch = 6; 405 406 // Tag to use to pull trigger resource 407 // +optional 408 optional string tag = 7; 409 410 // Ref to use to pull trigger resource. Will result in a shallow clone and 411 // fetch. 412 // +optional 413 optional string ref = 8; 414 415 // Remote to manage set of tracked repositories. Defaults to "origin". 416 // Refer https://git-scm.com/docs/git-remote 417 // +optional 418 optional GitRemoteConfig remote = 9; 419 420 // Whether to ignore host key 421 // +optional 422 optional bool insecureIgnoreHostKey = 10; 423 } 424 425 // GitCreds contain reference to git username and password 426 message GitCreds { 427 optional k8s.io.api.core.v1.SecretKeySelector username = 1; 428 429 optional k8s.io.api.core.v1.SecretKeySelector password = 2; 430 } 431 432 // GitRemoteConfig contains the configuration of a Git remote 433 message GitRemoteConfig { 434 // Name of the remote to fetch from. 435 optional string name = 1; 436 437 // URLs the URLs of a remote repository. It must be non-empty. Fetch will 438 // always use the first URL, while push will use all of them. 439 repeated string urls = 2; 440 } 441 442 // HTTPTrigger is the trigger for the HTTP request 443 message HTTPTrigger { 444 // URL refers to the URL to send HTTP request to. 445 optional string url = 1; 446 447 repeated TriggerParameter payload = 2; 448 449 // TLS configuration for the HTTP client. 450 // +optional 451 optional github.com.argoproj.argo_events.pkg.apis.common.TLSConfig tls = 3; 452 453 // Method refers to the type of the HTTP request. 454 // Refer https://golang.org/src/net/http/method.go for more info. 455 // Default value is POST. 456 // +optional 457 optional string method = 4; 458 459 // Parameters is the list of key-value extracted from event's payload that are applied to 460 // the HTTP trigger resource. 461 repeated TriggerParameter parameters = 5; 462 463 // Timeout refers to the HTTP request timeout in seconds. 464 // Default value is 60 seconds. 465 // +optional 466 optional int64 timeout = 6; 467 468 // BasicAuth configuration for the http request. 469 // +optional 470 optional github.com.argoproj.argo_events.pkg.apis.common.BasicAuth basicAuth = 7; 471 472 // Headers for the HTTP request. 473 // +optional 474 map<string, string> headers = 8; 475 476 // Secure Headers stored in Kubernetes Secrets for the HTTP requests. 477 // +optional 478 repeated github.com.argoproj.argo_events.pkg.apis.common.SecureHeader secureHeaders = 9; 479 } 480 481 // K8SResourcePolicy refers to the policy used to check the state of K8s based triggers using labels 482 message K8SResourcePolicy { 483 // Labels required to identify whether a resource is in success state 484 map<string, string> labels = 1; 485 486 // Backoff before checking resource state 487 optional github.com.argoproj.argo_events.pkg.apis.common.Backoff backoff = 2; 488 489 // ErrorOnBackoffTimeout determines whether sensor should transition to error state if the trigger policy is unable to determine 490 // the state of the resource 491 optional bool errorOnBackoffTimeout = 3; 492 } 493 494 // KafkaTrigger refers to the specification of the Kafka trigger. 495 message KafkaTrigger { 496 // URL of the Kafka broker, multiple URLs separated by comma. 497 optional string url = 1; 498 499 // Name of the topic. 500 // More info at https://kafka.apache.org/documentation/#intro_topics 501 optional string topic = 2; 502 503 // +optional 504 // DEPRECATED 505 optional int32 partition = 3; 506 507 // Parameters is the list of parameters that is applied to resolved Kafka trigger object. 508 repeated TriggerParameter parameters = 4; 509 510 // RequiredAcks used in producer to tell the broker how many replica acknowledgements 511 // Defaults to 1 (Only wait for the leader to ack). 512 // +optional. 513 optional int32 requiredAcks = 5; 514 515 // Compress determines whether to compress message or not. 516 // Defaults to false. 517 // If set to true, compresses message using snappy compression. 518 // +optional 519 optional bool compress = 6; 520 521 // FlushFrequency refers to the frequency in milliseconds to flush batches. 522 // Defaults to 500 milliseconds. 523 // +optional 524 optional int32 flushFrequency = 7; 525 526 // TLS configuration for the Kafka producer. 527 // +optional 528 optional github.com.argoproj.argo_events.pkg.apis.common.TLSConfig tls = 8; 529 530 // Payload is the list of key-value extracted from an event payload to construct the request payload. 531 repeated TriggerParameter payload = 9; 532 533 // The partitioning key for the messages put on the Kafka topic. 534 // +optional. 535 optional string partitioningKey = 10; 536 537 // Specify what kafka version is being connected to enables certain features in sarama, defaults to 1.0.0 538 // +optional 539 optional string version = 11; 540 541 // SASL configuration for the kafka client 542 // +optional 543 optional github.com.argoproj.argo_events.pkg.apis.common.SASLConfig sasl = 12; 544 545 // Schema Registry configuration to producer message with avro format 546 // +optional 547 optional github.com.argoproj.argo_events.pkg.apis.common.SchemaRegistryConfig schemaRegistry = 13; 548 } 549 550 message LogTrigger { 551 // Only print messages every interval. Useful to prevent logging too much data for busy events. 552 // +optional 553 optional uint64 intervalSeconds = 1; 554 } 555 556 // NATSTrigger refers to the specification of the NATS trigger. 557 message NATSTrigger { 558 // URL of the NATS cluster. 559 optional string url = 1; 560 561 // Name of the subject to put message on. 562 optional string subject = 2; 563 564 repeated TriggerParameter payload = 3; 565 566 repeated TriggerParameter parameters = 4; 567 568 // TLS configuration for the NATS producer. 569 // +optional 570 optional github.com.argoproj.argo_events.pkg.apis.common.TLSConfig tls = 5; 571 } 572 573 // OpenWhiskTrigger refers to the specification of the OpenWhisk trigger. 574 message OpenWhiskTrigger { 575 // Host URL of the OpenWhisk. 576 optional string host = 1; 577 578 // Version for the API. 579 // Defaults to v1. 580 // +optional 581 optional string version = 2; 582 583 // Namespace for the action. 584 // Defaults to "_". 585 // +optional. 586 optional string namespace = 3; 587 588 // AuthToken for authentication. 589 // +optional 590 optional k8s.io.api.core.v1.SecretKeySelector authToken = 4; 591 592 // Name of the action/function. 593 optional string actionName = 5; 594 595 // Payload is the list of key-value extracted from an event payload to construct the request payload. 596 repeated TriggerParameter payload = 6; 597 598 // Parameters is the list of key-value extracted from event's payload that are applied to 599 // the trigger resource. 600 // +optional 601 repeated TriggerParameter parameters = 7; 602 } 603 604 // PayloadField binds a value at path within the event payload against a name. 605 message PayloadField { 606 // Path is the JSONPath of the event's (JSON decoded) data key 607 // Path is a series of keys separated by a dot. A key may contain wildcard characters '*' and '?'. 608 // To access an array value use the index as the key. The dot and wildcard characters can be escaped with '\\'. 609 // See https://github.com/tidwall/gjson#path-syntax for more information on how to use this. 610 optional string path = 1; 611 612 // Name acts as key that holds the value at the path. 613 optional string name = 2; 614 } 615 616 // PulsarTrigger refers to the specification of the Pulsar trigger. 617 message PulsarTrigger { 618 // Configure the service URL for the Pulsar service. 619 // +required 620 optional string url = 1; 621 622 // Name of the topic. 623 // See https://pulsar.apache.org/docs/en/concepts-messaging/ 624 optional string topic = 2; 625 626 // Parameters is the list of parameters that is applied to resolved Kafka trigger object. 627 repeated TriggerParameter parameters = 3; 628 629 // Payload is the list of key-value extracted from an event payload to construct the request payload. 630 repeated TriggerParameter payload = 4; 631 632 // Trusted TLS certificate secret. 633 // +optional 634 optional k8s.io.api.core.v1.SecretKeySelector tlsTrustCertsSecret = 5; 635 636 // Whether the Pulsar client accept untrusted TLS certificate from broker. 637 // +optional 638 optional bool tlsAllowInsecureConnection = 6; 639 640 // Whether the Pulsar client verify the validity of the host name from broker. 641 // +optional 642 optional bool tlsValidateHostname = 7; 643 644 // TLS configuration for the pulsar client. 645 // +optional 646 optional github.com.argoproj.argo_events.pkg.apis.common.TLSConfig tls = 8; 647 648 // Authentication token for the pulsar client. 649 // Either token or athenz can be set to use auth. 650 // +optional 651 optional k8s.io.api.core.v1.SecretKeySelector authTokenSecret = 9; 652 653 // Backoff holds parameters applied to connection. 654 // +optional 655 optional github.com.argoproj.argo_events.pkg.apis.common.Backoff connectionBackoff = 10; 656 657 // Authentication athenz parameters for the pulsar client. 658 // Refer https://github.com/apache/pulsar-client-go/blob/master/pulsar/auth/athenz.go 659 // Either token or athenz can be set to use auth. 660 // +optional 661 map<string, string> authAthenzParams = 11; 662 663 // Authentication athenz privateKey secret for the pulsar client. 664 // AuthAthenzSecret must be set if AuthAthenzParams is used. 665 // +optional 666 optional k8s.io.api.core.v1.SecretKeySelector authAthenzSecret = 12; 667 } 668 669 message RateLimit { 670 // Defaults to Second 671 optional string unit = 1; 672 673 optional int32 requestsPerUnit = 2; 674 } 675 676 // Sensor is the definition of a sensor resource 677 // +genclient 678 // +genclient:noStatus 679 // +kubebuilder:resource:shortName=sn 680 // +kubebuilder:subresource:status 681 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 682 // +k8s:openapi-gen=true 683 message Sensor { 684 optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; 685 686 optional SensorSpec spec = 2; 687 688 // +optional 689 optional SensorStatus status = 3; 690 } 691 692 // SensorList is the list of Sensor resources 693 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 694 message SensorList { 695 optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; 696 697 repeated Sensor items = 2; 698 } 699 700 // SensorSpec represents desired sensor state 701 message SensorSpec { 702 // Dependencies is a list of the events that this sensor is dependent on. 703 repeated EventDependency dependencies = 1; 704 705 // Triggers is a list of the things that this sensor evokes. These are the outputs from this sensor. 706 repeated Trigger triggers = 2; 707 708 // Template is the pod specification for the sensor 709 // +optional 710 optional Template template = 3; 711 712 // ErrorOnFailedRound if set to true, marks sensor state as `error` if the previous trigger round fails. 713 // Once sensor state is set to `error`, no further triggers will be processed. 714 optional bool errorOnFailedRound = 4; 715 716 // EventBusName references to a EventBus name. By default the value is "default" 717 optional string eventBusName = 5; 718 719 // Replicas is the sensor deployment replicas 720 optional int32 replicas = 6; 721 722 // RevisionHistoryLimit specifies how many old deployment revisions to retain 723 // +optional 724 optional int32 revisionHistoryLimit = 7; 725 726 // LoggingFields add additional key-value pairs when logging happens 727 // +optional 728 map<string, string> loggingFields = 8; 729 } 730 731 // SensorStatus contains information about the status of a sensor. 732 message SensorStatus { 733 optional github.com.argoproj.argo_events.pkg.apis.common.Status status = 1; 734 } 735 736 message SlackSender { 737 // Username is the Slack application's username 738 // +optional 739 optional string username = 1; 740 741 // Icon is the Slack application's icon, e.g. :robot_face: or https://example.com/image.png 742 // +optional 743 optional string icon = 2; 744 } 745 746 message SlackThread { 747 // MessageAggregationKey allows to aggregate the messages to a thread by some key. 748 // +optional 749 optional string messageAggregationKey = 1; 750 751 // BroadcastMessageToChannel allows to also broadcast the message from the thread to the channel 752 // +optional 753 optional bool broadcastMessageToChannel = 2; 754 } 755 756 // SlackTrigger refers to the specification of the slack notification trigger. 757 message SlackTrigger { 758 // Parameters is the list of key-value extracted from event's payload that are applied to 759 // the trigger resource. 760 // +optional 761 repeated TriggerParameter parameters = 1; 762 763 // SlackToken refers to the Kubernetes secret that holds the slack token required to send messages. 764 optional k8s.io.api.core.v1.SecretKeySelector slackToken = 2; 765 766 // Channel refers to which Slack channel to send Slack message. 767 // +optional 768 optional string channel = 3; 769 770 // Message refers to the message to send to the Slack channel. 771 // +optional 772 optional string message = 4; 773 774 // Attachments is a JSON format string that represents an array of Slack attachments according to the attachments API: https://api.slack.com/reference/messaging/attachments . 775 // +optional 776 optional string attachments = 5; 777 778 // Blocks is a JSON format string that represents an array of Slack blocks according to the blocks API: https://api.slack.com/reference/block-kit/blocks . 779 // +optional 780 optional string blocks = 6; 781 782 // Thread refers to additional options for sending messages to a Slack thread. 783 // +optional 784 optional SlackThread thread = 7; 785 786 // Sender refers to additional configuration of the Slack application that sends the message. 787 // +optional 788 optional SlackSender sender = 8; 789 } 790 791 // StandardK8STrigger is the standard Kubernetes resource trigger 792 message StandardK8STrigger { 793 // Source of the K8s resource file(s) 794 optional ArtifactLocation source = 1; 795 796 // Operation refers to the type of operation performed on the k8s resource. 797 // Default value is Create. 798 // +optional 799 optional string operation = 2; 800 801 // Parameters is the list of parameters that is applied to resolved K8s trigger object. 802 repeated TriggerParameter parameters = 3; 803 804 // PatchStrategy controls the K8s object patching strategy when the trigger operation is specified as patch. 805 // possible values: 806 // "application/json-patch+json" 807 // "application/merge-patch+json" 808 // "application/strategic-merge-patch+json" 809 // "application/apply-patch+yaml". 810 // Defaults to "application/merge-patch+json" 811 // +optional 812 optional string patchStrategy = 4; 813 814 // LiveObject specifies whether the resource should be directly fetched from K8s instead 815 // of being marshaled from the resource artifact. If set to true, the resource artifact 816 // must contain the information required to uniquely identify the resource in the cluster, 817 // that is, you must specify "apiVersion", "kind" as well as "name" and "namespace" meta 818 // data. 819 // Only valid for operation type `update` 820 // +optional 821 optional bool liveObject = 5; 822 } 823 824 // StatusPolicy refers to the policy used to check the state of the trigger using response status 825 message StatusPolicy { 826 repeated int32 allow = 1; 827 } 828 829 // Template holds the information of a sensor deployment template 830 message Template { 831 // Metadata sets the pods's metadata, i.e. annotations and labels 832 optional github.com.argoproj.argo_events.pkg.apis.common.Metadata metadata = 1; 833 834 // ServiceAccountName is the name of the ServiceAccount to use to run sensor pod. 835 // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ 836 // +optional 837 optional string serviceAccountName = 2; 838 839 // Container is the main container image to run in the sensor pod 840 // +optional 841 optional k8s.io.api.core.v1.Container container = 3; 842 843 // Volumes is a list of volumes that can be mounted by containers in a workflow. 844 // +patchStrategy=merge 845 // +patchMergeKey=name 846 // +optional 847 repeated k8s.io.api.core.v1.Volume volumes = 4; 848 849 // SecurityContext holds pod-level security attributes and common container settings. 850 // Optional: Defaults to empty. See type description for default values of each field. 851 // +optional 852 optional k8s.io.api.core.v1.PodSecurityContext securityContext = 5; 853 854 // NodeSelector is a selector which must be true for the pod to fit on a node. 855 // Selector which must match a node's labels for the pod to be scheduled on that node. 856 // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ 857 // +optional 858 map<string, string> nodeSelector = 6; 859 860 // If specified, the pod's tolerations. 861 // +optional 862 repeated k8s.io.api.core.v1.Toleration tolerations = 7; 863 864 // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. 865 // If specified, these secrets will be passed to individual puller implementations for them to use. For example, 866 // in the case of docker, only DockerConfig type secrets are honored. 867 // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod 868 // +optional 869 // +patchMergeKey=name 870 // +patchStrategy=merge 871 repeated k8s.io.api.core.v1.LocalObjectReference imagePullSecrets = 8; 872 873 // If specified, indicates the EventSource pod's priority. "system-node-critical" 874 // and "system-cluster-critical" are two special keywords which indicate the 875 // highest priorities with the former being the highest priority. Any other 876 // name must be defined by creating a PriorityClass object with that name. 877 // If not specified, the pod priority will be default or zero if there is no 878 // default. 879 // More info: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ 880 // +optional 881 optional string priorityClassName = 9; 882 883 // The priority value. Various system components use this field to find the 884 // priority of the EventSource pod. When Priority Admission Controller is enabled, 885 // it prevents users from setting this field. The admission controller populates 886 // this field from PriorityClassName. 887 // The higher the value, the higher the priority. 888 // More info: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ 889 // +optional 890 optional int32 priority = 10; 891 892 // If specified, the pod's scheduling constraints 893 // +optional 894 optional k8s.io.api.core.v1.Affinity affinity = 11; 895 } 896 897 // TimeFilter describes a window in time. 898 // It filters out events that occur outside the time limits. 899 // In other words, only events that occur after Start and before Stop 900 // will pass this filter. 901 message TimeFilter { 902 // Start is the beginning of a time window in UTC. 903 // Before this time, events for this dependency are ignored. 904 // Format is hh:mm:ss. 905 optional string start = 1; 906 907 // Stop is the end of a time window in UTC. 908 // After or equal to this time, events for this dependency are ignored and 909 // Format is hh:mm:ss. 910 // If it is smaller than Start, it is treated as next day of Start 911 // (e.g.: 22:00:00-01:00:00 means 22:00:00-25:00:00). 912 optional string stop = 2; 913 } 914 915 // Trigger is an action taken, output produced, an event created, a message sent 916 message Trigger { 917 // Template describes the trigger specification. 918 optional TriggerTemplate template = 1; 919 920 // Parameters is the list of parameters applied to the trigger template definition 921 repeated TriggerParameter parameters = 2; 922 923 // Policy to configure backoff and execution criteria for the trigger 924 // +optional 925 optional TriggerPolicy policy = 3; 926 927 // Retry strategy, defaults to no retry 928 // +optional 929 optional github.com.argoproj.argo_events.pkg.apis.common.Backoff retryStrategy = 4; 930 931 // Rate limit, default unit is Second 932 // +optional 933 optional RateLimit rateLimit = 5; 934 935 // AtLeastOnce determines the trigger execution semantics. 936 // Defaults to false. Trigger execution will use at-most-once semantics. 937 // If set to true, Trigger execution will switch to at-least-once semantics. 938 // +kubebuilder:default=false 939 // +optional 940 optional bool atLeastOnce = 6; 941 } 942 943 // TriggerParameter indicates a passed parameter to a service template 944 message TriggerParameter { 945 // Src contains a source reference to the value of the parameter from a dependency 946 optional TriggerParameterSource src = 1; 947 948 // Dest is the JSONPath of a resource key. 949 // A path is a series of keys separated by a dot. The colon character can be escaped with '.' 950 // The -1 key can be used to append a value to an existing array. 951 // See https://github.com/tidwall/sjson#path-syntax for more information about how this is used. 952 optional string dest = 2; 953 954 // Operation is what to do with the existing value at Dest, whether to 955 // 'prepend', 'overwrite', or 'append' it. 956 optional string operation = 3; 957 } 958 959 // TriggerParameterSource defines the source for a parameter from a event event 960 message TriggerParameterSource { 961 // DependencyName refers to the name of the dependency. The event which is stored for this dependency is used as payload 962 // for the parameterization. Make sure to refer to one of the dependencies you have defined under Dependencies list. 963 optional string dependencyName = 1; 964 965 // ContextKey is the JSONPath of the event's (JSON decoded) context key 966 // ContextKey is a series of keys separated by a dot. A key may contain wildcard characters '*' and '?'. 967 // To access an array value use the index as the key. The dot and wildcard characters can be escaped with '\\'. 968 // See https://github.com/tidwall/gjson#path-syntax for more information on how to use this. 969 optional string contextKey = 2; 970 971 // ContextTemplate is a go-template for extracting a string from the event's context. 972 // If a ContextTemplate is provided with a ContextKey, the template will be evaluated first and fallback to the ContextKey. 973 // The templating follows the standard go-template syntax as well as sprig's extra functions. 974 // See https://pkg.go.dev/text/template and https://masterminds.github.io/sprig/ 975 optional string contextTemplate = 3; 976 977 // DataKey is the JSONPath of the event's (JSON decoded) data key 978 // DataKey is a series of keys separated by a dot. A key may contain wildcard characters '*' and '?'. 979 // To access an array value use the index as the key. The dot and wildcard characters can be escaped with '\\'. 980 // See https://github.com/tidwall/gjson#path-syntax for more information on how to use this. 981 optional string dataKey = 4; 982 983 // DataTemplate is a go-template for extracting a string from the event's data. 984 // If a DataTemplate is provided with a DataKey, the template will be evaluated first and fallback to the DataKey. 985 // The templating follows the standard go-template syntax as well as sprig's extra functions. 986 // See https://pkg.go.dev/text/template and https://masterminds.github.io/sprig/ 987 optional string dataTemplate = 5; 988 989 // Value is the default literal value to use for this parameter source 990 // This is only used if the DataKey is invalid. 991 // If the DataKey is invalid and this is not defined, this param source will produce an error. 992 optional string value = 6; 993 994 // UseRawData indicates if the value in an event at data key should be used without converting to string. 995 // When true, a number, boolean, json or string parameter may be extracted. When the field is unspecified, or explicitly 996 // false, the behavior is to turn the extracted field into a string. (e.g. when set to true, the parameter 997 // 123 will resolve to the numerical type, but when false, or not provided, the string "123" will be resolved) 998 // +optional 999 optional bool useRawData = 7; 1000 } 1001 1002 // TriggerPolicy dictates the policy for the trigger retries 1003 message TriggerPolicy { 1004 // K8SResourcePolicy refers to the policy used to check the state of K8s based triggers using using labels 1005 optional K8SResourcePolicy k8s = 1; 1006 1007 // Status refers to the policy used to check the state of the trigger using response status 1008 optional StatusPolicy status = 2; 1009 } 1010 1011 // TriggerTemplate is the template that describes trigger specification. 1012 message TriggerTemplate { 1013 // Name is a unique name of the action to take. 1014 optional string name = 1; 1015 1016 // Conditions is the conditions to execute the trigger. 1017 // For example: "(dep01 || dep02) && dep04" 1018 // +optional 1019 optional string conditions = 2; 1020 1021 // StandardK8STrigger refers to the trigger designed to create or update a generic Kubernetes resource. 1022 // +optional 1023 optional StandardK8STrigger k8s = 3; 1024 1025 // ArgoWorkflow refers to the trigger that can perform various operations on an Argo workflow. 1026 // +optional 1027 optional ArgoWorkflowTrigger argoWorkflow = 4; 1028 1029 // HTTP refers to the trigger designed to dispatch a HTTP request with on-the-fly constructable payload. 1030 // +optional 1031 optional HTTPTrigger http = 5; 1032 1033 // AWSLambda refers to the trigger designed to invoke AWS Lambda function with with on-the-fly constructable payload. 1034 // +optional 1035 optional AWSLambdaTrigger awsLambda = 6; 1036 1037 // CustomTrigger refers to the trigger designed to connect to a gRPC trigger server and execute a custom trigger. 1038 // +optional 1039 optional CustomTrigger custom = 7; 1040 1041 // Kafka refers to the trigger designed to place messages on Kafka topic. 1042 // +optional. 1043 optional KafkaTrigger kafka = 8; 1044 1045 // NATS refers to the trigger designed to place message on NATS subject. 1046 // +optional. 1047 optional NATSTrigger nats = 9; 1048 1049 // Slack refers to the trigger designed to send slack notification message. 1050 // +optional 1051 optional SlackTrigger slack = 10; 1052 1053 // OpenWhisk refers to the trigger designed to invoke OpenWhisk action. 1054 // +optional 1055 optional OpenWhiskTrigger openWhisk = 11; 1056 1057 // Log refers to the trigger designed to invoke log the event. 1058 // +optional 1059 optional LogTrigger log = 12; 1060 1061 // AzureEventHubs refers to the trigger send an event to an Azure Event Hub. 1062 // +optional 1063 optional AzureEventHubsTrigger azureEventHubs = 13; 1064 1065 // Pulsar refers to the trigger designed to place messages on Pulsar topic. 1066 // +optional 1067 optional PulsarTrigger pulsar = 14; 1068 1069 // Criteria to reset the conditons 1070 // +optional 1071 repeated ConditionsResetCriteria conditionsReset = 15; 1072 1073 // AzureServiceBus refers to the trigger designed to place messages on Azure Service Bus 1074 // +optional 1075 optional AzureServiceBusTrigger azureServiceBus = 16; 1076 1077 // Email refers to the trigger designed to send an email notification 1078 // +optional 1079 optional EmailTrigger email = 17; 1080 } 1081 1082 // URLArtifact contains information about an artifact at an http endpoint. 1083 message URLArtifact { 1084 // Path is the complete URL 1085 optional string path = 1; 1086 1087 // VerifyCert decides whether the connection is secure or not 1088 optional bool verifyCert = 2; 1089 } 1090