v1alpha1

package
v1.12.1-RC1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Builder

func Builder() *builder

Builder returns a new instance of builder

func New

func New(opts ...OptionFunc) *appsv1.DaemonSet

New returns a new instance of kubernetes daemonset

Types

type OptionFunc

type OptionFunc func(*daemonset)

OptionFunc is a typed function that abstracts anykind of operation against the provided daemonset instance

This is the basic building block to create functional operations against the daemonset instance

func AddContainer

func AddContainer(c corev1.Container) OptionFunc

AddContainer adds the provided container options as a container to the daemonset

func AddInitContainer

func AddInitContainer(c corev1.Container) OptionFunc

AddInitContainer adds the provided container as an init container to the daemonset

func AddNodeSelector

func AddNodeSelector(k, v string) OptionFunc

AddNodeSelector adds the provided pair as a nodeselector to the daemonset

func AddToleration

func AddToleration(t corev1.Toleration) OptionFunc

AddToleration adds the provided toleration to the daemonset

func NoScheduleOnMaster

func NoScheduleOnMaster() OptionFunc

NoScheduleOnMaster disables scheduling of daemonset pods on kubernetes master node

func WithSpec

func WithSpec(spec *appsv1.DaemonSet) OptionFunc

WithSpec sets the daemonset specifications

func WithTemplate

func WithTemplate(tpl string, data interface{}) OptionFunc

WithTemplate executes the provided template in yaml format and unmarshalls it into daemonset

type Predicate

type Predicate func(*daemonset) (nameOrMsg string, ok bool)

Predicate abstracts conditional logic w.r.t the daemonset instance

NOTE: Predicate is a functional approach versus traditional approach to mix conditions such as *if-else* within blocks of business logic

NOTE: Predicate approach enables clear separation of conditionals from imperatives i.e. actions that form the business logic

Jump to

Keyboard shortcuts

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