From: Lukas Wagner <l.wagner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Alexander Zeidler <a.zeidler@proxmox.com>
Subject: Re: [pve-devel] [PATCH proxmox] fix #6143: notify: allow overriding notification templates
Date: Fri, 28 Mar 2025 14:27:26 +0100 [thread overview]
Message-ID: <2baf3cfd-482a-4fa3-ac0c-bb8c811dd2fd@proxmox.com> (raw)
In-Reply-To: <20250321133341.151340-1-a.zeidler@proxmox.com>
On 2025-03-21 14:33, Alexander Zeidler wrote:
> Previously, notification templates could be modified by the user, but
> these were overwritten again with installing newer package versions of
> pve-manager and proxmox-backup.
>
> Now override templates can be created cluster-wide in the path
> “/etc/{pve,proxmox-backup}/notification-templates/{namespace}”, which
> are used with priority. The folder structure has to be created and
> populated manually (e.g. /etc/pve/notification-templates/default).
>
> If override templates are not existing or their rendering fails, the
> vendor templates in
> "/usr/share/{pve-manager,proxmox-backup}/templates/default/" are used.
>
> Sequence: [override html -> vendor html ->] override txt -> vendor txt
>
> An error is only returned if none of the template candidates could be
> used. Using an override template gets not logged.
>
> Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
> ---
> This patch was previously sent as RFC and has now all suggestions from
> Lukas Wagner implemented:
> https://lore.proxmox.com/pve-devel/20250313151734.258337-1-a.zeidler@proxmox.com/
>
> This patch should not be merged until the existing PVE and PBS
> templates have been audited. For PVE this is currently being done, for
> PBS a patch is already sent:
> https://lore.proxmox.com/pbs-devel/20250321122521.198725-1-l.wagner@proxmox.com/
>
> The documentation changes for PVE and PBS (steps for override template
> creation, list of variables and helpers) will be sent in separate
> patches after the above mentioned audit is completed.
>
>
This looks good to me now. Tested it in both PVE and PBS, works as expected.
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
As Alex already mentioned, this should not be rolled about before
my two template cleanup series [1,2] are merged. Code-wise there are no dependencies,
but with this patch, our template helpers/variables essentially become a public API
and thus the cleanup should be rolled out before or at the same time.
For the person merging this, please also bump proxmox-mail-forward, that
one is easy to overlook when changes to proxmox-notify are pushed out.
[1]: https://lore.proxmox.com/pve-devel/20250328101915.73951-1-l.wagner@proxmox.com/T/#t
[2]: https://lore.proxmox.com/pbs-devel/20250328102242.75539-1-l.wagner@proxmox.com/T/#t
--
- Lukas
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2025-03-28 13:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-21 13:33 Alexander Zeidler
2025-03-28 13:27 ` Lukas Wagner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2baf3cfd-482a-4fa3-ac0c-bb8c811dd2fd@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=a.zeidler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal