Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Add the ability to use templating on generators values #518

Closed
ShauliSolomovich opened this issue Feb 24, 2022 · 1 comment
Closed

Add the ability to use templating on generators values #518

ShauliSolomovich opened this issue Feb 24, 2022 · 1 comment

Comments

@ShauliSolomovich
Copy link

enhancement request.

Today when using variables of generator in the template we can only use them as they are (raw values).
we need the ability to manipulate those values in order to create a valid Application
.
for example, some of our integrations creating automatic branches that we want to create an Application for, but the name of the branch is generated to something like that my-integration/update-version-x.y.z. which will fail because the name can't contain those characters ( \ and .)

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  labels:
    app: my-app
  name: my-app-pr
spec:
  generators:
  - pullRequest:
      github:
        ...
  template:
    metadata:
      labels:
        app: my-app
      name: my-app-{{branch | replace "/" "-" | replace "." "-" }}
      namespace: default
    spec:
      destination:
        namespace: default
        server: https://kubernetes.default.svc
      project: default

@crenshaw-dev
Copy link
Member

crenshaw-dev commented Feb 24, 2022

Duplicate of #447 / #351 / #303?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants