-
Notifications
You must be signed in to change notification settings - Fork 8
/
phase1.go
34 lines (26 loc) · 958 Bytes
/
phase1.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2022 Namespace Labs Inc; All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
package cuefrontendopaque
import (
"context"
"namespacelabs.dev/foundation/schema"
"namespacelabs.dev/foundation/std/cfg"
"namespacelabs.dev/foundation/std/pkggraph"
)
type phase1plan struct {
startupPlan *schema.StartupPlan
declaredStack []schema.PackageName
sidecars []*schema.Container
initContainers []*schema.Container
naming *schema.Naming
}
func (p1 phase1plan) EvalProvision(ctx context.Context, env cfg.Context, inputs pkggraph.ProvisionInputs) (pkggraph.ProvisionPlan, error) {
var pdata pkggraph.ProvisionPlan
pdata.Startup = phase2plan{startupPlan: p1.startupPlan}
pdata.DeclaredStack = p1.declaredStack
pdata.Sidecars = p1.sidecars
pdata.Inits = p1.initContainers
pdata.Naming = p1.naming
return pdata, nil
}