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

Method WithLabel

pkg/servicespec/builder.go:63–71  ·  view source on GitHub ↗

WithLabel adds a label to the current status

(name, value string)

Source from the content-addressed store, hash-verified

61
62// WithLabel adds a label to the current status
63func (builder *Builder) WithLabel(name, value string) *Builder {
64 if builder.status.ObjectMeta.Labels == nil {
65 builder.status.ObjectMeta.Labels = make(map[string]string)
66 }
67
68 builder.status.ObjectMeta.Labels[name] = value
69
70 return builder
71}
72
73// WithServiceType adds a service type to the current status
74func (builder *Builder) WithServiceType(serviceType corev1.ServiceType, overwrite bool) *Builder {

Callers 4

builder_test.goFile · 0.45
BuildManagedServicesFunction · 0.45
DeploymentFunction · 0.45
ServiceFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected