istio / old_mixer_repo

Deprecated home of Istio's Mixer and its adapters, now in istio/istio's mixer dir
https://github.com/istio/istio/tree/master/mixer
Apache License 2.0
67 stars 93 forks source link

Add support for default expressions in template definitions #1545

Closed geeknoid closed 7 years ago

geeknoid commented 7 years ago

We should make it possible for template authors to specify default expressions for individual fields in a template definitions. If the instance defined by the operator doesn't include the given field, Mixer will use the default expression automatically.

This provides a way to have extremely low-cost instances where all the defaults are assumed. It also makes a better story when adding new fields to existing templates without having to update configs.

guptasu commented 7 years ago

One thing is unclear to me. Expression's vocabulary is owned by the operator, they can choose to define their own attributes config and therefore the expressions used by the template developer might just not work. Which would mean with every template there should be an equivalent attributes config that expresses the vocabulary of attributes used in the default value expression.

WDYT ?

geeknoid commented 7 years ago

We've adopted a largely generic attribute vocabulary at this point, so I think it's reasonable for these templates to be expressed in terms of this generic vocab.

geeknoid commented 7 years ago

This issue was moved to istio/istio#1631