Skip to content

feature: Go Templated expressions #46

Open
@xrstf

Description

@xrstf

Feature Description

The original agent implementation supports a special variable syntax, meant to be extremely lightweight and simple to use. Variables like $remoteName or $remoteClusterName.

Now with the advent of label selectors, we would need variable support in a few more places. Plus, we would need more variables (like remoteName, localName, name, remoteNamespace, localNamespace, namespace, ...).

Proposed Solution

At this point, it becomes annoying to use, because what it $namespace? Is it $name + space or $namespace?

Before we begin to re-invent the wheel, we should just use Go templates. They are harder to write than I would personally like, but it' simply the Go standard way of doing things, brings with it support for conditions and is well understood across the ecosystem (certainly more than any homegrown solution).

So we need to implement support for the new Go templated expressions. #44 already incorporates them into the API, but returns a "not implemented" error at the moment.

Alternative Solutions

No response

Want to contribute?

  • I would like to work on this issue.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions