Skip to content

Get the environment variables to the template parsing #53

@teemuvesala

Description

@teemuvesala

Is your feature request related to a problem? Please describe.

In some cases we need external services where the Host-header must be correct. At the moment there isn't way to do that. By default the Varnish uses the same Host-header which it was called with. So that header must be different in different environments. It would simplify life a lot if I could use environment variables for that.

So we'd had at template:
set req.http.Host = "{{ .Env.CORRECT_EXT_HOST }}";

And at the Helm template I'd had environment variables defined correctly. This is not the only place where I'd use it. I've got some special requirements for the URL rewriting. This would help also at that.

Describe alternatives you've considered

Additional solution would be the script which pre-parses the template, but then we'd have too many levels of parsing. It would be error prone and waste of time to maintain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions