Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkg/kustomize/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,22 @@ func (s *Kustomizer) Dependencies() []string { return []string{"kube-apiserver"}

func (s *Kustomizer) Run(ctx context.Context, ready chan<- struct{}, stopped chan<- struct{}) error {
defer close(stopped)
defer close(ready)

kustomization := filepath.Join(s.path, "kustomization.yaml")
if _, err := os.Stat(kustomization); !errors.Is(err, os.ErrNotExist) {
klog.Infof("Applying kustomization at %v ", kustomization)
if err := ApplyKustomizationWithRetries(s.path, s.kubeconfig); err != nil {
klog.Warningf("Applying kustomization failed: %s. Giving up.", err)
// Make the service manager safely shut down everything
return err
} else {
klog.Warningf("Kustomization applied successfully.")
}
} else {
klog.Infof("No kustomization found at " + kustomization)
}

close(ready)
return ctx.Err()
}

Expand Down