Skip to content

Transformer arugments can clash each other #8

Open
@thethumbler

Description

@thethumbler

In kubernetes transformers, the following sample uses appName and serviceAccountName as arugments which will eventually be part of the component model and these names can not be used across any other transformer.

https://github.com/devopzilla/guku-devx/blob/5743b77354638b7fe4e592ddaf83df47e6691a19/pkg/guku.io/devx/v1/transformers/kubernetes/transformers.cue#L35-L36

As a suggestion, I would add some annotations field to $metadata and use it as a freemap then use it to define arguments, for example:

#SomeTransformer: v1.#Transformer & {
  v1.#Component$metadata: annotations: kubernetes: deployment: appName: string | *$metadata.id 
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions