Documentation ¶
Index ¶
- func Builder() *builder
- func New(opts ...OptionFunc) *appsv1.DaemonSet
- type OptionFunc
- func AddContainer(c corev1.Container) OptionFunc
- func AddInitContainer(c corev1.Container) OptionFunc
- func AddNodeSelector(k, v string) OptionFunc
- func AddToleration(t corev1.Toleration) OptionFunc
- func NoScheduleOnMaster() OptionFunc
- func WithSpec(spec *appsv1.DaemonSet) OptionFunc
- func WithTemplate(tpl string, data interface{}) OptionFunc
- type Predicate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
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