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 sprintf-style transformer #49

Open
dgrove-oss opened this issue Oct 11, 2019 · 0 comments
Open

Support sprintf-style transformer #49

dgrove-oss opened this issue Oct 11, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@dgrove-oss
Copy link
Contributor

A useful pattern to support would be to allow multiple inputs to be combined into a single output. A canonical use case is combining a host and port stored in different config map entries (or different secrets) into a single URL. Similar patterns occur when configuring a database (host + utl + table name).

A proposed design might be something like:

combineValueFrom:
  format: 'http://%s:%s'
  inputs:
    - getValueFrom:
      ....
    - getValueFrom:
      ....

The combineValueFrom takes a format which is expected to be a sprintf-style format string and a list of inputs, each of which is a fully-functional getValueFrom block (including format-transformers on the individual items).

TMaYaD added a commit to tildabio/composable that referenced this issue Oct 22, 2021
Supports the following syntax as described in composable-operator#49

```yaml
interpolateValuesFrom:
  format: 'http://%s:%s'
  inputs:
    - getValueFrom:
      ....
    - getValueFrom:
      ....
```
TMaYaD added a commit to tildabio/composable that referenced this issue Oct 29, 2021
Supports the following syntax as described in composable-operator#49

```yaml
interpolateValuesFrom:
  format: 'http://%s:%s'
  inputs:
    - getValueFrom:
      ....
    - getValueFrom:
      ....
```
TMaYaD added a commit to tildabio/composable that referenced this issue Oct 29, 2021
Supports the following syntax as described in composable-operator#49

```yaml
interpolateValuesFrom:
  format: 'http://%s:%s'
  inputs:
    - getValueFrom:
      ....
    - getValueFrom:
      ....
```
TMaYaD added a commit to tildabio/composable that referenced this issue Oct 29, 2021
Supports the following syntax as described in composable-operator#49

```yaml
interpolateValuesFrom:
  format: 'http://%s:%s'
  inputs:
    - kind: Service
      name: myservice
      path: '{.spec.clusterIP}'
    - kind: Service
      name: myservice
      path: '{.spec.ports[0].port}'
```
@xvzf xvzf added the enhancement New feature or request label Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants