Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Aug 3, 2023

Conversation

kuanf
Copy link
Contributor

@kuanf kuanf commented Jul 10, 2023

….xxx.xx}}

#38

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

….xxx.xx}}

Signed-off-by: Kuan Feng <kuan@ca.ibm.com>
@kuanf kuanf requested review from ading1977 and tian-ma July 10, 2023 15:23
@kuanf kuanf linked an issue Jul 10, 2023 that may be closed by this pull request
@ading1977
Copy link
Collaborator

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

Signed-off-by: Kuan Feng <kuan@ca.ibm.com>
@kuanf
Copy link
Contributor Author

kuanf commented Jul 11, 2023

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

registry/orm.go Show resolved Hide resolved
registry/orm.go Outdated Show resolved Hide resolved
Signed-off-by: Kuan Feng <kuan@ca.ibm.com>
registry/orm.go Show resolved Hide resolved
Signed-off-by: Kuan Feng <kuan@ca.ibm.com>
@kuanf kuanf merged commit efe6b62 into turbonomic:master Aug 3, 2023
1 check passed
@kuanf kuanf deleted the os branch August 3, 2023 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support predefined variable to retrieve string value from owned resource
3 participants