Documentation ¶
Index ¶
- func GetPodIP(pod *corev1.Pod) string
- func HasFinalizer(obj metav1.Object, finalizer string) bool
- func IsServiceHeadless(svc *corev1.Service) bool
- func LookupContainerPortAndName(pod *corev1.Pod, port intstr.IntOrString, protocol corev1.Protocol) (int32, string, error)
- func LookupListenPortFromPodSpec(svc *corev1.Service, pod *corev1.Pod, port intstr.IntOrString, ...) (int32, error)
- func LookupServiceListenPort(svc *corev1.Service, port intstr.IntOrString, protocol corev1.Protocol) (int32, error)
- func NamespacedName(obj client.Object) client.ObjectKey
- type ConfigMapStore
- func (s *ConfigMapStore) Add(obj interface{}) error
- func (s *ConfigMapStore) Delete(obj interface{}) error
- func (s *ConfigMapStore) Get(obj interface{}) (item interface{}, exists bool, err error)
- func (s *ConfigMapStore) GetByKey(key string) (item interface{}, exists bool, err error)
- func (s *ConfigMapStore) List() []interface{}
- func (s *ConfigMapStore) ListKeys() []string
- func (s *ConfigMapStore) Replace(list []interface{}, resourceVersion string) error
- func (s *ConfigMapStore) Resync() error
- func (s *ConfigMapStore) Update(obj interface{}) error
- type FinalizerManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPodIP ¶ added in v0.5.1
GetPodIP returns the pod IP from the pod status or from the pod annotation.
func HasFinalizer ¶
HasFinalizer tests whether k8s object has specified finalizer
func IsServiceHeadless ¶ added in v0.5.4
IsServiceHeadless returns true if the service is headless
func LookupContainerPortAndName ¶ added in v0.5.1
func LookupContainerPortAndName(pod *corev1.Pod, port intstr.IntOrString, protocol corev1.Protocol) (int32, string, error)
LookupContainerPortAndName returns numerical containerPort and portName for specific port and protocol
func LookupListenPortFromPodSpec ¶ added in v0.5.1
func LookupListenPortFromPodSpec(svc *corev1.Service, pod *corev1.Pod, port intstr.IntOrString, protocol corev1.Protocol) (int32, error)
LookupListenPortFromPodSpec returns the numerical listener port from the service spec if the input port matches the target port in the pod spec
func LookupServiceListenPort ¶ added in v0.5.1
func LookupServiceListenPort(svc *corev1.Service, port intstr.IntOrString, protocol corev1.Protocol) (int32, error)
LookupServiceListenPort returns the numerical port for the service listen port if the target port name matches or the port number and the protocol matches the target port. If no matching port is found, it returns a 0 and an error.
Types ¶
type ConfigMapStore ¶ added in v0.5.1
type ConfigMapStore struct {
// contains filtered or unexported fields
}
func NewConfigMapStore ¶ added in v0.5.1
func NewConfigMapStore(notifyChan chan<- struct{}) *ConfigMapStore
NewConfigMapStore constructs new conversionStore
func (*ConfigMapStore) Add ¶ added in v0.5.1
func (s *ConfigMapStore) Add(obj interface{}) error
Add adds the given object to the accumulator associated with the given object's key
func (*ConfigMapStore) Delete ¶ added in v0.5.1
func (s *ConfigMapStore) Delete(obj interface{}) error
Delete deletes the given object from the accumulator associated with the given object's key
func (*ConfigMapStore) Get ¶ added in v0.5.1
func (s *ConfigMapStore) Get(obj interface{}) (item interface{}, exists bool, err error)
Get returns the object with the given key
func (*ConfigMapStore) GetByKey ¶ added in v0.5.1
func (s *ConfigMapStore) GetByKey(key string) (item interface{}, exists bool, err error)
GetByKey returns the object with the given key
func (*ConfigMapStore) List ¶ added in v0.5.1
func (s *ConfigMapStore) List() []interface{}
List returns a list of all the objects
func (*ConfigMapStore) ListKeys ¶ added in v0.5.1
func (s *ConfigMapStore) ListKeys() []string
ListKeys returns a list of all the keys
func (*ConfigMapStore) Replace ¶ added in v0.5.1
func (s *ConfigMapStore) Replace(list []interface{}, resourceVersion string) error
Replace will delete the contents of the store, using instead the given list.
func (*ConfigMapStore) Resync ¶ added in v0.5.1
func (s *ConfigMapStore) Resync() error
Resync invokes the cache.store Resync method
func (*ConfigMapStore) Update ¶ added in v0.5.1
func (s *ConfigMapStore) Update(obj interface{}) error
Update updates the given object in the accumulator associated with the given object's key
type FinalizerManager ¶
type FinalizerManager interface { AddFinalizers(ctx context.Context, object client.Object, finalizers ...string) error RemoveFinalizers(ctx context.Context, object client.Object, finalizers ...string) error }
func NewDefaultFinalizerManager ¶
func NewDefaultFinalizerManager(k8sClient client.Client, log logr.Logger) FinalizerManager