inject

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHostPathPrefix string = "/usr/share/zoneinfo"
	DefaultLocalTimePath  string = "/etc/localtime"

	// DefaultInitContainerName is the default name for initContainer of k8tz
	DefaultInitContainerName string = "k8tz"
	// DefaultInjectionStrategy is the default injection strategy of k8tz
	DefaultInjectionStrategy = InitContainerInjectionStrategy
	// InitContainerInjectionStrategy is an injection strategy where we inject
	// k8tz bootstrap initContainer into a pod with a shared emptyDir volume;
	// the bootstrap container then copies TZif files to the emptyDir so the
	// actual container can consume them later
	InitContainerInjectionStrategy InjectionStrategy = "initContainer"
	// HostPathInjectionStrategy is an injection strategy where we assume that
	// TZif files exists on the node machines, and we can just mount them
	// with hostPath volumes
	HostPathInjectionStrategy InjectionStrategy = "hostPath"
)

Variables

View Source
var (
	True  = true
	False = false
)

Functions

This section is empty.

Types

type InjectionStrategy

type InjectionStrategy string

InjectionStrategy is a method of timezone injection, since there is more than one way how it can be done

type Input

type Input struct {
	ArgNumber  int
	Identifier string
	Reader     io.Reader
}

type Inputs

type Inputs []Input

func ArgumentsToInputs

func ArgumentsToInputs(args []string) (Inputs, error)

type PatchGenerator

type PatchGenerator struct {
	Strategy             InjectionStrategy
	Timezone             string
	InitContainerImage   string
	InitContainerName    string
	InitContainerVerbose bool
	HostPathPrefix       string
	LocalTimePath        string
	CronJobTimeZone      bool
}

func NewPatchGenerator

func NewPatchGenerator() PatchGenerator

func (*PatchGenerator) Generate

func (g *PatchGenerator) Generate(object interface{}, pathprefix string) (patches k8tz.Patches, err error)

type Transformer

type Transformer struct {
	PatchGenerator PatchGenerator
	Inputs         Inputs
	Output         io.Writer
}

func (*Transformer) Transform

func (t *Transformer) Transform() error

Jump to

Keyboard shortcuts

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