Documentation ¶
Index ¶
- func ApplyOneAgentDefaults(ds *appsv1.DaemonSet, cr *api.OneAgent)
- func ApplyOneAgentSettings(ds *appsv1.DaemonSet, cr *api.OneAgent)
- func CopyDaemonSetSpecToOneAgentSpec(ds *appsv1.DaemonSetSpec, cr *api.OneAgentSpec)
- func GetPodsToRestart(pods []corev1.Pod, dtc dtclient.Client, oneagent *api.OneAgent) ([]corev1.Pod, map[string]api.OneAgentInstance)
- func HasSpecChanged(dsSpec *appsv1.DaemonSetSpec, crSpec *api.OneAgentSpec) bool
- func Validate(oa *api.OneAgent) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyOneAgentDefaults ¶
applyOneAgentDefaults initializes a bare DaemonSet object with default values
func ApplyOneAgentSettings ¶
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.
Types ¶
This section is empty.