k8s

package
v0.0.0-...-8b63f97 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2021 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package k8s provides pod discovery for Kubernetes.

Index

Constants

View Source
const (
	// AnnotationKeyPort is the annotation name of the field that specifies
	// the port name or number to append to the address.
	AnnotationKeyPort = "consul.hashicorp.com/auto-join-port"
)

Variables

This section is empty.

Functions

func PodAddrs

func PodAddrs(pods *corev1.PodList, args map[string]string, l *log.Logger) ([]string, error)

PodAddrs extracts the addresses from a list of pods.

This is a separate method so that we can unit test this without having to setup complicated K8S cluster scenarios. It shouldn't generally be called externally.

Types

type Provider

type Provider struct{}

func (*Provider) Addrs

func (p *Provider) Addrs(args map[string]string, l *log.Logger) ([]string, error)

func (*Provider) Help

func (p *Provider) Help() string

Jump to

Keyboard shortcuts

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