// Code generated by applyconfiguration-gen. DO NOT EDIT.

package v1

import (
	configv1 "github.com/openshift/api/config/v1"
)

// NodeSpecApplyConfiguration represents a declarative configuration of the NodeSpec type for use
// with apply.
type NodeSpecApplyConfiguration struct {
	// cgroupMode determines the cgroups version on the node
	CgroupMode *configv1.CgroupMode `json:"cgroupMode,omitempty"`
	// workerLatencyProfile determins the how fast the kubelet is updating
	// the status and corresponding reaction of the cluster
	WorkerLatencyProfile *configv1.WorkerLatencyProfileType `json:"workerLatencyProfile,omitempty"`
	// minimumKubeletVersion is the lowest version of a kubelet that can join the cluster.
	// Specifically, the apiserver will deny most authorization requests of kubelets that are older
	// than the specified version, only allowing the kubelet to get and update its node object, and perform
	// subjectaccessreviews.
	// This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads,
	// and will eventually be marked as not ready.
	// Its max length is 8, so maximum version allowed is either "9.999.99" or "99.99.99".
	// Since the kubelet reports the version of the kubernetes release, not Openshift, this field references
	// the underlying kubernetes version this version of Openshift is based off of.
	// In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then
	// they should set the minimumKubeletVersion to 1.30.0.
	// When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version.
	// Thus, a kubelet with version "1.0.0-ec.0" will be compatible with minimumKubeletVersion "1.0.0" or earlier.
	MinimumKubeletVersion *string `json:"minimumKubeletVersion,omitempty"`
}

// NodeSpecApplyConfiguration constructs a declarative configuration of the NodeSpec type for use with
// apply.
func NodeSpec() *NodeSpecApplyConfiguration {
	return &NodeSpecApplyConfiguration{}
}

// WithCgroupMode sets the CgroupMode field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CgroupMode field is set to the value of the last call.
func (b *NodeSpecApplyConfiguration) WithCgroupMode(value configv1.CgroupMode) *NodeSpecApplyConfiguration {
	b.CgroupMode = &value
	return b
}

// WithWorkerLatencyProfile sets the WorkerLatencyProfile field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the WorkerLatencyProfile field is set to the value of the last call.
func (b *NodeSpecApplyConfiguration) WithWorkerLatencyProfile(value configv1.WorkerLatencyProfileType) *NodeSpecApplyConfiguration {
	b.WorkerLatencyProfile = &value
	return b
}

// WithMinimumKubeletVersion sets the MinimumKubeletVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the MinimumKubeletVersion field is set to the value of the last call.
func (b *NodeSpecApplyConfiguration) WithMinimumKubeletVersion(value string) *NodeSpecApplyConfiguration {
	b.MinimumKubeletVersion = &value
	return b
}
