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

Method WithAnnotation

pkg/servicespec/builder.go:52–60  ·  view source on GitHub ↗

WithAnnotation adds an annotation to the current status

(name, value string)

Source from the content-addressed store, hash-verified

50
51// WithAnnotation adds an annotation to the current status
52func (builder *Builder) WithAnnotation(name, value string) *Builder {
53 if builder.status.ObjectMeta.Annotations == nil {
54 builder.status.ObjectMeta.Annotations = make(map[string]string)
55 }
56
57 builder.status.ObjectMeta.Annotations[name] = value
58
59 return builder
60}
61
62// WithLabel adds a label to the current status
63func (builder *Builder) WithLabel(name, value string) *Builder {

Callers 3

builder_test.goFile · 0.45
BuildManagedServicesFunction · 0.45
ServiceFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected