Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add go templates support for Caddyfile #669

Open
GoodbyeNJN opened this issue Oct 26, 2024 · 2 comments
Open

[Feature Request] Add go templates support for Caddyfile #669

GoodbyeNJN opened this issue Oct 26, 2024 · 2 comments

Comments

@GoodbyeNJN
Copy link

Currently go templates only take effect on tag values. Can it be extended to take effect on external Caddyfile?

Consider one or more long snippets. It is inconvenient to write and read when defined in a tag. It is more convenient to define it directly in an external Caddyfile, but it will lose the support of go templates.

@francislavoie
Copy link
Collaborator

The troublesome thing is some users might want to literally use Go templates in their respond directive since Caddy has the templates directive, so if it was processed already when producing the Caddyfile, it would break those templates. So 🤷‍♂️

@GoodbyeNJN
Copy link
Author

Could it be limited to processing only templates starting with a specific string? What I mean is: only process {{.CaddyDocker.Spec.Name}}, skip not starting with CaddyDocker.

For consideration only.

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

No branches or pull requests

2 participants