testutil

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(name string, tweaks ...ServiceTweak) *corev1.Service

NewService returns a service type LB in default namespace

Types

type ServiceTweak

type ServiceTweak func(s *corev1.Service)

ServiceTweak is a func that could be used to modify Service object

func TweakAddAppProtocol

func TweakAddAppProtocol(appProtocol string) ServiceTweak

TweakAddAppProtocol returns a func that changes the AppProtocol a service

func TweakAddDeletionTimestamp

func TweakAddDeletionTimestamp(time time.Time) ServiceTweak

TweakAddDeletionTimestamp returns a func that changes the DeletionTimestamp a service

func TweakAddETP

TweakAddETP returns a func that changes the ExternalTrafficPolicyType of a service

func TweakAddFinalizers

func TweakAddFinalizers(finalizers ...string) ServiceTweak

TweakAddFinalizers returns a func that changes the Finalizers a service

func TweakAddLBClass

func TweakAddLBClass(loadBalancerClass *string) ServiceTweak

TweakAddLBClass returns a func that changes the loadbalancerClass a service

func TweakAddLBIngress

func TweakAddLBIngress(ip string) ServiceTweak

TweakAddLBIngress returns a func that changes the Ingress of a service

func TweakAddPorts

func TweakAddPorts(protocol corev1.Protocol, sourcePort, targetPort int) ServiceTweak

TweakAddPorts returns a func that changes the ServicePort of a service

func TweakDualStack

func TweakDualStack() ServiceTweak

func TweakNamespace

func TweakNamespace(ns string) ServiceTweak

TweakNamespace returns a func that changes the namespace of a service

func TweakSetIPFamilies

func TweakSetIPFamilies(families ...corev1.IPFamily) ServiceTweak

TweakSetIPFamilies returns a func that changes the IPFamilies a service

func TweakSetLoadbalancerIP

func TweakSetLoadbalancerIP(ip string) ServiceTweak

TweakSetLoadbalancerIP returns a func that changes the LoadBalancerIP a service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL