v1beta1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MinerControllerDefaultLockObjectNamespace defines default miner controller lock object namespace ("kube-system").
	MinerControllerDefaultLockObjectNamespace string = metav1.NamespaceSystem

	// MinerControllerDefaultLockObjectName defines default miner controller lock object name ("onex-miner-controller").
	MinerControllerDefaultLockObjectName = "onex-miner-controller"
)
View Source
const GroupName = "minercontroller.config.onex.io"

GroupName is the group name used in this package.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs)

	// AddToScheme is a global function that registers this API group & version to a scheme.
	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}

SchemeGroupVersion is group version used to register these objects.

Functions

func Convert_config_MinerControllerConfiguration_To_v1beta1_MinerControllerConfiguration

func Convert_config_MinerControllerConfiguration_To_v1beta1_MinerControllerConfiguration(in *config.MinerControllerConfiguration, out *MinerControllerConfiguration, s conversion.Scope) error

Convert_config_MinerControllerConfiguration_To_v1beta1_MinerControllerConfiguration is an autogenerated conversion function.

func Convert_config_MinerProfile_To_v1beta1_MinerProfile

func Convert_config_MinerProfile_To_v1beta1_MinerProfile(in *config.MinerProfile, out *MinerProfile, s conversion.Scope) error

Convert_config_MinerProfile_To_v1beta1_MinerProfile is an autogenerated conversion function.

func Convert_v1beta1_MinerControllerConfiguration_To_config_MinerControllerConfiguration

func Convert_v1beta1_MinerControllerConfiguration_To_config_MinerControllerConfiguration(in *MinerControllerConfiguration, out *config.MinerControllerConfiguration, s conversion.Scope) error

Convert_v1beta1_MinerControllerConfiguration_To_config_MinerControllerConfiguration is an autogenerated conversion function.

func Convert_v1beta1_MinerProfile_To_config_MinerProfile

func Convert_v1beta1_MinerProfile_To_config_MinerProfile(in *MinerProfile, out *config.MinerProfile, s conversion.Scope) error

Convert_v1beta1_MinerProfile_To_config_MinerProfile is an autogenerated conversion function.

func RegisterConversions

func RegisterConversions(s *runtime.Scheme) error

RegisterConversions adds conversion functions to the given scheme. Public to allow building arbitrary schemes.

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func SetDefaults_MinerControllerConfiguration

func SetDefaults_MinerControllerConfiguration(obj *MinerControllerConfiguration)

SetDefaults_MinerControllerConfiguration sets additional defaults.

func SetObjectDefaults_MinerControllerConfiguration

func SetObjectDefaults_MinerControllerConfiguration(in *MinerControllerConfiguration)

Types

type MinerControllerConfiguration

type MinerControllerConfiguration struct {
	// TypeMeta contains the API version and kind.
	metav1.TypeMeta `json:",inline"`

	// FeatureGates is a map of feature names to bools that enable or disable alpha/experimental features.
	FeatureGates map[string]bool `json:"featureGates,omitempty"`

	// Parallelism defines the amount of parallelism to process miners. Must be greater than 0. Defaults to 16
	Parallelism int32 `json:"parallelism,omitempty"`

	// DryRun tells if the dry run mode is enabled, do not create an actual miner pod,
	// but directly set the miner status to Running.
	// If DryRun is set to true, the DryRun mode will be prioritized.
	// +optional
	DryRun bool `json:"dryRun,omitempty"`

	// Path to miner provider kubeconfig file with authorization and master location information.
	// +optional
	ProviderKubeconfig string `json:"providerKubeconfig,omitempty"`

	// Create miner pod in the cluster where miner controller is located.
	// +optional
	InCluster bool `json:"inCluster,omitempty"`

	// SyncPeriod determines the minimum frequency at which watched resources are
	// reconciled. A lower period will correct entropy more quickly, but reduce
	// responsiveness to change if there are many watched resources. Change this
	// value only if you know what you are doing. Defaults to 10 hours if unset.
	SyncPeriod metav1.Duration `json:"syncPeriod,omitempty"`

	// Label value that the controller watches to reconcile cloud miner objects.
	// Label key is always %s. If unspecified, the controller watches for allcluster-api objects.
	WatchFilterValue string `json:"watchFilterValue,omitempty"`

	// leaderElection defines the configuration of leader election client.
	LeaderElection componentbaseconfigv1alpha1.LeaderElectionConfiguration `json:"leaderElection,omitempty"`

	// Namespace that the controller watches to reconcile onex-apiserver objects.
	// If unspecified, the controller watches for onex-apiserver objects across all namespaces
	Namespace string `json:"namespace,omitempty"`

	// MetricsBindAddress is the IP address and port for the metrics server to serve on,
	// defaulting to 127.0.0.1:20249 (set to 0.0.0.0 for all interfaces)
	MetricsBindAddress string `json:"metricsBindAddress,omitempty"`

	// HealthzBindAddress is the IP address and port for the health check server to serve on,
	// defaulting to 0.0.0.0:20250
	HealthzBindAddress string `json:"healthzBindAddress,omitempty"`

	// Types specifies the configuration of the cloud mining machine.
	Types map[string]MinerProfile `json:"types,omitempty"`

	// Redis defines the configuration of redis client.
	Redis genericconfigv1beta1.RedisConfiguration `json:"redis,omitempty"`
}

MinerControllerConfiguration configures a scheduler.

func (*MinerControllerConfiguration) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinerControllerConfiguration.

func (*MinerControllerConfiguration) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MinerControllerConfiguration) DeepCopyObject

func (in *MinerControllerConfiguration) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MinerProfile

type MinerProfile struct {
	CPU              resource.Quantity `json:"cpu,omitempty"`
	Memory           resource.Quantity `json:"memory,omitempty"`
	MiningDifficulty int               `json:"miningDifficulty,omitempty"`
}

func (*MinerProfile) DeepCopy

func (in *MinerProfile) DeepCopy() *MinerProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinerProfile.

func (*MinerProfile) DeepCopyInto

func (in *MinerProfile) DeepCopyInto(out *MinerProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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