Service v1 (v1.0.36)
proto source
ClusterState
Cluster specific state properties
EndpointState
Endpoint specific state properties
InstanceState
Contains the data of this resource
NodeState
Node specific state properties
State
State collection for provision resources
StateList
StateList is a struct holding items of this resource
| Field | Type | Label | Description |
|---|
| actual | string | | Effective name of the resource provision |
| uid | string | | UID of the resource provision |
StateStatus
DefinitionStatus is the status for this resource
| Field | Type | Label | Description |
|---|
| common | CommonStatus | | Include the common status |
ClusterSettings
Cluster specific settings properties
DependencySettings
Dependency setting properties
DependencySettings.DependenciesEntry
EndpointSettings
Endpoint specific properties
| Field | Type | Label | Description |
|---|
| meta | SettingsMeta | | Include the meta options |
| name | string | | Name of the endpoint |
| network | string | | Specifies how the nodes of this endpoint are consolidated: - loadbalanced: the nodes are exposed through a cluster address so incoming traffic is loadbalanced using the kubernetes networking - direct: each node address is exposed itself so incoming traffic is addressed directly to the node |
| ports | ProtoPort | repeated | Endpoints for this cluster grouped by endpoint group |
NodePresetting
| Field | Type | Label | Description |
|---|
| settings | KeyValue | repeated | Settings for this resource which fullfills the jsonschema of the definitions settings |
| limits | Limits | | Limits for the node |
NodeSettings
Node setting properties
| Field | Type | Label | Description |
|---|
| meta | SettingsMeta | | Include the meta options |
| Field | Type | Label | Description |
|---|
| meta | SettingsMeta | | Include the meta options |
| limits | Limits | | Limits configuration on this resource level |
Settings
The service definition in a specific version
SettingsList
DefinitionList is a struct holding items of this resource
| Field | Type | Label | Description |
|---|
| schema | google.protobuf.Value | | Schema of the settings for this resource level to fullfill (schemaless) |
SettingsSpec
DefinitionSpec contains the spec of this resource
SettingsSpec.DependenciesEntry
SettingsStatus
DefinitionStatus is the status for this resource
| Field | Type | Label | Description |
|---|
| common | CommonStatus | | Include the common status |
SetupPresetting
| Field | Type | Label | Description |
|---|
| initial | NodePresetting | repeated | Initial node setup defaults. Only used on fresh deployment. |
| additional | NodePresetting | | Optionally adjust the node setup defaults for additional nodes. Can be omitted if the nodes definition options already provide the fitting defaults. |
SizingSettings
ClusterDefinition size settings
ClusterProvision
| Field | Type | Label | Description |
|---|
| meta | RuntimeProvisionMeta | | |
| name | string | | Which cluster definition this entry belongs to |
| target | string | | Which target kubernetes this cluster is assigned to. If not set, the same as this Provision. |
| nodes | NodeProvision | repeated | Effective provisioning spec to track the node resources of this cluster. On a fresh Provision creation this can be used to define the initial size by creating the wished amount of empty nodes. If not set, the default size of the cluster in the definition is used. To resize the cluster add empty nodes or remove existing nodes. The min, max and the increment for the sizing must always be honored |
| endpoints | EndpointProvision | repeated | Effective provisioning spec to track the provided endpoints of this cluster. |
DependencyProvision
DependencyProvision.DependenciesEntry
EndpointProvision
| Field | Type | Label | Description |
|---|
| meta | ProvisionMeta | | |
| name | string | | Which endpoint definition this entry belongs to |
| dnsName | string | | Define the hostname if the endpoint has a different actual name due to migrations. If empty, actual is used. |
NodeProvision
| Field | Type | Label | Description |
|---|
| meta | RuntimeProvisionMeta | | |
| dnsName | string | | Define the hostname if the node has a different actual name due to migrations. If empty, actual is used. |
| minion | string | | Force the node to be scheduled on a specific kubernetes minion. Setting this field ignores any automatic scheduling and the node will fail if there is no such minion. |
Provision
The service definition in a specific version
ProvisionList
ProvisionList is a struct holding items of this resource
| Field | Type | Label | Description |
|---|
| actual | string | | The effective resource name. Usually not set on new provisioning so this fields uniqueness can be guaranteed. If not set, a random name based on the definitions name inheritance is assigned |
| labels | ProvisionMeta.LabelsEntry | repeated | Labels for this resource |
| annotations | ProvisionMeta.AnnotationsEntry | repeated | Annotations for this resource |
| flags | KeyValue | repeated | Flags for this resource |
| settings | google.protobuf.Value | | Settings for this resource which fullfills the jsonschema of the definitions settings (schemaless) |
| extensions | ProvisionMeta.ExtensionsEntry | repeated | Extensions for this resource |
ProvisionMeta.AnnotationsEntry
ProvisionMeta.ExtensionsEntry
ProvisionMeta.LabelsEntry
ProvisionSpec
ProvisionSpec contains the spec of this resource
| Field | Type | Label | Description |
|---|
| meta | RuntimeProvisionMeta | | |
| definition | DefinitionReference | | Reference to the service definition to provision from (required) |
| clusters | ClusterProvision | repeated | Effective provisioning spec to track the cluster resources. On a fresh Provision creation this can be used to define the initial amount of clusters by creating the wished amount of empty clusters. If not set, one of each cluster defined in the definition is created. To add a cluster add an empty cluster and to remove a cluster remove an existing cluster. |
| dependencies | ProvisionSpec.DependenciesEntry | repeated | Effective provisioning spec for dependencies. Only used for initial deployment. Updating the provision spec of the dependency can only be done in the resulting dependency provision. |
ProvisionSpec.DependenciesEntry
ProvisionStatus
ProvisionStatus is the status for this resource
| Field | Type | Label | Description |
|---|
| common | CommonStatus | | Include the common status |
| initComplete | bool | | Initialisation complete |
| progress | string | | A simple progress indicator of the current transition. If not empty a transition is ongoing and the value contains an integer from 0 up to 100 with percent sign. Empty means there is no transition or the transition is finished (whether successful or not) and thus the expected result should be checked with the phase field. |
| Field | Type | Label | Description |
|---|
| meta | ProvisionMeta | | Include the meta options |
| limits | Limits | | Limits for the node |
ClusterConfig
Cluster specific config properties
Config
Config collection for provision resources
ConfigExtension
ConfigExtension.OptionsEntry
ConfigExtension.ValuesEntry
ConfigList
ConfigList is a struct holding items of this resource
ConfigMeta.AnnotationsEntry
ConfigMeta.ExtensionsEntry
ConfigMeta.FlagsEntry
ConfigMeta.LabelsEntry
ConfigMeta.SettingsEntry
ConfigRuntimeMeta.LimitsEntry
ConfigStatus
DefinitionStatus is the status for this resource
| Field | Type | Label | Description |
|---|
| common | CommonStatus | | Include the common status |
EndpointConfig
Endpoint specific config properties
| Field | Type | Label | Description |
|---|
| meta | ConfigMeta | | |
| name | string | | Which endpoint definition this entry belongs to |
InstanceConfig
Contains the data of this resource
InstanceConfig.CredentialsEntry
InstanceConfig.DefinitionEntry
NodeConfig
Node specific config properties
Cluster
The service definition in a specific version
ClusterList
ClusterList is a struct holding items of this resource
ClusterSpec
ClusterSpec contains the spec of this resource
| Field | Type | Label | Description |
|---|
| instance | string | | The instance name this cluster belongs to and is inheriting spec from. (required) |
| topologyqueries | TopologyQuery | repeated | TopologyQueries allows to specify queries to get information about its surroundings. Will be written and updated in a configmap which the pods can consume |
| flags | NodeFlag | repeated | A list of flags to be set in the container |
| limits | Limits | | Limits of the resulting container |
| podspec | k8s.io.api.core.v1.PodSpec | | PodSpec to use for this node which must match core/v1.PodSpec. |
ClusterStatus
ClusterStatus is the status for this resource
| Field | Type | Label | Description |
|---|
| common | CommonStatus | | Include the common status |
ClusterStatusWithEndpoints
ClusterStatus is the status for this resource
ClusterStatusWithEndpoints.EndpointsEntry
Endpoint
The service definition in a specific version
EndpointBackend
EndpointBackend info and address
| Field | Type | Label | Description |
|---|
| node | string | | Name of the node |
| ready | bool | | Whether the node is ready and accepting traffic |
| minion | string | | Minion name this node runs on |
EndpointList
EndpointList is a struct holding items of this resource
EndpointSpec
EndpointSpec contains the spec of this resource
| Field | Type | Label | Description |
|---|
| cluster | string | | The cluster name this endpoint belongs to and is inheriting spec from. (required) |
| group | string | | An endpoint must belong to a group, an alias name of the purpose. A service can have or may need multiple endpoints. The meaning of multiple endpoints depends on the service definition or the service protocol. (required) |
| flags | NodeFlag | repeated | A list of flags to be set in the container |
| network | string | | Specifies how the nodes of this endpoint are consolidated: - loadbalanced: the nodes are exposed through a cluster address so incoming traffic is loadbalanced using the kubernetes networking - direct: each node address is exposed itself so incoming traffic is addressed directly to the node |
| filter | KeyValue | repeated | Flag filters for the endpoint which the nodes must meet |
| servicespec | k8s.io.api.core.v1.ServiceSpec | | ServiceSpec to use for this endpoint which must match core/v1.ServiceSpec. |
| dnsEndpoint | string | | Assign the endpoint to this DNSEndpoint. Updates the target IP once available. |
EndpointStatus
EndpointStatus is the status for this resource
| Field | Type | Label | Description |
|---|
| common | CommonStatus | | Include the common status |
| addresses | EndpointAddress | repeated | List of endpoint addresses |
| ports | ProtoPort | repeated | List of endpoint ports |
| backends | EndpointBackend | repeated | List of backend addresses. Only available if network type is loadbalanced. |
EndpointStatusWithVo
EndpointStatus with visual only fields
| Field | Type | Label | Description |
|---|
| status | EndpointStatus | | |
| portsVo | string | | Port list for visual only representation |
| fqdnsVo | string | | FQDN list for visual only representiation |
| ipsVo | string | | IP list for visual only representation |
| backendsVo | string | | Backend list for visual only representation |
ClusterDefinition
ClusterDefinition configuration options
| Field | Type | Label | Description |
|---|
| meta | RuntimeDefinitionMeta | | Include the meta options |
| sizing | ClusterSizing | | Settings for cluster size, resizing and transitions |
| topologyqueries | TopologyQuery | repeated | TopologyQueries allows to specify queries to get information about its surroundings. Will be written and updated in a configmap which the pods can consume |
| provides | EndpointDefinition | repeated | Endpoint configuration to describe the nodes will provide a service through this endpoint |
| consumes | EndpointAssignment | repeated | Endpoints from dependencies to consume |
| nodes | NodeDefinition | | Configuration options available for all nodes |
ClusterSizing
ClusterDefinition size settings
Definition
The service definition in a specific version
DefinitionList
DefinitionList is a struct holding items of this resource
DefinitionMeta.AnnotationsEntry
DefinitionMeta.ExtensionsEntry
DefinitionMeta.LabelsEntry
DefinitionSpec
DefinitionSpec contains the spec of this resource
| Field | Type | Label | Description |
|---|
| meta | RuntimeDefinitionMeta | | Include the meta options |
| version | string | | Version of the service |
| dependencies | DefinitionSpec.DependenciesEntry | repeated | If this service requires another service or an operator, specify which services should be setup as well. The key will be the alias to that dependency |
| clusters | ClusterDefinition | repeated | List of clusters for this service |
| extends | DefinitionReference | repeated | This service inherits and extends the spec from those services |
| includes | DefinitionReference | repeated | This service includes the specs of a onlyincludable services |
| operator | Operator | | This definition is an operator |
| onlyinclude | bool | | This definition is not a valid service, it can only be included and not extended. It is allowed to be incomplete and some validation checks are ignored |
DefinitionSpec.DependenciesEntry
DefinitionStatus
DefinitionStatus is the status for this resource
| Field | Type | Label | Description |
|---|
| common | CommonStatus | | Include the common status |
EndpointAssignment
Endpoint description this cluster consumes
| Field | Type | Label | Description |
|---|
| dependency | string | | The alias of the dependency |
| endpoint | string | | The name of the endpoint as described in the dependency definition |
EndpointDefinition
Endpoint description this cluster provides
| Field | Type | Label | Description |
|---|
| meta | DefinitionMeta | | Include the meta options |
| network | string | | Specifies how the nodes of this endpoint are consolidated: - loadbalanced: the nodes are exposed through a cluster address so incoming traffic is loadbalanced using the kubernetes networking - direct: each node address is exposed itself so incoming traffic is addressed directly to the node |
| exposed | bool | | Setting exposed defines that this endpoint is intended to be consumed from other services within the kubernetes and its address is written to the status of this cluster |
| filter | KeyValue | repeated | Flag filters for the endpoint which the nodes must meet. If network is set to loadbalanced, all nodes matching filter have combined an endpoint. If set to direct, each node matching the filter gets its own endpoint. |
| servicespec | k8s.io.api.core.v1.ServiceSpec | | ServiceSpec allows to specify the template for Services. Some fields will be overridden by properties in this resource. |
NodeDefinition
NodePredefinition
| Field | Type | Label | Description |
|---|
| flags | KeyValue | repeated | Flags for this resource |
| settings | KeyValue | repeated | Settings for this resource which fullfills the jsonschema of the definitions settings |
| limits | Limits | | Limits for the node |
Operator
Mark this service as an operator
| Field | Type | Label | Description |
|---|
| version | string | | Define which event api version this operator supports |
| flags | AssignedFlag | repeated | Flags to add to event api Operations. Used to further divide a group of service to specific operators, e.g. there is a next epoch of configuration. |
| TODO: Onlyonce logic needs to be combined with shared service logic, for now, all operator are only once hardcoded // Whether this operator can exist multiple times bool onlyonce = 3; | | | |
RunDependency
Which dependency is required to run this service, you can define any other service. The service-controller will automatically detect if the service is an operator and operates accordingly.
| Field | Type | Label | Description |
|---|
| dependency | DefinitionReference | | Include the dependency options |
| wait | bool | | Whether this service should wait until this dependency is finished and ready before starting to build this service. If set to false this dependency is built concurrently with this service. |
| settings | SettingOverride | repeated | Set settings for this dependency directly. |
| Field | Type | Label | Description |
|---|
| meta | DefinitionMeta | | Include the meta options |
| limits | Limits | | Limits for the node |
| podspec | k8s.io.api.core.v1.PodSpec | | PodSpec allows to specify the template for Pods. Some fields will be overridden by properties in this resource. |
SettingDefinition
Define which settings this service accepts
| Field | Type | Label | Description |
|---|
| name | string | | The name of this setting (required) |
| required | bool | | Whether this setting is required to be provided. At least one source in from must provide a value. |
| from | string | repeated | A list of sources from where this setting can be set. The order decides what and when a source can overwrite a value. The latter overrides the former only if it returns a non-empty value otherwise the previous value is kept. Types of sources. User: Value may be provided by the user during provision. Env: The environment configmaps may contain a value to be set. Event: Value may be provided by the init operation events. Additional info about sources. Env: Configmaps follow itself an overwrite routine, where the most precise annotated value is returned in the following order: clusterwide provider defaults, servicespecific defaults (via servicename), customerspecific defaults (via namespace), combined service- & customerspecific defaults (via namespace+servicename). UID: During provision the provisions UID is used. |
| schema | google.protobuf.Value | | Provide JSON schema validation for this setting. At least define a type so the validation can at least verify the type of this setting. If default is defined in the schema, that default is used. Obviously only possible if this flag is not required. If it is required, then a source in from must provide a value and the default here has no effect. (schemaless) |
SettingOverride
Override a dependency setting. If a setting of a dependency is not overridden, the setting is taken as-is. These settings can be overridden by a static value, by forwarding a setting value from this current definition.
| Field | Type | Label | Description |
|---|
| name | string | | The name of the dependant setting (required) |
| from | string | | From which type the value is provided. |
| value | google.protobuf.Value | | Set as a static value (schemaless) |
| setting | string | | Forward the value of a setting from this definition |
SetupPredefinition
| Field | Type | Label | Description |
|---|
| initial | NodePredefinition | repeated | Initial node setup defaults. Only used on fresh deployment. |
| additional | NodePredefinition | | Optionally adjust the node setup defaults for additional nodes. Can be omitted if the nodes definition options already provide the fitting defaults. |
SpecificSizingDefinition
| Field | Type | Label | Description |
|---|
| initial | NodeDefinition | repeated | Initial node setup options. Only used on fresh deployment. |
| additional | NodeDefinition | | Node setup options when creating additional nodes. |
Environment
The environment definition for any arbitrary data
EnvironmentList
DefinitionList is a struct holding items of this resource
Instance
The service definition in a specific version
InstanceList
InstanceList is a struct holding items of this resource
InstanceSpec
InstanceSpec contains the spec of this resource
| Field | Type | Label | Description |
|---|
| dependencies | InstanceSpec.DependenciesEntry | repeated | Dependencies of the current instance. Maps alias to dependency instance name. Defining a dependency allows clusters of this instance to consume their endpoints. |
| flags | NodeFlag | repeated | A list of flags to be set in the container |
| credentials | InstanceSpec.CredentialsEntry | repeated | Credentials map consisting of secret identificator to effective secret resource name |
InstanceSpec.CredentialsEntry
InstanceSpec.DependenciesEntry
InstanceStatus
InstanceStatus is the status for this resource
| Field | Type | Label | Description |
|---|
| common | CommonStatus | | Include the common status |
AssignedFlag
An AssignedFlag is annotated to a resource within the hierarchy and is propagated to its children. Flags are propagated to the container and make resources searchable by the topology lookup. A resource inherits all flags from the parent, but a same flag set in the resource always overrides the flag inherited
| Field | Type | Label | Description |
|---|
| flag | Flag | | Include the flag options |
| to | string | | A setting can be written to a label where it is searchable by the topology lookup (but charset and length limited) or to an annotation where these limitations dont apply (but not searchable) |
CommonStatus
Status fields all resource status
| Field | Type | Label | Description |
|---|
| phase | string | | Phase to describe the overall current status |
| reason | string | | A brief human-readable message indicating details about why this resource is in this state. |
DefinitionReference
Reference to a definition
| Field | Type | Label | Description |
|---|
| vendor | string | | Vendor of the referenced definition. If ommited same vendor as this definition |
| name | string | | Name of the referenced definition within the vendor |
| version | string | | Version of the referenced definition. If omitted latest found version |
EndpointAddress
EndpointAddress contain the addresses to a network node
| Field | Type | Label | Description |
|---|
| ip | string | | The primary IP (the first returned address from the underlying resource, which can depend on the configuration order). Holds only one address if both v4 and v6 are configured. |
| fqdn | string | | The FQDN of this endpoint address |
EndpointsGrouped
List of the endpoint addresses with their ports
ExtensionEntry
Extend additional data which is not handled by AEP except the merging default behaviour
ExtensionEntry.OptionsEntry
Flag
A Flag can be set from a static value or can lookup the value used in the setting
| Field | Type | Label | Description |
|---|
| key | string | | The key name of this flag (required) |
| from | string | | From which type the value is provided. With value the contents from property value is used. With setting the setting name from property setting is looked up. With environment the environment is inherited in the following order: clusterwide provider defaults, servicespecific defaults (via servicename), customerspecific defaults (via namespace), combined service- & customerspecific defaults (via namespace+servicename). In case of event the operator must have provided the value. |
| value | google.protobuf.Value | | Set this static value if value is requested from (schemaless) |
| setting | string | | Override the setting name to lookup instead of the key name |
| env | string | | Override the env name to lookup instead of the key name |
| event | string | | Override the event name to lookup instead of the key name |
KeyValue
Simple key value property
Limits
Limits of the resulting container
NodeFlag
Flags to be assigned to the node
| Field | Type | Label | Description |
|---|
| kv | KeyValue | | Include key value |
| to | string | | Whether the flag is written to a label where it is searchable by the topology lookup (but charset and length limited) or to an annotation where these limitations dont apply (but not searchable) (required) |
OwnedValue
Value property with owner annotation
| Field | Type | Label | Description |
|---|
| value | google.protobuf.Value | | The value in any type (required) (schemaless) |
| owner | string | | Owner of this config key. If a component is not the owner of this config it must keep it as-is. (required) |
| reason | google.protobuf.Value | | Additional info to reason why this config was set or changed by the owner. The owner can decide any type and structure of the data. (schemaless) |
ProtoPort
Protocol and port address info
| Field | Type | Label | Description |
|---|
| name | string | | Name of the port |
| protocol | string | | Protocol (required) (enum: TCP;UDP) |
| port | int32 | | Port (required) |
SizingRange
Cluster sizing properties
| Field | Type | Label | Description |
|---|
| initial | uint32 | | Initial cluster size if not specified exactly in the provision |
| increment | uint32 | | Cluster size changes only in this increment, also used as decrement. If set to 0, no resizing can be done. |
| minimum | uint32 | | Minimum cluster size |
| maximum | uint32 | | Maximum cluster size |
TopologyQuery
TopologyQuery describe a query to look for cluster members.
Possible types example for '/etc/facter/facts.d/aep-topology.yaml'
dns: (format: dict) # authoritative DNS servers (BIND slaves)
FQDN: IP # v1_use_host_ip=true ? host_ip : main_ip
FQDN: IP
...
monitoring: FQDN (format: fqdn)
foreman: FQDN # for puppetmaster
openstack_present: BOOL (format: bool) # e.g. Keystone host present/defined
cloudera_manager: FQDN
services: (groupby: role) # by clusterid
ROLE: (format: array)
fqdn: [ FQDN, ... ]
ip: [ IP, ... ]
ROLE:
fqdn: [ FQDN, ... ]
ip: [ IP, ... ]
...
single_service: (format: entry)
fqdn: FQDN
ip: IP
- initial lookup:
- one dataset is either complete or missing
- complete means:
- all matching pods are running
- dns fqdn for these pods exists and pointing to that pod
- lifecycle changes: one dataset changes if the affected change is complete
- container error: old state stays
- reducing: state is complete when deletion is registered. cleanup process is irrelevant
- growing: state is complete when creation is completely finished.
If two transitions happen in the same time, the state is complete when both transitions are completele In other
words, return the new state when the desired state is completely applied, otherwise keep the old For the formats
fqdn, bool and entry is expected that only one result can exist, otherwise return error
| Field | Type | Label | Description |
|---|
| name | string | | Key name of this query, will also be the key of the dataset in the result (required) |
| flags | KeyValue | repeated | Flags to which the query have to match (AND chained) |
| format | string | | Format specifies the format the result is outputted |
| groupby | string | repeated | GroupBy specifies to group by these flag keys in specified order |
| scope | string | | Scope allows to define within which scope this query applies. Cluster limits the query within the nodes in this exact cluster. Instance limits the query within the nodes for all clusters in this exact instance. Global has no limits and is only allowed for operators. If empty, cluster scope is applied. |
Node
The service definition in a specific version
NodeList
NodeList is a struct holding items of this resource
NodeSpec
NodeSpec contains the spec of this resource
| Field | Type | Label | Description |
|---|
| cluster | string | | The cluster name this node belongs to and is inheriting spec from. (required) |
| flags | NodeFlag | repeated | A list of flags to be set in the container |
| limits | Limits | | Limits of the resulting container |
| podspec | k8s.io.api.core.v1.PodSpec | | PodSpec to use for this node which must match core/v1.PodSpec. |
| dnsEndpoint | string | | Assign the node to this DNSEndpoint. Updates the target IP once available. (required) |
| minion | string | | Force the node to be scheduled on a specific kubernetes minion. Setting this field ignores any automatic scheduling and the node will fail if there is no such minion. |
NodeStatus
NodeStatus is the status for this resource
| Field | Type | Label | Description |
|---|
| common | CommonStatus | | Include the common status |
| podPhase | string | | The pod phase as status |
| ready | bool | | Whether the pod is ready for incoming traffic. The readiness probe, if defined in the pod, has succeeded. |
| minion | string | | Which minion the node is running on |
| address | EndpointAddress | | Include the endpoint address |
| ports | ProtoPort | repeated | List of ports exposed from the container |
Scalar Value Types
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
|---|
| double | | double | double | float | float64 | double | float | Float |
| float | | float | float | float | float32 | float | float | Float |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |