MCPcopy Index your code
hub / github.com/apecloud/kubeblocks / IsHostNetworkEnabled

Function IsHostNetworkEnabled

pkg/controller/component/utils.go:95–104  ·  view source on GitHub ↗
(synthesizedComp *SynthesizedComponent)

Source from the content-addressed store, hash-verified

93}
94
95func IsHostNetworkEnabled(synthesizedComp *SynthesizedComponent) bool {
96 if !hasHostNetworkCapability(synthesizedComp, nil) {
97 return false
98 }
99 // legacy definition, ignore the cluster annotations
100 if synthesizedComp.PodSpec.HostNetwork {
101 return true
102 }
103 return hasHostNetworkEnabled(synthesizedComp.Annotations, synthesizedComp.Name)
104}
105
106func isHostNetworkEnabled(ctx context.Context, cli client.Reader, synthesizedComp *SynthesizedComponent, compName string) (bool, error) {
107 // fast path: refer to self

Callers 2

TransformMethod · 0.92
isHostNetworkEnabledFunction · 0.85

Calls 2

hasHostNetworkCapabilityFunction · 0.85
hasHostNetworkEnabledFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…