Mixer Client
Describes the configuration state for the Mixer client library that’s built into Envoy.
APIKey
APIKey defines the explicit configuration for generating the
request.api_key
attribute from HTTP requests.
See API Keys for a general overview of API keys as defined by OpenAPI.
AttributeMatch
Specifies a match clause to match Istio attributes
HTTPAPISpec
HTTPAPISpec defines the canonical configuration for generating API-related attributes from HTTP requests based on the method and uri templated path matches. It is sufficient for defining the API surface of a service for the purposes of API attribute generation. It is not intended to represent auth, quota, documentation, or other information commonly found in other API specifications, e.g. OpenAPI.
Existing standards that define operations (or methods) in terms of HTTP methods and paths can be normalized to this format for use in Istio. For example, a simple petstore API described by OpenAPIv2 here can be represented with the following HTTPAPISpec.
apiVersion: config.istio.io/v1alpha2
kind: HTTPAPISpec
metadata:
name: petstore
namespace: default
spec:
attributes:
attributes:
api.service:
stringValue: petstore.swagger.io
api.version:
stringValue: 1.0.0
patterns:
- attributes:
attributes:
api.operation:
stringValue: findPets
httpMethod: GET
uriTemplate: /api/pets
- attributes:
attributes:
api.operation:
stringValue: addPet
httpMethod: POST
uriTemplate: /api/pets
- attributes:
attributes:
api.operation:
stringValue: findPetById
httpMethod: GET
uriTemplate: /api/pets/{id}
- attributes:
attributes:
api.operation:
stringValue: deletePet
httpMethod: DELETE
uriTemplate: /api/pets/{id}
apiKeys:
- query: api-key
HTTPAPISpecBinding
HTTPAPISpecBinding defines the binding between HTTPAPISpecs and one or more
IstioService. For example, the following establishes a binding
between the HTTPAPISpec petstore
and service foo
in namespace bar
.
apiVersion: config.istio.io/v1alpha2
kind: HTTPAPISpecBinding
metadata:
name: my-binding
namespace: default
spec:
services:
- name: foo
namespace: bar
apiSpecs:
- name: petstore
namespace: default
HTTPAPISpecPattern
HTTPAPISpecPattern defines a single pattern to match against incoming HTTP requests. The per-pattern list of attributes is generated if both the httpmethod and uritemplate match. In addition, the top-level list of attributes in the HTTPAPISpec is also generated.
pattern:
- attributes
api.operation: doFooBar
httpMethod: GET
uriTemplate: /foo/bar
HTTPAPISpecReference
HTTPAPISpecReference defines a reference to an HTTPAPISpec. This is
typically used for establishing bindings between an HTTPAPISpec and an
IstioService. For example, the following defines an
HTTPAPISpecReference for service foo
in namespace bar
.
- name: foo
namespace: bar
HttpClientConfig
Defines the client config for HTTP.
IstioService
IstioService identifies a service and optionally service version. The FQDN of the service is composed from the name, namespace, and implementation-specific domain suffix (e.g. on Kubernetes, “reviews” + “default” + “svc.cluster.local” -> “reviews.default.svc.cluster.local”).
NetworkFailPolicy
Specifies the behavior when the client is unable to connect to Mixer.
NetworkFailPolicy.FailPolicy
Describes the policy.
Name | Description |
---|---|
FAIL_OPEN | If network connection fails, request is allowed and delivered to the service. |
FAIL_CLOSE | If network connection fails, request is rejected. |
Quota
Specifies a quota to use with quota name and amount.
QuotaRule
Specifies a rule with list of matches and list of quotas. If any clause matched, the list of quotas will be used.
QuotaSpec
Determines the quotas used for individual requests.
QuotaSpecBinding
QuotaSpecBinding defines the binding between QuotaSpecs and one or more IstioService.
QuotaSpecBinding.QuotaSpecReference
QuotaSpecReference uniquely identifies the QuotaSpec used in the Binding.
ServiceConfig
Defines the per-service client configuration.
StringMatch
Describes how to match a given string in HTTP headers. Match is case-sensitive.
TcpClientConfig
Defines the client config for TCP.
TransportConfig
Defines the transport config on how to call Mixer.
istio.mixer.v1.Attributes
Attributes represents a set of typed name/value pairs. Many of Mixer’s API either consume and/or return attributes.
Istio uses attributes to control the runtime behavior of services running in the service mesh. Attributes are named and typed pieces of metadata describing ingress and egress traffic and the environment this traffic occurs in. An Istio attribute carries a specific piece of information such as the error code of an API request, the latency of an API request, or the original IP address of a TCP connection. For example:
request.path: xyz/abc
request.size: 234
request.time: 12:34:56.789 04/17/2017
source.ip: 192.168.0.1
target.service: example
A given Istio deployment has a fixed vocabulary of attributes that it understands. The specific vocabulary is determined by the set of attribute producers being used in the deployment. The primary attribute producer in Istio is Envoy, although specialized Mixer adapters and services can also generate attributes.
The common baseline set of attributes available in most Istio deployments is defined here.
Attributes are strongly typed. The supported attribute types are defined by ValueType. Each type of value is encoded into one of the so-called transport types present in this message.
Defines a map of attributes in uncompressed format. Following places may use this message: 1) Configure Istio/Proxy with static per-proxy attributes, such as source.uid. 2) Service IDL definition to extract api attributes for active requests. 3) Forward attributes from client proxy to server proxy for HTTP requests.