MCPcopy
hub / github.com/apecloud/kubeblocks / hasHostNetworkEnabled

Function hasHostNetworkEnabled

pkg/controller/component/utils.go:148–157  ·  view source on GitHub ↗
(annotations map[string]string, compName string)

Source from the content-addressed store, hash-verified

146}
147
148func hasHostNetworkEnabled(annotations map[string]string, compName string) bool {
149 if annotations == nil {
150 return false
151 }
152 comps, ok := annotations[constant.HostNetworkAnnotationKey]
153 if !ok {
154 return false
155 }
156 return slices.Index(strings.Split(comps, ","), compName) >= 0
157}
158
159func getHostNetworkPort(ctx context.Context, _ client.Reader, clusterName, compName, cName, pName string) (int32, error) {
160 key := intctrlutil.BuildHostPortName(clusterName, compName, cName, pName)

Callers 2

IsHostNetworkEnabledFunction · 0.85
isHostNetworkEnabledFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…