internalServicesFor returns the state services Zarf will deploy internally in this init run.
(components []v1alpha1.ZarfComponent, opts DeployOptions)
| 328 | |
| 329 | // internalServicesFor returns the state services Zarf will deploy internally in this init run. |
| 330 | func internalServicesFor(components []v1alpha1.ZarfComponent, opts DeployOptions) state.ServiceSet { |
| 331 | services := state.NewServiceSet() |
| 332 | registryExternal := opts.RegistryInfo.Address != "" |
| 333 | for _, c := range components { |
| 334 | switch c.Name { |
| 335 | case "git-server": |
| 336 | services.Add(state.GitKey) |
| 337 | services.Add(state.ArtifactKey) |
| 338 | case "zarf-registry", "zarf-seed-registry", "zarf-injector": |
| 339 | if !registryExternal { |
| 340 | services.Add(state.RegistryKey) |
| 341 | } |
| 342 | case "zarf-agent": |
| 343 | services.Add(state.AgentKey) |
| 344 | } |
| 345 | } |
| 346 | return services |
| 347 | } |
| 348 | |
| 349 | func (d *deployer) deployInitComponent(ctx context.Context, pkgLayout *layout.PackageLayout, component v1alpha1.ZarfComponent, opts DeployOptions) ([]state.InstalledChart, error) { |
| 350 | l := logger.From(ctx) |