Documentation ¶
Index ¶
- Constants
- Variables
- func CheckFileExistsPrompt(ctx context.Context, name string, autoYes bool) error
- func GID() uint64
- func Hostname() string
- func IsFlatNetworkService(svc *corev1.Service) bool
- func IsMacvlanV1Service(svc *corev1.Service) bool
- func IsPodEnabledFlatNetwork(pod *corev1.Pod) bool
- func Print(a any) string
- func PromptUser(ctx context.Context, text string, autoYes bool) error
- func Ptr[T valueTypes](i T) *T
- func Scanf(ctx context.Context, format string, a ...any) (int, error)
- func SetupLogrus(debug bool)
- func Value[T valueTypes](p *T) T
Constants ¶
View Source
const ( // Operator auto-created flat-network service name suffix FlatNetworkServiceNameSuffix = "-flat-network" NetAttatchDefName = "rancher-flat-network" V1NetAttachDefName = "static-macvlan-cni-attach" )
Variables ¶
View Source
var ( Version = "v0.1.0" GitCommit = "HEAD" )
Functions ¶
func CheckFileExistsPrompt ¶
func IsFlatNetworkService ¶
Check if this service is a flat-network service.
Specification: A Flat-Network Service is a ClusterIP typed headless service, name ends with '-flat-network' suffix. And should have 'k8s.v1.cni.cncf.io/networks: rancher-flat-network' annotation.
func IsMacvlanV1Service ¶
func IsPodEnabledFlatNetwork ¶
IsPodEnabledFlatNetwork returns true if the pod enables flatnetwork
func SetupLogrus ¶
func SetupLogrus(debug bool)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.