MCPcopy
hub / github.com/zarf-dev/zarf / internalServicesFor

Function internalServicesFor

src/pkg/packager/deploy.go:330–347  ·  view source on GitHub ↗

internalServicesFor returns the state services Zarf will deploy internally in this init run.

(components []v1alpha1.ZarfComponent, opts DeployOptions)

Source from the content-addressed store, hash-verified

328
329// internalServicesFor returns the state services Zarf will deploy internally in this init run.
330func 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
349func (d *deployer) deployInitComponent(ctx context.Context, pkgLayout *layout.PackageLayout, component v1alpha1.ZarfComponent, opts DeployOptions) ([]state.InstalledChart, error) {
350 l := logger.From(ctx)

Callers 2

TestInternalServicesForFunction · 0.85
deployInitComponentMethod · 0.85

Calls 2

AddMethod · 0.95
NewServiceSetFunction · 0.92

Tested by 1

TestInternalServicesForFunction · 0.68