From f6a04ea995db602dc09258b8f61bba9dcb41491b Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 17 Jul 2019 16:25:34 +0900 Subject: [PATCH] Add a few comments in bootstrap.go --- pkg/daemons/control/bootstrap.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/daemons/control/bootstrap.go b/pkg/daemons/control/bootstrap.go index 89fd0dc058..4200bc14a8 100644 --- a/pkg/daemons/control/bootstrap.go +++ b/pkg/daemons/control/bootstrap.go @@ -45,6 +45,8 @@ var validBootstrapTypes = map[string]bool{ bootstrapTypeFull: true, } +// fetchBootstrapData copies the bootstrap data (certs, keys, passwords) +// from etcd to inidividual files specified by cfg.Runtime. func fetchBootstrapData(cfg *config.Control) error { if valid, err := checkBootstrapArgs(cfg, map[string]bool{ bootstrapTypeFull: true, @@ -95,6 +97,8 @@ func fetchBootstrapData(cfg *config.Control) error { return writeRuntimeBootstrapData(cfg.Runtime, serverRuntime) } +// storeBootstrapData copies the bootstrap data in the opposite direction to +// fetchBootstrapData. func storeBootstrapData(cfg *config.Control) error { if valid, err := checkBootstrapArgs(cfg, map[string]bool{ bootstrapTypeFull: true,