Skip to content

Commit 652813e

Browse files
author
Martin Taillefer
committed
Still more work on the mixer config.
1 parent 10646e9 commit 652813e

File tree

1 file changed

+26
-29
lines changed

1 file changed

+26
-29
lines changed

docs/concepts/mixer-config.md

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ adapters:
9090
refresh_interval: 60s
9191
```
9292
93-
The `name` field gives a name to the chunk of adapter configuration so it can be referenced from elsewhere. The
93+
The `name` field gives a name to the block of adapter configuration so it can be referenced from elsewhere. The
9494
`kind` field indicates the [aspect kind](#aspects) that this configuration applies to.
9595
The `impl` field gives the name of the adapter being configured. Finally, the `params` section is where the
9696
actual adapter-specific configuration parameters are specified. In this case, this is configuring the URL the
9797
adapter should use in its queries and defines the interval at which it should refresh its local caches.
9898

99-
For each available adapter, you can define any number of blocks of independent configuration state. This allows the same adapter
99+
For each available adapter implementation, you can define any number of blocks of independent configuration state. This allows the same adapter
100100
to be used multiple times within a single deployment. Depending on the situation, such as which microservice is involved, one
101101
block of configuration will be used versus another. For example, here are two more blocks of configuration that can coexist
102102
with the previous one:
@@ -200,15 +200,14 @@ aspects:
200200
source: source.name
201201
target: target.name
202202
service: api.name
203-
method: api.method
204203
response_code: response.code
205204
```
206205

207206
This defines an aspect that produces metrics which are sent to the myMetricsCollector adapter,
208207
which was defined previously. The `metrics` stanza defines the set of metrics that are
209208
generated during request processing for this aspect. The `descriptor_name` field specifies
210-
the name of a *descriptor* which is a separate chunk of configuration, described [below](#descriptors) which declares
211-
the kind of metric this is. The `value` field and he five label fields describe which attributes to use
209+
the name of a *descriptor* which is a separate block of configuration, described [below](#descriptors), which declares
210+
the kind of metric this is. The `value` field and the four label fields describe which attributes to use
212211
at request time in order to produce the metric.
213212

214213
Each aspect kind defines its own particular format of configuration data. The exhaustive set of
@@ -226,7 +225,6 @@ We've already seen a few simple attribute expressions in the previous examples.
226225
source: source.name
227226
target: target.name
228227
service: api.name
229-
method: api.method
230228
response_code: response.code
231229
```
232230

@@ -236,24 +234,24 @@ of the `source.name` attribute.
236234

237235
The attributes that can be used in attribute expressions must be defined in an
238236
[*attribute manifest*](#manifests) for the deployment. Within the manifest, each attribute has
239-
a type which represents the kind of data that this attribute carries. In the
237+
a type which represents the kind of data that the attribute carries. In the
240238
same way, attribute expressions are also typed, and their type is derived from
241239
the attributes in the expression and the operators applied to these attributes.
242240

243241
The type of an attribute expression is used to ensure consistency in which attributes
244242
are used in what situation. For example, if a metric descriptor specifies that
245243
a particular label is of type INT64, then only attribute expressions that produce a
246-
64-bit integers can be used to fill-in that label. This is the case for the `response_code`
244+
64-bit integer can be used to fill-in that label. This is the case for the `response_code`
247245
label above.
248246

249247
Attribute expressions include the following features:
250248

251-
1. Check variables for equality against constants
252-
2. Check string variables for wildcard matches
249+
1. Check attributes for equality against constants
250+
2. Check string attributes for wildcard matches
253251
3. Logical AND/OR/NOT operators
254252
4. Grouping semantics
255253
5. String Concatenation
256-
6. Substring
254+
6. Substring Production
257255
7. Comparison (<, <=, ==, >=, >)
258256

259257
Refer to *TBD* for the full attribute expression syntax.
@@ -280,7 +278,6 @@ aspects:
280278
source: source.name
281279
target: target.name
282280
service: api.name
283-
method: api.method
284281
response_code: response.code
285282
```
286283

@@ -340,7 +337,7 @@ by Mixer. For example, a metric descriptor provides all the information needed t
340337
that conform to the descriptor's shape (it's value type and its set of labels).
341338

342339
- It enables type checking of the deployment's configuration. Since attributes have strong types, and so do descriptors,
343-
Istio can provide a number of strong correctness guarantees of the system's configuration. Basically, if a chunk of
340+
Istio can provide a number of strong correctness guarantees of the system's configuration. Basically, if a block of
344341
configuration is accepted into the Istio system, it means the configuration passes a minimum correctness bar. Again, this
345342
plays the same role as types in a programming language.
346343

@@ -352,45 +349,45 @@ The different descriptor types are detailed in *TBD*
352349

353350
An Istio deployment can be responsible for managing a large number of services. Organizations
354351
often have dozens or hundreds of interacting services, and Istio's mission is to make it easy to
355-
manage them all. Mixer's configuration model is designed to support different operators to
356-
manage different parts of an Istio deployment without stepping on each other's feet, and allowing
352+
manage them all. Mixer's configuration model is designed to support different operators that
353+
manage different parts of an Istio deployment without stepping on each other's feet, while allowing
357354
them to have control over their areas, but not other's.
358355

359356
Here's how this all works:
360357

361-
- The various chunks of configuration described in the previous sections (adapters, aspects, and descriptors) are always declared
358+
- The various blocks of configuration described in the previous sections (adapters, aspects, and descriptors) are always defined
362359
within the context of a hierarchy.
363360

364361
- The hierarchy is represented by DNS-style dotted names. Like DNS, the hierarchy starts with the rightmost element in
365362
the dotted name.
366363

367-
- Each chunk of configuration is associated with a *scope* and a *subject* which are both dotted names
364+
- Each block of configuration is associated with a *scope* and a *subject* which are both dotted names
368365
representing locations within the hierarchy:
369366

370-
- A scope represents the authority that created the chunk of configuration. Authorities
371-
higher up in the hierarchy are more powerful than those lower in the tree.
367+
- A scope represents the authority that created the block of configuration. Authorities
368+
higher up in the hierarchy are more powerful than those lower in it.
372369

373-
- The subject represents the location of the chunk of state within the hierarchy. The subject
370+
- The subject represents the location of the block of state within the hierarchy. The subject
374371
is necessarily always at or below the level of the scope within the hierarchy.
375372

376-
- If multiple chunks of config have the same subject, within the matching set, chunks which are associated with a higher
377-
scope higher in the hierarchy always take precedence.
373+
- If multiple blocks of config have the same subject, the blocks associated with the highest scope
374+
in the hierarchy always take precedence.
378375

379376
The individual elements that make up the hierarchy depend on the specifics of the Istio deployment.
380377
A Kubernetes deployment likely uses Kubernetes namespaces as the hierarchy against which Istio configuration
381378
state is deployed. For example, a valid scope might be `svc.cluster.local` while a subject might be
382379
`myservice.ns.svc.cluster.local`
383380

384381
The scoping model is designed to pair up with an access control model to constrain which human is allowed to
385-
create chunks of configuration for particular scopes. Operators which have the authority to create
386-
chunks at a scope higher in the hierarchy can impact all configuration associated with lower scopes. Although this is the design
382+
create blocks of configuration for particular scopes. Operators which have the authority to create
383+
blocks at a scope higher in the hierarchy can impact all configuration associated with lower scopes. Although this is the design
387384
intent, Mixer configuration doesn't yet support access control on its configuration so there are no actual constraints on which
388385
operator can manipulate which scope.
389386

390387
#### Resolution
391388

392389
When a request arrives, Mixer goes through a number of [request processing phases](./mixer.md#request-phases).
393-
The Resolution phase is concerned with identifying the exact chunks of configuration to use in order to
390+
The Resolution phase is concerned with identifying the exact blocks of configuration to use in order to
394391
process the incoming request. For example, a request arriving at Mixer for service A likely has some configuration differences
395392
with requests arriving for service B. Resolution is about deciding which config to use for a request.
396393

@@ -400,17 +397,17 @@ hierarchy for blocks of configuration to use for the request.
400397

401398
Here's how it all works:
402399

403-
1. A request arrives and Mixer extracts the value of the identity attribute and produces the current
400+
1. A request arrives and Mixer extracts the value of the identity attribute to produce the current
404401
lookup value.
405402

406-
2. Mixer looks for all chunks of configuration whose subject matches the lookup value.
403+
2. Mixer looks for all blocks of configuration whose subject matches the lookup value.
407404

408-
3. If Mixer finds multiple chunks that match, it keeps only the chunk that has the highest scope.
405+
3. If Mixer finds multiple blocks that match, it keeps only the block that has the highest scope.
409406

410407
4. Mixer truncates the lowest element from the lookup value's dotted name. If the lookup value is
411408
not empty, then Mixer goes back to step 2 above.
412409

413-
All the configs found in this process are combined together to form the final total set of configuration that is used to
410+
All the configs found in this process are combined together to form the final effective configuration that is used to
414411
evaluate the current request.
415412

416413
### Manifests

0 commit comments

Comments
 (0)