integ/kubernetes/etcd/debian/deb_patches/0001-Update-config.patch
Daniel Safta 4493a3146c Add debian package for etcd
- created required debian structured
- updated .default and .service files
through 0001-Update-config.patch
- succesfully built the package

Tracking dependency: https://review.opendev.org/c/starlingx/tools/+/815834
Story: 2009221
Task: 43521
Signed-off-by: Daniel Safta <daniel.safta@windriver.com>
Change-Id: I5af677c90342bae7c30901bf465e1db79c716671
2021-10-29 13:30:29 +03:00

68 lines
2.4 KiB
Diff

From 7ef071f8616c36bab74f4b367ef6405c20051f84 Mon Sep 17 00:00:00 2001
From: Daniel Safta <daniel.safta@windriver.com>
Date: Mon, 4 Oct 2021 14:55:59 +0300
Subject: [PATCH] Update config
Updated .default and .service
files with the needed configs.
---
debian/etcd-server.etcd.default | 8 ++++----
debian/etcd-server.etcd.service | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/debian/etcd-server.etcd.default b/debian/etcd-server.etcd.default
index cf1262c9..36255fbc 100644
--- a/debian/etcd-server.etcd.default
+++ b/debian/etcd-server.etcd.default
@@ -11,12 +11,12 @@
## using discovery, each member must have a unique name. `Hostname` or
## `machine-id` can be a good choice.
## default: "default"
-# ETCD_NAME="default"
+ETCD_NAME="default"
##### --data-dir
## Path to the data directory.
## default: "${name}.etcd"
-# ETCD_DATA_DIR="/var/lib/etcd/default"
+ETCD_DATA_DIR="/var/lib/etcd/default"
##### --wal-dir
## Path to the dedicated wal directory. If this flag is set, etcd will write
@@ -68,7 +68,7 @@
## default: "http://localhost:2379"
## example: "http://10.0.0.1:2379"
## invalid example: "http://example.com:2379" (domain name is invalid for binding)
-# ETCD_LISTEN_CLIENT_URLS="http://localhost:2379"
+ETCD_LISTEN_CLIENT_URLS="http://localhost:2379"
##### --max-snapshots
## Maximum number of snapshot files to retain (0 is unlimited)
@@ -184,7 +184,7 @@
## file descriptors) are eventually depleted.
## default: "http://localhost:2379"
## example: "http://example.com:2379, http://10.0.0.1:2379"
-# ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379"
+ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379"
##### --discovery
## Discovery URL used to bootstrap the cluster.
diff --git a/debian/etcd-server.etcd.service b/debian/etcd-server.etcd.service
index f4854bec..f7af53a5 100644
--- a/debian/etcd-server.etcd.service
+++ b/debian/etcd-server.etcd.service
@@ -13,8 +13,8 @@ EnvironmentFile=-/etc/default/%p
Type=notify
User=etcd
PermissionsStartOnly=true
-#ExecStart=/bin/sh -c "GOMAXPROCS=$(nproc) /usr/bin/etcd $DAEMON_ARGS"
-ExecStart=/usr/bin/etcd $DAEMON_ARGS
+ExecStart=/bin/sh -c "GOMAXPROCS=$(nproc) /usr/bin/etcd --name=\"${ETCD_NAME}\" --data-dir=\"${ETCD_DATA_DIR}\" --listen-client-urls=\"${ETCD_LISTEN_CLIENT_URLS}\""
+#ExecStart=/usr/bin/etcd $DAEMON_ARGS
Restart=on-abnormal
#RestartSec=10s
LimitNOFILE=65536
--
2.25.1