github.com/argoproj/argo-events@v1.9.1/pkg/apis/eventbus/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.eventbus.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/api/resource/generated.proto";
    26  import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
    27  import "k8s.io/apimachinery/pkg/runtime/generated.proto";
    28  import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
    29  
    30  // Package-wide variables from generator "generated".
    31  option go_package = "v1alpha1";
    32  
    33  // BusConfig has the finalized configuration for EventBus
    34  message BusConfig {
    35    // +optional
    36    optional NATSConfig nats = 1;
    37  
    38    // +optional
    39    optional JetStreamConfig jetstream = 2;
    40  
    41    // +optional
    42    optional KafkaBus kafka = 3;
    43  }
    44  
    45  // ContainerTemplate defines customized spec for a container
    46  message ContainerTemplate {
    47    optional k8s.io.api.core.v1.ResourceRequirements resources = 1;
    48  
    49    optional string imagePullPolicy = 2;
    50  
    51    optional k8s.io.api.core.v1.SecurityContext securityContext = 3;
    52  }
    53  
    54  // EventBus is the definition of a eventbus resource
    55  // +genclient
    56  // +kubebuilder:resource:singular=eventbus,shortName=eb
    57  // +kubebuilder:subresource:status
    58  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
    59  // +k8s:openapi-gen=true
    60  message EventBus {
    61    optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
    62  
    63    optional EventBusSpec spec = 2;
    64  
    65    // +optional
    66    optional EventBusStatus status = 3;
    67  }
    68  
    69  // EventBusList is the list of eventbus resources
    70  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
    71  message EventBusList {
    72    optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
    73  
    74    repeated EventBus items = 2;
    75  }
    76  
    77  // EventBusSpec refers to specification of eventbus resource
    78  message EventBusSpec {
    79    // NATS eventbus
    80    // +optional
    81    optional NATSBus nats = 1;
    82  
    83    // +optional
    84    optional JetStreamBus jetstream = 2;
    85  
    86    // +optional
    87    // Kafka eventbus
    88    optional KafkaBus kafka = 3;
    89  
    90    // Exotic JetStream
    91    // +optional
    92    optional JetStreamConfig jetstreamExotic = 4;
    93  }
    94  
    95  // EventBusStatus holds the status of the eventbus resource
    96  message EventBusStatus {
    97    optional github.com.argoproj.argo_events.pkg.apis.common.Status status = 1;
    98  
    99    // Config holds the fininalized configuration of EventBus
   100    optional BusConfig config = 2;
   101  }
   102  
   103  // JetStreamBus holds the JetStream EventBus information
   104  message JetStreamBus {
   105    // JetStream version, such as "2.7.3"
   106    optional string version = 1;
   107  
   108    // JetStream StatefulSet size
   109    // +kubebuilder:default=3
   110    optional int32 replicas = 2;
   111  
   112    // ContainerTemplate contains customized spec for Nats JetStream container
   113    // +optional
   114    optional ContainerTemplate containerTemplate = 3;
   115  
   116    // ReloaderContainerTemplate contains customized spec for config reloader container
   117    // +optional
   118    optional ContainerTemplate reloaderContainerTemplate = 4;
   119  
   120    // MetricsContainerTemplate contains customized spec for metrics container
   121    // +optional
   122    optional ContainerTemplate metricsContainerTemplate = 5;
   123  
   124    // +optional
   125    optional PersistenceStrategy persistence = 6;
   126  
   127    // Metadata sets the pods's metadata, i.e. annotations and labels
   128    optional github.com.argoproj.argo_events.pkg.apis.common.Metadata metadata = 7;
   129  
   130    // NodeSelector is a selector which must be true for the pod to fit on a node.
   131    // Selector which must match a node's labels for the pod to be scheduled on that node.
   132    // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
   133    // +optional
   134    map<string, string> nodeSelector = 8;
   135  
   136    // If specified, the pod's tolerations.
   137    // +optional
   138    repeated k8s.io.api.core.v1.Toleration tolerations = 9;
   139  
   140    // SecurityContext holds pod-level security attributes and common container settings.
   141    // Optional: Defaults to empty.  See type description for default values of each field.
   142    // +optional
   143    optional k8s.io.api.core.v1.PodSecurityContext securityContext = 10;
   144  
   145    // 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.
   146    // If specified, these secrets will be passed to individual puller implementations for them to use. For example,
   147    // in the case of docker, only DockerConfig type secrets are honored.
   148    // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
   149    // +optional
   150    // +patchMergeKey=name
   151    // +patchStrategy=merge
   152    repeated k8s.io.api.core.v1.LocalObjectReference imagePullSecrets = 11;
   153  
   154    // If specified, indicates the Redis pod's priority. "system-node-critical"
   155    // and "system-cluster-critical" are two special keywords which indicate the
   156    // highest priorities with the former being the highest priority. Any other
   157    // name must be defined by creating a PriorityClass object with that name.
   158    // If not specified, the pod priority will be default or zero if there is no
   159    // default.
   160    // More info: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
   161    // +optional
   162    optional string priorityClassName = 12;
   163  
   164    // The priority value. Various system components use this field to find the
   165    // priority of the Redis pod. When Priority Admission Controller is enabled,
   166    // it prevents users from setting this field. The admission controller populates
   167    // this field from PriorityClassName.
   168    // The higher the value, the higher the priority.
   169    // More info: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
   170    // +optional
   171    optional int32 priority = 13;
   172  
   173    // The pod's scheduling constraints
   174    // More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
   175    // +optional
   176    optional k8s.io.api.core.v1.Affinity affinity = 14;
   177  
   178    // ServiceAccountName to apply to the StatefulSet
   179    // +optional
   180    optional string serviceAccountName = 15;
   181  
   182    // JetStream configuration, if not specified, global settings in controller-config will be used.
   183    // See https://docs.nats.io/running-a-nats-service/configuration#jetstream.
   184    // Only configure "max_memory_store" or "max_file_store", do not set "store_dir" as it has been hardcoded.
   185    // +optional
   186    optional string settings = 16;
   187  
   188    // Optional arguments to start nats-server. For example, "-D" to enable debugging output, "-DV" to enable debugging and tracing.
   189    // Check https://docs.nats.io/ for all the available arguments.
   190    // +optional
   191    repeated string startArgs = 17;
   192  
   193    // Optional configuration for the streams to be created in this JetStream service, if specified, it will be merged with the default configuration in controller-config.
   194    // It accepts a YAML format configuration, available fields include, "maxBytes", "maxMsgs", "maxAge" (e.g. 72h), "replicas" (1, 3, 5), "duplicates" (e.g. 5m).
   195    // +optional
   196    optional string streamConfig = 18;
   197  
   198    // Maximum number of bytes in a message payload, 0 means unlimited. Defaults to 1MB
   199    // +optional
   200    optional string maxPayload = 19;
   201  }
   202  
   203  message JetStreamConfig {
   204    // JetStream (Nats) URL
   205    optional string url = 1;
   206  
   207    // Secret for auth
   208    // +optional
   209    optional k8s.io.api.core.v1.SecretKeySelector accessSecret = 2;
   210  
   211    // +optional
   212    optional string streamConfig = 3;
   213  }
   214  
   215  // KafkaBus holds the KafkaBus EventBus information
   216  message KafkaBus {
   217    // URL to kafka cluster, multiple URLs separated by comma
   218    optional string url = 1;
   219  
   220    // Topic name, defaults to {namespace_name}-{eventbus_name}
   221    // +optional
   222    optional string topic = 2;
   223  
   224    // Kafka version, sarama defaults to the oldest supported stable version
   225    // +optional
   226    optional string version = 3;
   227  
   228    // TLS configuration for the kafka client.
   229    // +optional
   230    optional github.com.argoproj.argo_events.pkg.apis.common.TLSConfig tls = 4;
   231  
   232    // SASL configuration for the kafka client
   233    // +optional
   234    optional github.com.argoproj.argo_events.pkg.apis.common.SASLConfig sasl = 5;
   235  
   236    // Consumer group for kafka client
   237    // +optional
   238    optional KafkaConsumerGroup consumerGroup = 6;
   239  }
   240  
   241  message KafkaConsumerGroup {
   242    // Consumer group name, defaults to {namespace_name}-{sensor_name}
   243    // +optional
   244    optional string groupName = 1;
   245  
   246    // Rebalance strategy can be one of: sticky, roundrobin, range. Range is the default.
   247    // +optional
   248    optional string rebalanceStrategy = 2;
   249  
   250    // When starting up a new group do we want to start from the oldest event (true) or the newest event (false), defaults to false
   251    // +optional
   252    optional bool startOldest = 3;
   253  }
   254  
   255  // NATSBus holds the NATS eventbus information
   256  message NATSBus {
   257    // Native means to bring up a native NATS service
   258    optional NativeStrategy native = 1;
   259  
   260    // Exotic holds an exotic NATS config
   261    optional NATSConfig exotic = 2;
   262  }
   263  
   264  // NATSConfig holds the config of NATS
   265  message NATSConfig {
   266    // NATS streaming url
   267    optional string url = 1;
   268  
   269    // Cluster ID for nats streaming
   270    optional string clusterID = 2;
   271  
   272    // Auth strategy, default to AuthStrategyNone
   273    // +optional
   274    optional string auth = 3;
   275  
   276    // Secret for auth
   277    // +optional
   278    optional k8s.io.api.core.v1.SecretKeySelector accessSecret = 4;
   279  }
   280  
   281  // NativeStrategy indicates to install a native NATS service
   282  message NativeStrategy {
   283    // Size is the NATS StatefulSet size
   284    optional int32 replicas = 1;
   285  
   286    optional string auth = 2;
   287  
   288    // +optional
   289    optional PersistenceStrategy persistence = 3;
   290  
   291    // ContainerTemplate contains customized spec for NATS container
   292    // +optional
   293    optional ContainerTemplate containerTemplate = 4;
   294  
   295    // MetricsContainerTemplate contains customized spec for metrics container
   296    // +optional
   297    optional ContainerTemplate metricsContainerTemplate = 5;
   298  
   299    // NodeSelector is a selector which must be true for the pod to fit on a node.
   300    // Selector which must match a node's labels for the pod to be scheduled on that node.
   301    // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
   302    // +optional
   303    map<string, string> nodeSelector = 6;
   304  
   305    // If specified, the pod's tolerations.
   306    // +optional
   307    repeated k8s.io.api.core.v1.Toleration tolerations = 7;
   308  
   309    // Metadata sets the pods's metadata, i.e. annotations and labels
   310    optional github.com.argoproj.argo_events.pkg.apis.common.Metadata metadata = 8;
   311  
   312    // SecurityContext holds pod-level security attributes and common container settings.
   313    // Optional: Defaults to empty.  See type description for default values of each field.
   314    // +optional
   315    optional k8s.io.api.core.v1.PodSecurityContext securityContext = 9;
   316  
   317    // Max Age of existing messages, i.e. "72h", “4h35m”
   318    // +optional
   319    optional string maxAge = 10;
   320  
   321    // 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.
   322    // If specified, these secrets will be passed to individual puller implementations for them to use. For example,
   323    // in the case of docker, only DockerConfig type secrets are honored.
   324    // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
   325    // +optional
   326    // +patchMergeKey=name
   327    // +patchStrategy=merge
   328    repeated k8s.io.api.core.v1.LocalObjectReference imagePullSecrets = 11;
   329  
   330    // ServiceAccountName to apply to NATS StatefulSet
   331    // +optional
   332    optional string serviceAccountName = 12;
   333  
   334    // If specified, indicates the EventSource pod's priority. "system-node-critical"
   335    // and "system-cluster-critical" are two special keywords which indicate the
   336    // highest priorities with the former being the highest priority. Any other
   337    // name must be defined by creating a PriorityClass object with that name.
   338    // If not specified, the pod priority will be default or zero if there is no
   339    // default.
   340    // More info: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
   341    // +optional
   342    optional string priorityClassName = 13;
   343  
   344    // The priority value. Various system components use this field to find the
   345    // priority of the EventSource pod. When Priority Admission Controller is enabled,
   346    // it prevents users from setting this field. The admission controller populates
   347    // this field from PriorityClassName.
   348    // The higher the value, the higher the priority.
   349    // More info: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
   350    // +optional
   351    optional int32 priority = 14;
   352  
   353    // The pod's scheduling constraints
   354    // More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
   355    // +optional
   356    optional k8s.io.api.core.v1.Affinity affinity = 15;
   357  
   358    // Maximum number of messages per channel, 0 means unlimited. Defaults to 1000000
   359    optional uint64 maxMsgs = 16;
   360  
   361    // Total size of messages per channel, 0 means unlimited. Defaults to 1GB
   362    optional string maxBytes = 17;
   363  
   364    // Maximum number of subscriptions per channel, 0 means unlimited. Defaults to 1000
   365    optional uint64 maxSubs = 18;
   366  
   367    // Maximum number of bytes in a message payload, 0 means unlimited. Defaults to 1MB
   368    optional string maxPayload = 19;
   369  
   370    // Specifies the time in follower state without a leader before attempting an election, i.e. "72h", “4h35m”. Defaults to 2s
   371    optional string raftHeartbeatTimeout = 20;
   372  
   373    // Specifies the time in candidate state without a leader before attempting an election, i.e. "72h", “4h35m”. Defaults to 2s
   374    optional string raftElectionTimeout = 21;
   375  
   376    // Specifies how long a leader waits without being able to contact a quorum of nodes before stepping down as leader, i.e. "72h", “4h35m”. Defaults to 1s
   377    optional string raftLeaseTimeout = 22;
   378  
   379    // Specifies the time without an Apply() operation before sending an heartbeat to ensure timely commit, i.e. "72h", “4h35m”. Defaults to 100ms
   380    optional string raftCommitTimeout = 23;
   381  }
   382  
   383  // PersistenceStrategy defines the strategy of persistence
   384  message PersistenceStrategy {
   385    // Name of the StorageClass required by the claim.
   386    // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
   387    // +optional
   388    optional string storageClassName = 1;
   389  
   390    // Available access modes such as ReadWriteOnce, ReadWriteMany
   391    // https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes
   392    // +optional
   393    optional string accessMode = 2;
   394  
   395    // Volume size, e.g. 10Gi
   396    optional k8s.io.apimachinery.pkg.api.resource.Quantity volumeSize = 3;
   397  }
   398