Skip to content

[Bug] ServiceAccount does not act as it should when adding external account #403

@vongohren

Description

@vongohren

What are you really trying to do?

Im adding a GCP cloud proxy sidecar, and have setup workload identity for the cluster. All I want is to specify which KSA(Kubernetes service account) the deployment shall use.

So when I set create to false, makes sense because it already exists, I want the service account name to still be created.

Therefor create false and name mySAname.

But because of the helpers, nothing will be created, and the service account wont be added.

It can be solved with a simple else, but just want to hear your thoughts on this.
It has been done here: https://github.com/tryretool/retool-workflows-helm/blob/main/values.yaml#L273 and with this helper: https://github.com/tryretool/retool-workflows-helm/blob/main/templates/_helpers.tpl#L56

Describe the bug

The sa name should still be added to the right places its expected

Minimal Reproduction

Just change serviceAccount in values.yaml, keep create: false, but add a name.
Run with template --debug, and you can see that there is an empty line where the name should be.

Environment/Versions

No relevant info

Additional context

No additional context

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