v1alpha1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyOneAgentDefaults

func ApplyOneAgentDefaults(ds *appsv1.DaemonSet, cr *api.OneAgent)

applyOneAgentDefaults initializes a bare DaemonSet object with default values

func ApplyOneAgentSettings

func ApplyOneAgentSettings(ds *appsv1.DaemonSet, cr *api.OneAgent)

applyOneAgentSettings applies the properties given by a OneAgent custom resource object to a DaemonSet object

func CopyDaemonSetSpecToOneAgentSpec

func CopyDaemonSetSpecToOneAgentSpec(ds *appsv1.DaemonSetSpec, cr *api.OneAgentSpec)

copyDaemonSetSpecToOneAgentSpec extracts essential data from a DaemonSetSpec into a OneAgentSpec

Reference types in custom resource spec need to be reset to nil in case its value is missing in the daemonset as well.

func GetPodsToRestart

func GetPodsToRestart(pods []corev1.Pod, dtc dtclient.Client, oneagent *api.OneAgent) ([]corev1.Pod, map[string]api.OneAgentInstance)

getPodsToRestart determines if a pod needs to be restarted in order to get the desired agent version Returns an array of pods and an array of OneAgentInstance objects for status update

func HasSpecChanged

func HasSpecChanged(dsSpec *appsv1.DaemonSetSpec, crSpec *api.OneAgentSpec) bool

hasSpecChanged compares essential OneAgent custom resource settings with the actual settings in the DaemonSet object

actualSpec gets initialized with values from the custom resource and updated with values from the actual settings from the daemonset.

func Validate

func Validate(oa *api.OneAgent) error

Validate sanity checks if essential fields in the custom resource are available

Return an error in the following conditions - ApiUrl empty

Types

This section is empty.

Jump to

Keyboard shortcuts

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