downward

package
v1.10.21 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLocationReader

func CreateLocationReader(basedir string) func(string) ([]byte, error)

func TransformConfigTemplates

func TransformConfigTemplates(node *envoy_config_core_v3.Node) error

func TransformConfigTemplatesWithApi

func TransformConfigTemplatesWithApi(node *envoy_config_core_v3.Node, api DownwardAPI) error

Types

type DownwardAPI

type DownwardAPI interface {
	PodName() string
	PodNamespace() string
	PodIp() string
	PodSvcAccount() string
	PodUID() string

	NodeName() string
	NodeIp() string

	PodLabels() map[string]string
	PodAnnotations() map[string]string
}

func RetrieveDownwardAPI

func RetrieveDownwardAPI() DownwardAPI

func RetrieveDownwardAPIFrom

func RetrieveDownwardAPIFrom(read func(string) ([]byte, error), getenv func(string) string) DownwardAPI

type Interpolator

type Interpolator interface {
	InterpolateIO(in io.Reader, out io.Writer, data DownwardAPI) error
	Interpolate(tmpl string, out io.Writer, data DownwardAPI) error
	InterpolateString(*string, DownwardAPI) error
}

func NewInterpolator

func NewInterpolator() Interpolator

type TestWhichIsNeedDownwardAPI

type TestWhichIsNeedDownwardAPI struct {
	IsPodName       bool
	IsPodNamespace  bool
	IsPodIp         bool
	IsPodSvcAccount bool
	IsPodUID        bool

	IsNodeName bool
	IsNodeIp   bool

	IsPodLabels      bool
	IsPodAnnotations bool
}

func TestNeededDownwardAPI

func TestNeededDownwardAPI() *TestWhichIsNeedDownwardAPI

func (*TestWhichIsNeedDownwardAPI) NodeIp

func (td *TestWhichIsNeedDownwardAPI) NodeIp() string

func (*TestWhichIsNeedDownwardAPI) NodeName

func (td *TestWhichIsNeedDownwardAPI) NodeName() string

func (*TestWhichIsNeedDownwardAPI) PodAnnotations

func (td *TestWhichIsNeedDownwardAPI) PodAnnotations() map[string]string

func (*TestWhichIsNeedDownwardAPI) PodIp

func (td *TestWhichIsNeedDownwardAPI) PodIp() string

func (*TestWhichIsNeedDownwardAPI) PodLabels

func (td *TestWhichIsNeedDownwardAPI) PodLabels() map[string]string

func (*TestWhichIsNeedDownwardAPI) PodName

func (td *TestWhichIsNeedDownwardAPI) PodName() string

func (*TestWhichIsNeedDownwardAPI) PodNamespace

func (td *TestWhichIsNeedDownwardAPI) PodNamespace() string

func (*TestWhichIsNeedDownwardAPI) PodSvcAccount

func (td *TestWhichIsNeedDownwardAPI) PodSvcAccount() string

func (*TestWhichIsNeedDownwardAPI) PodUID

func (td *TestWhichIsNeedDownwardAPI) PodUID() string

type Transformer

type Transformer struct {
	// contains filtered or unexported fields
}

func NewTransformer

func NewTransformer() *Transformer

func (*Transformer) Transform

func (t *Transformer) Transform(in io.Reader, out io.Writer) error

func (*Transformer) TransformFiles

func (t *Transformer) TransformFiles(in, out string) error

Jump to

Keyboard shortcuts

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