turbonomic / orm

Operator Resource Mapping
Apache License 2.0
5 stars 13 forks source link

support using any value from owned resource in path with {{.owned.xxx… #39

Closed kuanf closed 1 year ago

kuanf commented 1 year ago

….xxx.xx}}

38

There is a problem with escaping dot (.) in jsonpath for ORM in general. It is addressed in separate issue #40

ading1977 commented 1 year ago

Can you provide some sample CR yamls reflecting this changes? Should it be in https://github.com/turbonomic/orm/blob/master/config/samples?

kuanf commented 1 year ago

Can you provide some sample CR yamls reflecting this changes? Should it be in https://github.com/turbonomic/orm/blob/master/config/samples?

updated the orm sample to show the syntax. particularly for this feature, the {{.owned.labels.appname}} gets the value of a label in deployment (e.g. "mydb" in the example below and use that in owner path)

metadata:
  labels:
    appname: mydb

appname could be anything defined by user. Except the limitation in #40