MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / NewFrom

Function NewFrom

pkg/podspec/builder.go:41–48  ·  view source on GitHub ↗

NewFrom creates a podTemplate builder from a certain Pod template

(podTemplate *apiv1.PodTemplateSpec)

Source from the content-addressed store, hash-verified

39
40// NewFrom creates a podTemplate builder from a certain Pod template
41func NewFrom(podTemplate *apiv1.PodTemplateSpec) *Builder {
42 if podTemplate == nil {
43 podTemplate = &apiv1.PodTemplateSpec{}
44 }
45 return &Builder{
46 status: *podTemplate,
47 }
48}
49
50// WithAnnotation adds an annotation to the current status
51func (builder *Builder) WithAnnotation(name, value string) *Builder {

Callers 3

DeploymentFunction · 0.92
builder_test.goFile · 0.70
NewFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected