Description
Hello All!
I am currently implementing a new etcd stack in archlinux, and in these efforts I am using systemd config based environmental variables. In doing this the aur package in archlinux is using system.d style of configuration.
There is a /usr/lib/systemd/system/etcd.service.d/10-EnvironmentFile.conf that has a reference to the EnvironmentFile=-/etc/conf.d/etcd for the unit and a nice (but needs updated) ENV_* configuration file in the package that is /etc/conf.d/etcd
Currently I am undertaking a reformat and update of the /etc/conf.d/etcd for my work. I would like to write, eventually, a script to generate my configuration (/etc/conf.d/etcd) file based on the etcd --help output. I see there was a removal of ENV_ variables after etcd 3.4, and I can understand why. Who would want to maintain all that?
I rose this in #sig-etcd slack channel recently (https://kubernetes.slack.com/archives/C3HD8ARJ5/p1727313996375469?thread_ts=1727313558.679039&cid=C3HD8ARJ5), and I am submitting an issue here today to see if anyone thinks it may be wise to create a build script based on the output of etcd --help or similar. The build script would serve two purposes I think. The first to give folks a great .conf / ENV_ style configuration for their use, and then also generate pieces or parts of the actual https://etcd.io/docs/v3.5/op-guide/configuration/ page
How would I go about doing this? I just need the highlevel. Write script in bla (python?), submit to website repo, target X file, and Y file using these paths. Or even something like see website build script here and figure it out.
Please feel free to comment with guidance or advice.
Here is some sample work for the ENV_*/.conf file I am building right now. I am open for suggestions. For me it is a new take on the eggdrop config style work seen here: https://github.com/eggheads/eggdrop/blob/develop/eggdrop.conf
Here is a preview of what I am working on:
################################################################################
############################## Background ######################################
################################################################################
# Use this file to pull these env into a systemd service. For instance:
# /usr/lib/systemd/system/etcd.service.d/10-EnvironmentFile.conf
#
# Contents:
# [Service]
# EnvironmentFile=-/etc/conf.d/etcd
# FYI
# Environment variables: every flag has a corresponding environment variable that has
# the same name but is prefixed withETCD_ and formatted in all caps and snake case. For
# example, --some-flag would be ETCD_SOME_FLAG.
################################################################################
############################## Member flags ####################################
################################################################################
#### --name
#
# ETCD_NAME="default"
#
# Human_readable name for this member.
#
# default: "default"
#
# This value is referenced as this node’s own entries listed in the
# --initial-cluster flag (e.g., default=http://localhost:2380). This needs to
# match the key used in the flag if using static bootstrapping. When using
# discovery, each member must have a unique name. Hostname or machine-id can
# be a good choice.