config

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NTPName = "ntp"
)

Variables

This section is empty.

Functions

func CheckConfigApplied

func CheckConfigApplied(configName string, status nodeconfigv1.NodeConfigStatus) bool

func DisableV2DataEngine added in v0.3.1

func DisableV2DataEngine() error

func EnableV2DataEngine added in v0.3.1

func EnableV2DataEngine() error

func NTPConfigRollback

func NTPConfigRollback() error

Rollback the NTPConfig do not need to any related config and it may called by OnRemove

func NewNTPConfigAppliedCondition

func NewNTPConfigAppliedCondition(status corev1.ConditionStatus) nodeconfigv1.ConfigStatus

func NewNTPConfigModifiedCondition

func NewNTPConfigModifiedCondition(status corev1.ConditionStatus) nodeconfigv1.ConfigStatus

func RemovePersistentNTPConfig

func RemovePersistentNTPConfig() error

func RemovePersistentOEMSettings added in v0.3.1

func RemovePersistentOEMSettings(stageName string) error

func UpdateNTPConfigApplied

func UpdateNTPConfigApplied(nodecfgctl ctlv1.NodeConfigController, nodecfg *nodeconfigv1.NodeConfig) (*nodeconfigv1.NodeConfig, error)

conds: ConfigModified : False + ConfigApplied : True

func UpdateNTPConfigChanged

func UpdateNTPConfigChanged(nodecfgctl ctlv1.NodeConfigController, nodecfg *nodeconfigv1.NodeConfig) (*nodeconfigv1.NodeConfig, error)

conds: ConfigModified : True + ConfigApplied : False

func UpdatePersistentOEMSettings added in v0.3.1

func UpdatePersistentOEMSettings(stage schema.Stage) error

Types

type NTPConfigTemplate

type NTPConfigTemplate struct {
	NTPConfigKeyValuePairs map[string]string
}

type NTPHandler

type NTPHandler struct {
	NTPConfig      *nodeconfigv1.NTPConfig
	AppliedConfigs string // AppliedConfigs is a json format string, you should unmarshal it to AppliedConfigAnnotation
	NodeClient     ctlnode.NodeClient
	ConfName       string
	// contains filtered or unexported fields
}

func NewNTPConfigHandler

func NewNTPConfigHandler(mtx *sync.Mutex, nodes ctlnode.NodeController, confName string, ntpconfigs *nodeconfigv1.NTPConfig, appliedConfig string) *NTPHandler

func (*NTPHandler) DoNTPUpdate

func (handler *NTPHandler) DoNTPUpdate(forceUpdate bool) (bool, error)

DoNTPUpdate will backup and update NTP to system, return bool for restart service and generic error

func (*NTPHandler) RestartService

func (handler *NTPHandler) RestartService() error

func (*NTPHandler) UpdateNTPConfigPersistence

func (handler *NTPHandler) UpdateNTPConfigPersistence() error

make NTP configuration persistence, using 99_settings.yaml to make sure we are later than 99_oem.yaml

func (*NTPHandler) UpdateNodeNTPAnnotation

func (handler *NTPHandler) UpdateNodeNTPAnnotation() error

type NTPStatusAnnotation

type NTPStatusAnnotation utils.NTPStatusAnnotation

Jump to

Keyboard shortcuts

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