Skip to content

Commit c7abf44

Browse files
authored
Merge pull request kubernetes#88856 from yaseenhamdulay/patch-1
Create etcd user in cloud-init master.yaml rather than in configure-h…
2 parents 5be91f9 + 58f78a5 commit c7abf44

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

cluster/gce/gci/configure-helper.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,6 @@ function mount-master-pd {
445445
mkdir -p "${mount_point}/srv/sshproxy"
446446
ln -s -f "${mount_point}/srv/sshproxy" /etc/srv/sshproxy
447447

448-
if ! id etcd &>/dev/null; then
449-
useradd -s /sbin/nologin -d /var/etcd etcd
450-
fi
451448
chown -R etcd "${mount_point}/var/etcd"
452449
chgrp -R etcd "${mount_point}/var/etcd"
453450
}

cluster/gce/gci/master.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#cloud-config
22

3+
users:
4+
- name: etcd
5+
homedir: /var/etcd
6+
lock_passwd: true
7+
ssh_redirect_user: true
8+
39
write_files:
410
- path: /etc/systemd/system/kube-master-installation.service
511
permissions: 0644

0 commit comments

Comments
 (0)