mirror of https://github.com/k3s-io/k3s
Fix fatal error when reconciling bootstrap data
Properly skip restoring bootstrap data for files that don't have a path set because the feature that would set it isn't enabled. Signed-off-by: Brad Davidson <brad.davidson@rancher.com>pull/5869/head
parent
84baab59a9
commit
83420ef78e
|
@ -75,7 +75,7 @@ func WriteToDiskFromStorage(files PathsDataformat, bootstrap *config.ControlRunt
|
||||||
|
|
||||||
for pathKey, bsf := range files {
|
for pathKey, bsf := range files {
|
||||||
path, ok := paths[pathKey]
|
path, ok := paths[pathKey]
|
||||||
if !ok {
|
if !ok || path == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -363,7 +363,7 @@ func (c *Cluster) ReconcileBootstrapData(ctx context.Context, buf io.ReadSeeker,
|
||||||
|
|
||||||
for pk := range files {
|
for pk := range files {
|
||||||
p, ok := paths[pk]
|
p, ok := paths[pk]
|
||||||
if !ok {
|
if !ok || p == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -393,7 +393,7 @@ func (c *Cluster) ReconcileBootstrapData(ctx context.Context, buf io.ReadSeeker,
|
||||||
|
|
||||||
for pk := range files {
|
for pk := range files {
|
||||||
p, ok := paths[pk]
|
p, ok := paths[pk]
|
||||||
if !ok {
|
if !ok || p == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue