API Reference¶
Packages:
streams.network.edgefarm.io/v1alpha1¶
Resource Types:
Network¶
Name | Type | Description | Required |
---|---|---|---|
apiVersion | string | streams.network.edgefarm.io/v1alpha1 | true |
kind | string | Network | true |
metadata | object | Refer to the Kubernetes API documentation for the fields of the `metadata` field. | true |
spec | object |
|
true |
status | object |
|
false |
Network.spec¶
Name | Type | Description | Required |
---|---|---|---|
parameters | object |
|
true |
compositeDeletePolicy | enum |
Enum: Background, Foreground |
false |
compositionRef | object |
|
false |
compositionRevisionRef | object |
|
false |
compositionRevisionSelector | object |
|
false |
compositionSelector | object |
|
false |
compositionUpdatePolicy | enum |
Enum: Automatic, Manual |
false |
publishConnectionDetailsTo | object |
|
false |
resourceRef | object |
|
false |
writeConnectionSecretToRef | object |
|
false |
Network.spec.parameters¶
Name | Type | Description | Required |
---|---|---|---|
consumers | []object |
List of consumers |
false |
nats | object |
NATS config |
false |
resourceConfig | object |
Defines general properties for this resource. |
false |
streams | []object |
List of streams |
false |
subNetworks | []object |
The subnetworks that are part of this network
|
false |
users | []object |
List of users to create |
false |
Network.spec.parameters.consumers[index]¶
Configuration for a consumer
Name | Type | Description | Required |
---|---|---|---|
config | object |
Config is the consumer configuration. |
false |
name | string |
The name of the consumer |
false |
streamRef | string |
The name of the stream the consumer is created for Default: main |
false |
Network.spec.parameters.consumers[index].config¶
Config is the consumer configuration.
Name | Type | Description | Required |
---|---|---|---|
ackPolicy | enum |
AckPolicy describes the requirement of client acknowledgements, either Explicit, None, or All. For more information see https://docs.nats.io/nats-concepts/jetstream/consumers#ackpolicy Enum: Explicit, None, All Default: Explicit |
true |
ackWait | string |
AckWait is the duration that the server will wait for an ack for any individual message once it has been delivered to a consumer. If an ack is not received in time, the message will be redelivered. Format is a string duration, e.g. 1h, 1m, 1s, 1h30m or 2h3m4s. Default: 30s |
true |
deliverPolicy | enum |
DeliverPolicy defines the point in the stream to receive messages from, either All, Last, New, ByStartSequence, ByStartTime, or LastPerSubject. Fore more information see https://docs.nats.io/jetstream/concepts/consumers#deliverpolicy Enum: All, Last, New, ByStartSequence, ByStartTime, LastPerSubject Default: All |
true |
numReplicas | integer |
Replicas sets the number of replicas for the consumer's state. By default, when the value is set to zero, consumers inherit the number of replicas from the stream. Default: 0 |
true |
replayPolicy | enum |
ReplayPolicy is used to define the mode of message replay. If the policy is Instant, the messages will be pushed to the client as fast as possible while adhering to the Ack Policy, Max Ack Pending and the client's ability to consume those messages. If the policy is Original, the messages in the stream will be pushed to the client at the same rate that they were originally received, simulating the original timing of messages. Enum: Instant, Original Default: Instant |
true |
backoff | string |
Backoff is a list of time durations that represent the time to delay based on delivery count. Format of the durations is a string duration, e.g. 1h, 1m, 1s, 1h30m or 2h3m4s where multiple durations are separated by commas. Example: `1s,2s,3s,4s,5s`. |
false |
description | string |
Description is a human readable description of the consumer. This can be particularly useful for ephemeral consumers to indicate their purpose since the durable name cannot be provided. |
false |
filterSubject | string |
FilterSubject defines an overlapping subject with the subjects bound to the stream which will filter the set of messages received by the consumer. |
false |
inactiveThreshold | string |
InactiveThreshold defines the duration that instructs the server to cleanup consumers that are inactive for that long. Format is a string duration, e.g. 1h, 1m, 1s, 1h30m or 2h3m4s. |
false |
maxAckPending | integer |
MaxAckPending sets the number of outstanding acks that are allowed before message delivery is halted. Default: 1000 |
false |
maxDeliver | integer |
MaxDeliver is the maximum number of times a specific message delivery will be attempted. Applies to any message that is re-sent due to ack policy (i.e. due to a negative ack, or no ack sent by the client). Default: -1 |
false |
memStorage | boolean |
MemoryStorage if set, forces the consumer state to be kept in memory rather than inherit the storage type of the stream (file in this case). |
false |
optStartSeq | integer |
OptStartSeq is an optional start sequence number and is used with the DeliverByStartSequence deliver policy. Format: int64 |
false |
optStartTime | string |
OptStartTime is an optional start time and is used with the DeliverByStartTime deliver policy. The time format is RFC 3339, e.g. 2023-01-09T14:48:32Z |
false |
pull | object |
PullConsumer defines the pull-based consumer configuration. |
false |
push | object |
PushConsumer defines the push-based consumer configuration. |
false |
sampleFreq | string |
SampleFrequency sets the percentage of acknowledgements that should be sampled for observability. |
false |
Network.spec.parameters.consumers[index].config.pull¶
PullConsumer defines the pull-based consumer configuration.
Name | Type | Description | Required |
---|---|---|---|
maxBatch | integer |
MaxRequestBatch defines th maximum batch size a single pull request can make. When set with MaxRequestMaxBytes, the batch size will be constrained by whichever limit is hit first. This is a pull consumer specific setting. |
false |
maxBytes | integer |
MaxRequestMaxBytes defines the maximum total bytes that can be requested in a given batch. When set with MaxRequestBatch, the batch size will be constrained by whichever limit is hit first. This is a pull consumer specific setting. |
false |
maxExpires | string |
MaxRequestExpires defines the maximum duration a single pull request will wait for messages to be available to pull. This is a pull consumer specific setting. |
false |
maxWaiting | integer |
MaxWaiting defines the maximum number of waiting pull requests. This is a pull consumer specific setting. Default: 512 |
false |
Network.spec.parameters.consumers[index].config.push¶
PushConsumer defines the push-based consumer configuration.
Name | Type | Description | Required |
---|---|---|---|
deliverGroup | string |
DeliverGroup defines the queue group name which, if specified, is then used to distribute the messages between the subscribers to the consumer. This is analogous to a queue group in core NATS. See https://docs.nats.io/nats-concepts/core-nats/queue for more information on queue groups. This is a push consumer specific setting. |
false |
deliverSubject | string |
DeliverSubject defines the subject to deliver messages to. Note, setting this field implicitly decides whether the consumer is push or pull-based. With a deliver subject, the server will push messages to client subscribed to this subject. This is a push consumer specific setting. |
false |
flowControl | boolean |
FlowControl enables per-subscription flow control using a sliding-window protocol. This protocol relies on the server and client exchanging messages to regulate when and how many messages are pushed to the client. This one-to-one flow control mechanism works in tandem with the one-to-many flow control imposed by MaxAckPending across all subscriptions bound to a consumer. This is a push consumer specific setting. |
false |
headersOnly | boolean |
HeadersOnly delivers, if set, only the headers of messages in the stream and not the bodies. Additionally adds Nats-Msg-Size header to indicate the size of the removed payload. |
false |
idleHeartbeat | string |
IdleHeartbeat defines, if set, that the server will regularly send a status message to the client (i.e. when the period has elapsed) while there are no new messages to send. This lets the client know that the JetStream service is still up and running, even when there is no activity on the stream. The message status header will have a code of 100. Unlike FlowControl, it will have no reply to address. It may have a description such "Idle Heartbeat". Note that this heartbeat mechanism is all handled transparently by supported clients and does not need to be handled by the application. Format is a string duration, e.g. 1h, 1m, 1s, 1h30m or 2h3m4s. This is a push consumer specific setting. |
false |
rateLimitBps | integer |
RateLimit is used to throttle the delivery of messages to the consumer, in bits per second. Format: int64 |
false |
Network.spec.parameters.nats¶
NATS config
Name | Type | Description | Required |
---|---|---|---|
address | string |
The address of the NATS server
|
true |
operator | string |
The name of the operator the account is created for |
true |
Network.spec.parameters.resourceConfig¶
Defines general properties for this resource.
Name | Type | Description | Required |
---|---|---|---|
accountSecret | string |
Name of secret containing the account information |
false |
kubernetes | object |
Config for provider kubernetes |
false |
natssecrets | object |
Config for provider natssecrets |
false |
userSecret | string |
Name of secret containing the user information |
false |
Network.spec.parameters.resourceConfig.kubernetes¶
Config for provider kubernetes
Name | Type | Description | Required |
---|---|---|---|
providerConfigName | string |
Name of provider config to use for kubernetes |
false |
Network.spec.parameters.resourceConfig.natssecrets¶
Config for provider natssecrets
Name | Type | Description | Required |
---|---|---|---|
providerConfigName | string |
Name of provider config to use for natssecrets |
false |
Network.spec.parameters.streams[index]¶
Configuration for a stream
Name | Type | Description | Required |
---|---|---|---|
config | object |
Config is the stream configuration. |
true |
name | string |
The name of the stream |
false |
reference | string |
When type is mirror, the name of the stream to mirror |
false |
references | []string |
When type is aggregate, the names of the streams to aggregate |
false |
subNetworkRef | string |
The name of the sub network the stream is created for Default: main |
false |
type | enum |
The type of the stream Enum: Standard, Aggregate, Mirror Default: Standard |
false |
Network.spec.parameters.streams[index].config¶
Config is the stream configuration.
Name | Type | Description | Required |
---|---|---|---|
discard | enum |
Discard defines the behavior of discarding messages when any streams' limits have been reached. Old (default): This policy will delete the oldest messages in order to maintain the limit. For example, if MaxAge is set to one minute, the server will automatically delete messages older than one minute with this policy. New: This policy will reject new messages from being appended to the stream if it would exceed one of the limits. An extension to this policy is DiscardNewPerSubject which will apply this policy on a per-subject basis within the stream. Enum: Old, New Default: Old |
true |
maxBytes | integer |
MaxBytes defines how many bytes the Stream may contain. Adheres to Discard Policy, removing oldest or refusing new messages if the Stream exceeds this size. Format: int64 Default: -1 |
true |
maxConsumers | integer |
MaxConsumers defines how many Consumers can be defined for a given Stream. Define -1 for unlimited. Default: -1 |
true |
maxMsgs | integer |
MaxMsgs defines how many messages may be in a Stream. Adheres to Discard Policy, removing oldest or refusing new messages if the Stream exceeds this number of messages. Format: int64 Default: -1 |
true |
retention | enum |
Retention defines the retention policy for the stream. Enum: Limits, Interest, WorkQueue Default: Limits |
true |
storage | enum |
Storage defines the storage type for stream data.. Enum: File, Memory Default: File |
true |
allowDirect | boolean |
AllowDirect is a flag that if true and the stream has more than one replica, each replica will respond to direct get requests for individual messages, not only the leader. |
false |
allowRollup | boolean |
AllowRollup is a flag to allow the use of the Nats-Rollup header to replace all contents of a stream, or subject in a stream, with a single new message. |
false |
denyDelete | boolean |
DenyDelete is a flag to restrict the ability to delete messages from a stream via the API. |
false |
denyPurge | boolean |
DenyPurge is a flag to restrict the ability to purge messages from a stream via the API. |
false |
description | string |
Description is a human readable description of the stream. |
false |
discardNewPerSubject | boolean |
DiscardOldPerSubject will discard old messages per subject. Default: false |
false |
duplicates | string |
Duplicates defines the time window within which to track duplicate messages. Default: 2m0s |
false |
maxAge | string |
MaxAge is the maximum age of a message in the stream. Format is a string duration, e.g. 1h, 1m, 1s, 1h30m or 2h3m4s. Default: 0s |
false |
maxMsgSize | integer |
MaxBytesPerSubject defines the largest message that will be accepted by the Stream. Format: int32 Default: -1 Minimum: -1 |
false |
maxMsgsPerSubject | integer |
MaxMsgsPerSubject defines the limits how many messages in the stream to retain per subject. Format: int64 Default: -1 Minimum: -1 |
false |
mirror | object |
Mirror is the mirror configuration for the stream. |
false |
mirrorDirect | boolean |
MirrorDirect is a flag that if true, and the stream is a mirror, the mirror will participate in a serving direct get requests for individual messages from origin stream. |
false |
noAck | boolean |
NoAck is a flag to disable acknowledging messages that are received by the Stream. Default: false |
false |
placement | object |
Placement is the placement policy for the stream. |
false |
rePublish | object |
Allow republish of the message after being sequenced and stored. |
false |
replicas | integer |
Replicas defines how many replicas to keep for each message in a clustered JetStream. Default: 1 Minimum: 1 Maximum: 5 |
false |
sealed | boolean |
Sealed is a flag to prevent message deletion from the stream via limits or API. |
false |
sources | []object |
Sources is the list of one or more sources configurations for the stream. |
false |
subjects | []string |
Subjects is a list of subjects to consume, supports wildcards. |
false |
template | string |
Template is the owner of the template associated with this stream. |
false |
Network.spec.parameters.streams[index].config.mirror¶
Mirror is the mirror configuration for the stream.
Name | Type | Description | Required |
---|---|---|---|
name | string |
Name of the origin stream to source messages from. |
true |
domain | string |
Domain is the JetStream domain of where the origin stream exists. This is commonly used between a cluster/supercluster and a leaf node/cluster. |
false |
external | object |
External is the external stream configuration. |
false |
filterSubject | string |
FilterSubject is an optional filter subject which will include only messages that match the subject, typically including a wildcard. |
false |
startSeq | integer |
StartSeq is an optional start sequence the of the origin stream to start mirroring from. Format: int64 |
false |
startTime | string |
StartTime is an optional message start time to start mirroring from. Any messages that are equal to or greater than the start time will be included. The time format is RFC 3339, e.g. 2023-01-09T14:48:32Z |
false |
Network.spec.parameters.streams[index].config.mirror.external¶
External is the external stream configuration.
Name | Type | Description | Required |
---|---|---|---|
apiPrefix | string |
APIPrefix is the prefix for the API of the external stream. |
true |
deliverPrefix | string |
DeliverPrefix is the prefix for the deliver subject of the external stream. |
false |
Network.spec.parameters.streams[index].config.placement¶
Placement is the placement policy for the stream.
Name | Type | Description | Required |
---|---|---|---|
cluster | string |
Cluster is the name of the Jetstream cluster. |
true |
tags | []string |
Tags defines a list of server tags. |
false |
Network.spec.parameters.streams[index].config.rePublish¶
Allow republish of the message after being sequenced and stored.
Name | Type | Description | Required |
---|---|---|---|
destination | string |
Destination is the destination subject messages will be re-published to. The source and destination must be a valid subject mapping. For information on subject mapping see https://docs.nats.io/jetstream/concepts/subjects#subject-mapping |
true |
source | string |
Source is an optional subject pattern which is a subset of the subjects bound to the stream. It defaults to all messages in the stream, e.g. >. Default: > |
true |
headersOnly | boolean |
HeadersOnly defines if true, that the message data will not be included in the re-published message, only an additional header Nats-Msg-Size indicating the size of the message in bytes. |
false |
Network.spec.parameters.streams[index].config.sources[index]¶
StreamSource dictates how streams can source from other streams.
Name | Type | Description | Required |
---|---|---|---|
name | string |
Name of the origin stream to source messages from. |
true |
domain | string |
Domain is the JetStream domain of where the origin stream exists. This is commonly used between a cluster/supercluster and a leaf node/cluster. |
false |
external | object |
External is the external stream configuration. |
false |
filterSubject | string |
FilterSubject is an optional filter subject which will include only messages that match the subject, typically including a wildcard. |
false |
startSeq | integer |
StartSeq is an optional start sequence the of the origin stream to start mirroring from. Format: int64 |
false |
startTime | string |
StartTime is an optional message start time to start mirroring from. Any messages that are equal to or greater than the start time will be included. The time format is RFC 3339, e.g. 2023-01-09T14:48:32Z |
false |
Network.spec.parameters.streams[index].config.sources[index].external¶
External is the external stream configuration.
Name | Type | Description | Required |
---|---|---|---|
apiPrefix | string |
APIPrefix is the prefix for the API of the external stream. |
true |
deliverPrefix | string |
DeliverPrefix is the prefix for the deliver subject of the external stream. |
false |
Network.spec.parameters.subNetworks[index]¶
Configuration for the sub network
Name | Type | Description | Required |
---|---|---|---|
limits | object |
Hardware limits for the sub network |
true |
name | string |
The name of the sub network |
true |
nodepoolSelector | object |
NodePoolSelector is a label query over nodepool that should match the replica count. It must match the nodepool's labels. |
false |
tolerations | []object |
Indicates the tolerations the pods under this pool have. A pool's tolerations is not allowed to be updated. |
false |
Network.spec.parameters.subNetworks[index].limits¶
Hardware limits for the sub network
Name | Type | Description | Required |
---|---|---|---|
fileStorage | string |
How much disk space is available for data that is stored on disk Default: 1G |
true |
inMemoryStorage | string |
How much memory is available for data that is stored in memory Default: 1G |
true |
Network.spec.parameters.subNetworks[index].nodepoolSelector¶
NodePoolSelector is a label query over nodepool that should match the replica count. It must match the nodepool's labels.
Name | Type | Description | Required |
---|---|---|---|
matchExpressions | []object |
matchExpressions is a list of label selector requirements. The requirements are ANDed. |
false |
matchLabels | map[string]string |
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. |
false |
Network.spec.parameters.subNetworks[index].nodepoolSelector.matchExpressions[index]¶
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
Name | Type | Description | Required |
---|---|---|---|
key | string |
key is the label key that the selector applies to. |
true |
operator | string |
operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. |
true |
values | []string |
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. |
false |
Network.spec.parameters.subNetworks[index].tolerations[index]¶
The pod this Toleration is attached to tolerates any taint that matches the triple
Name | Type | Description | Required |
---|---|---|---|
effect | string |
Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. |
false |
key | string |
Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. |
false |
operator | string |
Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. |
false |
tolerationSeconds | integer |
TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. Format: int64 |
false |
value | string |
Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. |
false |
Network.spec.parameters.users[index]¶
Name | Type | Description | Required |
---|---|---|---|
limits | object |
The limits for the user |
false |
name | string |
The name of the user |
false |
permissions | object |
The pub/sub permissions for the user |
false |
writeToSecret | object |
The secret to write the user credentials to |
false |
Network.spec.parameters.users[index].limits¶
The limits for the user
Name | Type | Description | Required |
---|---|---|---|
data | integer |
Specifies the maximum number of bytes Format: int64 |
false |
payload | integer |
Specifies the maximum message payload Format: int64 |
false |
subscriptions | integer |
Specifies the maximum number of subscriptions Format: int64 |
false |
Network.spec.parameters.users[index].permissions¶
The pub/sub permissions for the user
Name | Type | Description | Required |
---|---|---|---|
pub | object |
Specifies the publish permissions |
false |
sub | object |
Specifies the subscribe permissions |
false |
Network.spec.parameters.users[index].permissions.pub¶
Specifies the publish permissions
Name | Type | Description | Required |
---|---|---|---|
allow | []string |
Specifies allowed subjects |
false |
deny | []string |
Specifies denied subjects |
false |
Network.spec.parameters.users[index].permissions.sub¶
Specifies the subscribe permissions
Name | Type | Description | Required |
---|---|---|---|
allow | []string |
Specifies allowed subjects |
false |
deny | []string |
Specifies denied subjects |
false |
Network.spec.parameters.users[index].writeToSecret¶
The secret to write the user credentials to
Name | Type | Description | Required |
---|---|---|---|
name | string |
The name of the secret |
true |
Network.spec.compositionRef¶
Name | Type | Description | Required |
---|---|---|---|
name | string |
|
true |
Network.spec.compositionRevisionRef¶
Name | Type | Description | Required |
---|---|---|---|
name | string |
|
true |
Network.spec.compositionRevisionSelector¶
Name | Type | Description | Required |
---|---|---|---|
matchLabels | map[string]string |
|
true |
Network.spec.compositionSelector¶
Name | Type | Description | Required |
---|---|---|---|
matchLabels | map[string]string |
|
true |
Network.spec.publishConnectionDetailsTo¶
Name | Type | Description | Required |
---|---|---|---|
name | string |
|
true |
configRef | object |
Default: map[name:default] |
false |
metadata | object |
|
false |
Network.spec.publishConnectionDetailsTo.configRef¶
Name | Type | Description | Required |
---|---|---|---|
name | string |
|
false |
Network.spec.publishConnectionDetailsTo.metadata¶
Name | Type | Description | Required |
---|---|---|---|
annotations | map[string]string |
|
false |
labels | map[string]string |
|
false |
type | string |
|
false |
Network.spec.resourceRef¶
Name | Type | Description | Required |
---|---|---|---|
apiVersion | string |
|
true |
kind | string |
|
true |
name | string |
|
true |
Network.spec.writeConnectionSecretToRef¶
Name | Type | Description | Required |
---|---|---|---|
name | string |
|
true |
Network.status¶
Name | Type | Description | Required |
---|---|---|---|
account | string |
The UID of the account resource
|
false |
conditions | []object |
Conditions of the resource. |
false |
connectionDetails | object |
|
false |
operator | string |
The operator for the NATS server
|
false |
sysAccount | string |
The sys account name for the NATS server
|
false |
system | string |
The UID of the secret user resource
|
false |
Network.status.conditions[index]¶
Name | Type | Description | Required |
---|---|---|---|
lastTransitionTime | string |
Format: date-time |
true |
reason | string |
|
true |
status | string |
|
true |
type | string |
|
true |
message | string |
|
false |
Network.status.connectionDetails¶
Name | Type | Description | Required |
---|---|---|---|
lastPublishedTime | string |
Format: date-time |
false |