Force BootstrapClient to run after Protokube

This commit is contained in:
Ciprian Hacman 2020-09-12 08:05:52 +03:00
parent c1e0991153
commit fe3adb1fe3
1 changed files with 8 additions and 1 deletions

View File

@ -59,7 +59,14 @@ var _ fi.HasName = &BootstrapClient{}
var _ fi.HasDependencies = &BootstrapClient{}
func (b *BootstrapClient) GetDependencies(tasks map[string]fi.Task) []fi.Task {
return nil
// BootstrapClient depends on the protokube service to ensure gossip DNS
var deps []fi.Task
for _, v := range tasks {
if svc, ok := v.(*Service); ok && svc.Name == protokubeService {
deps = append(deps, v)
}
}
return deps
}
func (b *BootstrapClient) GetName() *string {