Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the apps v1 API group +kubebuilder:object:generate=true +groupName=apps.k8s.nibiru.org
Index ¶
- Constants
- Variables
- func SetupChainNodeSetValidationWebhook(mgr ctrl.Manager) error
- func SetupChainNodeValidationWebhook(mgr ctrl.Manager) error
- type AccountAssets
- type AppSpec
- func (in *AppSpec) DeepCopy() *AppSpec
- func (in *AppSpec) DeepCopyInto(out *AppSpec)
- func (app *AppSpec) GetImage() string
- func (app *AppSpec) GetImagePullPolicy() corev1.PullPolicy
- func (app *AppSpec) GetImageVersion() string
- func (app *AppSpec) GetSdkVersion() SdkVersion
- func (app *AppSpec) ShouldQueryGovUpgrades() bool
- type ChainNode
- func (chainNode *ChainNode) AutoDiscoverPeersEnabled() bool
- func (in *ChainNode) DeepCopy() *ChainNode
- func (in *ChainNode) DeepCopyInto(out *ChainNode)
- func (in *ChainNode) DeepCopyObject() runtime.Object
- func (chainNode *ChainNode) Equal(n *ChainNode) bool
- func (chainNode *ChainNode) GetAdditionalRunFlags() []string
- func (chainNode *ChainNode) GetAppImage() string
- func (chainNode *ChainNode) GetAppImageWithVersion(version string) string
- func (chainNode *ChainNode) GetAppVersion() string
- func (chainNode *ChainNode) GetLastUpgradeHeight() int64
- func (chainNode *ChainNode) GetLatestAppImage() string
- func (chainNode *ChainNode) GetLatestVersion() string
- func (chainNode *ChainNode) GetMoniker() string
- func (chainNode *ChainNode) GetNamespacedName() string
- func (chainNode *ChainNode) GetNodeFQDN() string
- func (chainNode *ChainNode) GetPersistenceAutoResizeEnabled() bool
- func (chainNode *ChainNode) GetPersistenceAutoResizeIncrement() string
- func (chainNode *ChainNode) GetPersistenceAutoResizeMaxSize() string
- func (chainNode *ChainNode) GetPersistenceAutoResizeThreshold() int
- func (chainNode *ChainNode) GetPersistenceInitCommands() []InitCommand
- func (chainNode *ChainNode) GetPersistenceInitTimeout() time.Duration
- func (chainNode *ChainNode) GetPersistenceSize() string
- func (chainNode *ChainNode) GetPersistenceStorageClass() *string
- func (chainNode *ChainNode) GetReconcilePeriod() time.Duration
- func (chainNode *ChainNode) IsValidator() bool
- func (chainNode *ChainNode) MustStop() (bool, string)
- func (chainNode *ChainNode) RequiresAccount() bool
- func (chainNode *ChainNode) RequiresPrivKey() bool
- func (chainNode *ChainNode) ShouldCreateValidator() bool
- func (chainNode *ChainNode) ShouldIgnoreGroupOnDisruption() bool
- func (chainNode *ChainNode) ShouldInitGenesis() bool
- func (chainNode *ChainNode) ShouldRestoreFromSnapshot() bool
- func (chainNode *ChainNode) ShouldUploadVaultKey() bool
- func (chainNode *ChainNode) SnapshotsEnabled() bool
- func (chainNode *ChainNode) StateSyncRestoreEnabled() bool
- func (chainNode *ChainNode) UsesTmKms() bool
- func (chainNode *ChainNode) Validate(old *ChainNode) (admission.Warnings, error)
- func (chainNode *ChainNode) ValidateCreate() (warnings admission.Warnings, err error)
- func (chainNode *ChainNode) ValidateDelete() (warnings admission.Warnings, err error)
- func (chainNode *ChainNode) ValidateUpdate(old runtime.Object) (warnings admission.Warnings, err error)
- type ChainNodeAssets
- type ChainNodeList
- type ChainNodePhase
- type ChainNodeSet
- func (in *ChainNodeSet) DeepCopy() *ChainNodeSet
- func (in *ChainNodeSet) DeepCopyInto(out *ChainNodeSet)
- func (in *ChainNodeSet) DeepCopyObject() runtime.Object
- func (nodeSet *ChainNodeSet) GetAppSpecWithUpgrades() AppSpec
- func (nodeSet *ChainNodeSet) GetLastUpgradeVersion() string
- func (nodeSet *ChainNodeSet) GetNamespacedName() string
- func (nodeSet *ChainNodeSet) GetValidatorMinimumGasPrices() string
- func (nodeSet *ChainNodeSet) HasValidator() bool
- func (nodeSet *ChainNodeSet) RollingUpdatesEnabled() bool
- func (nodeSet *ChainNodeSet) ShouldInitGenesis() bool
- func (nodeSet *ChainNodeSet) Validate(old *ChainNodeSet) (admission.Warnings, error)
- func (nodeSet *ChainNodeSet) ValidateCreate() (warnings admission.Warnings, err error)
- func (nodeSet *ChainNodeSet) ValidateDelete() (warnings admission.Warnings, err error)
- func (nodeSet *ChainNodeSet) ValidateUpdate(old runtime.Object) (warnings admission.Warnings, err error)
- type ChainNodeSetList
- type ChainNodeSetNodeStatus
- type ChainNodeSetPhase
- type ChainNodeSetSpec
- type ChainNodeSetStatus
- type ChainNodeSpec
- type ChainNodeStatus
- type Config
- func (cfg *Config) CosmoGuardEnabled() bool
- func (in *Config) DeepCopy() *Config
- func (in *Config) DeepCopyInto(out *Config)
- func (cfg *Config) GetBlockThreshold() string
- func (cfg *Config) GetCosmoGuardConfig() *corev1.ConfigMapKeySelector
- func (cfg *Config) GetCosmoGuardResources() corev1.ResourceRequirements
- func (cfg *Config) GetEnv() []corev1.EnvVar
- func (cfg *Config) GetHaltHeight() int64
- func (cfg *Config) GetNodeUtilsLogLevel() string
- func (cfg *Config) GetNodeUtilsResources() corev1.ResourceRequirements
- func (cfg *Config) GetSidecarImagePullPolicy(name string) corev1.PullPolicy
- func (cfg *Config) GetStartupTime() time.Duration
- func (cfg *Config) GetTerminationGracePeriodSeconds() *int64
- func (cfg *Config) IsEvmEnabled() bool
- func (cfg *Config) SeedModeEnabled() bool
- func (cfg *Config) ShouldIgnoreSyncing() bool
- func (cfg *Config) ShouldPersistAddressBook() bool
- func (cfg *Config) ShouldRestartPodOnCosmoGuardFailure() bool
- func (cfg *Config) UseDashedConfigToml() bool
- type CosmoGuardConfig
- type CreateValidatorConfig
- type ExportTarballConfig
- type ExposeConfig
- type FromNodeRPCConfig
- type GcsExportConfig
- func (in *GcsExportConfig) DeepCopy() *GcsExportConfig
- func (in *GcsExportConfig) DeepCopyInto(out *GcsExportConfig)
- func (gcs *GcsExportConfig) GetBufferSize() string
- func (gcs *GcsExportConfig) GetChunkSize() string
- func (gcs *GcsExportConfig) GetConcurrentJobs() int
- func (gcs *GcsExportConfig) GetPartSize() string
- func (gcs *GcsExportConfig) GetSizeLimit() string
- type GenesisConfig
- func (in *GenesisConfig) DeepCopy() *GenesisConfig
- func (in *GenesisConfig) DeepCopyInto(out *GenesisConfig)
- func (g *GenesisConfig) GetConfigMapName(chainID string) string
- func (g *GenesisConfig) HasConfigMapSource() bool
- func (g *GenesisConfig) ShouldDownloadUsingContainer() bool
- func (g *GenesisConfig) ShouldUseDataVolume() bool
- type GenesisInitConfig
- type GlobalIngressConfig
- func (in *GlobalIngressConfig) DeepCopy() *GlobalIngressConfig
- func (in *GlobalIngressConfig) DeepCopyInto(out *GlobalIngressConfig)
- func (gi *GlobalIngressConfig) GetGrpcName(owner client.Object) string
- func (gi *GlobalIngressConfig) GetName(owner client.Object) string
- func (gi *GlobalIngressConfig) GetTlsSecretName(owner client.Object) string
- func (gi *GlobalIngressConfig) HasGroup(name string) bool
- func (gi *GlobalIngressConfig) ShouldUseCosmoGuardPorts(nodeSet *ChainNodeSet) bool
- type IngressConfig
- type InitCommand
- type LimitSource
- type LimitUpdateStrategy
- type NodeGroupSpec
- func (in *NodeGroupSpec) DeepCopy() *NodeGroupSpec
- func (in *NodeGroupSpec) DeepCopyInto(out *NodeGroupSpec)
- func (group *NodeGroupSpec) GetIngressSecretName(owner client.Object) string
- func (group *NodeGroupSpec) GetInstances() int
- func (group *NodeGroupSpec) GetPdbMinAvailable() int
- func (group *NodeGroupSpec) GetServiceName(owner client.Object) string
- func (group *NodeGroupSpec) HasPdbEnabled() bool
- func (group *NodeGroupSpec) ShouldInheritValidatorGasPrice() bool
- type NodeSetValidatorConfig
- func (in *NodeSetValidatorConfig) DeepCopy() *NodeSetValidatorConfig
- func (in *NodeSetValidatorConfig) DeepCopyInto(out *NodeSetValidatorConfig)
- func (val *NodeSetValidatorConfig) GetAccountHDPath() string
- func (val *NodeSetValidatorConfig) GetAccountPrefix() string
- func (val *NodeSetValidatorConfig) GetAccountSecretName(obj client.Object) string
- func (val *NodeSetValidatorConfig) GetInitUnbondingTime() string
- func (val *NodeSetValidatorConfig) GetInitVotingPeriod() string
- func (val *NodeSetValidatorConfig) GetPdbMinAvailable() int
- func (val *NodeSetValidatorConfig) GetPrivKeySecretName(obj client.Object) string
- func (val *NodeSetValidatorConfig) GetValPrefix() string
- func (val *NodeSetValidatorConfig) HasPdbEnabled() bool
- type PdbConfig
- type Peer
- type Persistence
- type PvcSnapshot
- type ScalingDirection
- type SdkVersion
- type SidecarSpec
- type StateSyncConfig
- type TmKMS
- type TmKmsHashicorpProvider
- type TmKmsKeyFormat
- type TmKmsProvider
- type Upgrade
- type UpgradePhase
- type UpgradeSource
- type UpgradeSpec
- type ValidatorConfig
- func (in *ValidatorConfig) DeepCopy() *ValidatorConfig
- func (in *ValidatorConfig) DeepCopyInto(out *ValidatorConfig)
- func (val *ValidatorConfig) GetAccountHDPath() string
- func (val *ValidatorConfig) GetAccountPrefix() string
- func (val *ValidatorConfig) GetAccountSecretName(obj client.Object) string
- func (val *ValidatorConfig) GetCommissionMaxChangeRate() string
- func (val *ValidatorConfig) GetCommissionMaxRate() string
- func (val *ValidatorConfig) GetCommissionRate() string
- func (val *ValidatorConfig) GetInitUnbondingTime() string
- func (val *ValidatorConfig) GetInitVotingPeriod() string
- func (val *ValidatorConfig) GetMinSelfDelegation() *string
- func (val *ValidatorConfig) GetPrivKeySecretName(obj client.Object) string
- func (val *ValidatorConfig) GetValPrefix() string
- type ValidatorInfo
- type ValidatorStatus
- type VerticalAutoscalingConfig
- type VerticalAutoscalingMetricConfig
- func (in *VerticalAutoscalingMetricConfig) DeepCopy() *VerticalAutoscalingMetricConfig
- func (in *VerticalAutoscalingMetricConfig) DeepCopyInto(out *VerticalAutoscalingMetricConfig)
- func (vpam *VerticalAutoscalingMetricConfig) GetCooldownDuration() time.Duration
- func (vpam *VerticalAutoscalingMetricConfig) GetLimitPercentage() int
- func (vpam *VerticalAutoscalingMetricConfig) GetLimitUpdateStrategy() LimitUpdateStrategy
- func (vpam *VerticalAutoscalingMetricConfig) GetSource() LimitSource
- type VerticalAutoscalingRule
- type VolumeSnapshotsConfig
- func (in *VolumeSnapshotsConfig) DeepCopy() *VolumeSnapshotsConfig
- func (in *VolumeSnapshotsConfig) DeepCopyInto(out *VolumeSnapshotsConfig)
- func (s *VolumeSnapshotsConfig) ShouldDisableWhileSyncing() bool
- func (s *VolumeSnapshotsConfig) ShouldExportTarballs() bool
- func (s *VolumeSnapshotsConfig) ShouldStopNode() bool
- func (s *VolumeSnapshotsConfig) ShouldVerify() bool
- type VolumeSpec
Constants ¶
const ( DefaultPersistenceSize = "50Gi" DefaultAutoResize = true DefaultAutoResizeThreshold = 80 DefaultAutoResizeIncrement = "50Gi" DefaultAutoResizeMaxSize = "2Ti" )
const ( ConditionUpgrade = "Upgrade" ReasonUpgradeSuccess = "UpgradeSuccessful" )
const ( DefaultReconcilePeriod = 15 * time.Second DefaultImageVersion = "latest" DefaultBlockThreshold = "15s" DefaultStartupTime = time.Hour DefaultNodeUtilsLogLevel = "info" DefaultP2pExpose = false DefaultP2pServiceType = corev1.ServiceTypeNodePort DefaultUnbondingTime = "1814400s" DefaultVotingPeriod = "120h" DefaultHDPath = "m/44'/118'/0'/0/0" DefaultAccountPrefix = "nibi" DefaultValPrefix = "nibivaloper" DefaultP2pPort = 26656 DefaultStateSyncKeepRecent = 2 DefaultSdkVersion = V0_47 DefaultCommissionMaxChangeRate = "0.1" DefaultCommissionMaxRate = "0.1" DefaultCommissionRate = "0.1" DefaultMinimumSelfDelegation = "1" DefaultNodeUtilsCPU = "300m" DefaultNodeUtilsMemory = "100Mi" DefaultCosmoGuardCPU = "200m" DefaultCosmoGuardMemory = "250Mi" DefaultVpaCooldown = 5 * time.Minute DefaultLimitPercentage = 150 )
const ( ReasonPvcResized = "PvcResized" ReasonPvcMaxReached = "PvcMaxSizeReached" ReasonDataInitialized = "DataInitialized" ReasonNodeKeyCreated = "NodeKeyCreated" ReasonNodeKeyImported = "NodeKeyImported" ReasonPrivateKeyCreated = "PrivateKeyCreated" ReasonPrivateKeyImported = "PrivateKeyImported" ReasonAccountCreated = "AccountCreated" ReasonAccountImported = "AccountImported" ReasonGenesisInitialized = "GenesisCreated" ReasonGenesisImported = "GenesisImported" ReasonConfigsCreated = "ConfigsCreated" ReasonConfigsUpdated = "ConfigsUpdated" ReasonNodeStarted = "NodeStarted" ReasonNodeRestarted = "NodeRestarted" ReasonNodeError = "NodeError" ReasonNodeSyncing = "NodeSyncing" ReasonNodeRunning = "NodeRunning" ReasonValidatorJailed = "ValidatorJailed" ReasonValidatorUnjailed = "ValidatorUnjailed" ReasonNodeCreated = "NodeCreated" ReasonNodeUpdated = "NodeUpdated" ReasonNodeDeleted = "NodeDeleted" ReasonInitGenesisFailure = "InitGenesisFail" ReasonUploadFailure = "UploadFailed" ReasonGenesisError = "GenesisError" ReasonNoTrustHeight = "NoTrustHeight" ReasonNoPeers = "NoPeers" ReasonStartedSnapshot = "SnapshotStarted" ReasonFinishedSnapshot = "SnapshotFinished" ReasonDeletedSnapshot = "SnapshotDeleted" ReasonTarballExportStart = "ExportingTarball" ReasonTarballExportFinish = "TarballFinished" ReasonTarballDeleted = "TarballDeleted" ReasonTarballExportError = "TarballExportError" ReasonSnapshotIntegrityStart = "IntegrityCheckStart" ReasonUpgradeCompleted = "UpgradeCompleted" ReasonUpgradeFailed = "UpgradeFailed" ReasonUpgradeMissingData = "UpgradeMissingData" ReasonCreateValidatorFailure = "FailedCreateValidator" ReasonCreateValidatorSuccess = "CreateValidatorSuccess" ReasonInvalid = "Invalid" ReasonVPAScaleUp = "VPAScaleUp" ReasonVPAScaleDown = "VPAScaleDown" )
Reasons for events
const ( // ValidatorStatusBonded indicates that validator is bonded and in the validator set. ValidatorStatusBonded = "bonded" // ValidatorStatusUnbonded indicates that validator is unbonded. ValidatorStatusUnbonded = "unbonded" // ValidatorStatusUnbonding indicates that validator is unbonding. ValidatorStatusUnbonding = "unbonding" // ValidatorStatusUnknown indicates that validator status is unknown. ValidatorStatusUnknown = "unknown" )
const (
DefaultGroupInstances = 1
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "apps.k8s.nibiru.org", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
Types ¶
type AccountAssets ¶
type AccountAssets struct {
// Address of the account.
Address string `json:"address"`
// Assets assigned to this account.
Assets []string `json:"assets"`
}
AccountAssets represents the assets associated with an account.
func (*AccountAssets) DeepCopy ¶
func (in *AccountAssets) DeepCopy() *AccountAssets
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountAssets.
func (*AccountAssets) DeepCopyInto ¶
func (in *AccountAssets) DeepCopyInto(out *AccountAssets)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AppSpec ¶
type AppSpec struct {
// Container image to be used.
// +kubebuilder:validation:MinLength=1
Image string `json:"image"`
// Image tag to be used. Once there are completed or skipped upgrades this will be ignored.
// For a new node that will be state-synced, this will be the version used during state-sync. Only after
// that, the cosmopilot will switch to the version of last upgrade.
// Defaults to `latest`.
// +optional
// +default="latest"
Version *string `json:"version,omitempty"`
// Indicates the desired pull policy when creating nodes. Defaults to `Always` if `version`
// is `latest` and `IfNotPresent` otherwise.
// +optional
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
// Binary name of the application to be run.
// +kubebuilder:validation:MinLength=1
App string `json:"app"`
// SdkVersion specifies the version of cosmos-sdk used by this app.
// Valid options are:
// - "v0.47" (default)
// - "v0.45"
// +optional
// +default="v0.47"
SdkVersion *SdkVersion `json:"sdkVersion,omitempty"`
// Whether cosmopilot should query gov proposals to find and schedule upgrades.
// Defaults to `true`.
// +optional
// +default=true
CheckGovUpgrades *bool `json:"checkGovUpgrades,omitempty"`
// List of upgrades to schedule for this node.
// +optional
Upgrades []UpgradeSpec `json:"upgrades,omitempty"`
}
AppSpec specifies the source image, version and binary name of the app to run. Also allows specifying upgrades for the app and enabling automatic check of upgrade proposals on chain.
func (*AppSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppSpec.
func (*AppSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AppSpec) GetImagePullPolicy ¶
func (app *AppSpec) GetImagePullPolicy() corev1.PullPolicy
GetImagePullPolicy returns the pull policy to be used for the app image
func (*AppSpec) GetImageVersion ¶
GetImageVersion returns the image version to be used
func (*AppSpec) GetSdkVersion ¶
func (app *AppSpec) GetSdkVersion() SdkVersion
func (*AppSpec) ShouldQueryGovUpgrades ¶
type ChainNode ¶
type ChainNode struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ChainNodeSpec `json:"spec,omitempty"`
Status ChainNodeStatus `json:"status,omitempty"`
}
ChainNode is the Schema for the chainnodes API.
func (*ChainNode) AutoDiscoverPeersEnabled ¶
func (*ChainNode) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainNode.
func (*ChainNode) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChainNode) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ChainNode) GetAdditionalRunFlags ¶
func (*ChainNode) GetAppImage ¶
func (*ChainNode) GetAppImageWithVersion ¶
func (*ChainNode) GetAppVersion ¶
func (*ChainNode) GetLastUpgradeHeight ¶
func (*ChainNode) GetLatestAppImage ¶
func (*ChainNode) GetLatestVersion ¶
func (*ChainNode) GetMoniker ¶
func (*ChainNode) GetNamespacedName ¶
func (*ChainNode) GetNodeFQDN ¶
func (*ChainNode) GetPersistenceAutoResizeEnabled ¶
func (*ChainNode) GetPersistenceAutoResizeIncrement ¶
func (*ChainNode) GetPersistenceAutoResizeMaxSize ¶
func (*ChainNode) GetPersistenceAutoResizeThreshold ¶
func (*ChainNode) GetPersistenceInitCommands ¶
func (chainNode *ChainNode) GetPersistenceInitCommands() []InitCommand
func (*ChainNode) GetPersistenceInitTimeout ¶
func (*ChainNode) GetPersistenceSize ¶
func (*ChainNode) GetPersistenceStorageClass ¶
GetPersistenceStorageClass returns the configured storage class to be used in pvc, or nil if not specified.
func (*ChainNode) GetReconcilePeriod ¶
func (*ChainNode) IsValidator ¶
func (*ChainNode) RequiresAccount ¶
func (*ChainNode) RequiresPrivKey ¶
func (*ChainNode) ShouldCreateValidator ¶
func (*ChainNode) ShouldIgnoreGroupOnDisruption ¶ added in v1.39.0
func (*ChainNode) ShouldInitGenesis ¶
func (*ChainNode) ShouldRestoreFromSnapshot ¶
func (*ChainNode) ShouldUploadVaultKey ¶
func (*ChainNode) SnapshotsEnabled ¶
func (*ChainNode) StateSyncRestoreEnabled ¶
func (*ChainNode) ValidateCreate ¶
func (*ChainNode) ValidateDelete ¶
type ChainNodeAssets ¶
type ChainNodeAssets struct {
// Name of the ChainNode.
ChainNode string `json:"chainNode"`
// Assets assigned to this account.
Assets []string `json:"assets"`
}
ChainNodeAssets represents the assets associated with an account from another ChainNode.
func (*ChainNodeAssets) DeepCopy ¶
func (in *ChainNodeAssets) DeepCopy() *ChainNodeAssets
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainNodeAssets.
func (*ChainNodeAssets) DeepCopyInto ¶
func (in *ChainNodeAssets) DeepCopyInto(out *ChainNodeAssets)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChainNodeList ¶
type ChainNodeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ChainNode `json:"items"`
}
ChainNodeList contains a list of ChainNode.
func (*ChainNodeList) DeepCopy ¶
func (in *ChainNodeList) DeepCopy() *ChainNodeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainNodeList.
func (*ChainNodeList) DeepCopyInto ¶
func (in *ChainNodeList) DeepCopyInto(out *ChainNodeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChainNodeList) DeepCopyObject ¶
func (in *ChainNodeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ChainNodePhase ¶
type ChainNodePhase string
ChainNodePhase is a label for the condition of a node at the current time.
const ( PhaseChainNodeInitData ChainNodePhase = "InitializingData" PhaseChainNodeInitGenesis ChainNodePhase = "InitGenesis" PhaseChainNodeStarting ChainNodePhase = "Starting" PhaseChainNodeRunning ChainNodePhase = "Running" PhaseChainNodeSyncing ChainNodePhase = "Syncing" PhaseChainNodeRestarting ChainNodePhase = "Restarting" PhaseChainNodeStopped ChainNodePhase = "Stopped" PhaseChainNodeError ChainNodePhase = "Error" PhaseChainNodeSnapshotting ChainNodePhase = "Snapshotting" PhaseChainNodeUpgrading ChainNodePhase = "Upgrading" )
These are the valid phases for ChainNodes.
type ChainNodeSet ¶
type ChainNodeSet struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ChainNodeSetSpec `json:"spec,omitempty"`
Status ChainNodeSetStatus `json:"status,omitempty"`
}
ChainNodeSet is the Schema for the chainnodesets API.
func (*ChainNodeSet) DeepCopy ¶
func (in *ChainNodeSet) DeepCopy() *ChainNodeSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainNodeSet.
func (*ChainNodeSet) DeepCopyInto ¶
func (in *ChainNodeSet) DeepCopyInto(out *ChainNodeSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChainNodeSet) DeepCopyObject ¶
func (in *ChainNodeSet) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ChainNodeSet) GetAppSpecWithUpgrades ¶
func (nodeSet *ChainNodeSet) GetAppSpecWithUpgrades() AppSpec
func (*ChainNodeSet) GetLastUpgradeVersion ¶
func (nodeSet *ChainNodeSet) GetLastUpgradeVersion() string
func (*ChainNodeSet) GetNamespacedName ¶
func (nodeSet *ChainNodeSet) GetNamespacedName() string
func (*ChainNodeSet) GetValidatorMinimumGasPrices ¶
func (nodeSet *ChainNodeSet) GetValidatorMinimumGasPrices() string
func (*ChainNodeSet) HasValidator ¶
func (nodeSet *ChainNodeSet) HasValidator() bool
func (*ChainNodeSet) RollingUpdatesEnabled ¶
func (nodeSet *ChainNodeSet) RollingUpdatesEnabled() bool
func (*ChainNodeSet) ShouldInitGenesis ¶
func (nodeSet *ChainNodeSet) ShouldInitGenesis() bool
func (*ChainNodeSet) Validate ¶
func (nodeSet *ChainNodeSet) Validate(old *ChainNodeSet) (admission.Warnings, error)
func (*ChainNodeSet) ValidateCreate ¶
func (nodeSet *ChainNodeSet) ValidateCreate() (warnings admission.Warnings, err error)
func (*ChainNodeSet) ValidateDelete ¶
func (nodeSet *ChainNodeSet) ValidateDelete() (warnings admission.Warnings, err error)
func (*ChainNodeSet) ValidateUpdate ¶
type ChainNodeSetList ¶
type ChainNodeSetList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ChainNodeSet `json:"items"`
}
ChainNodeSetList contains a list of ChainNodeSet.
func (*ChainNodeSetList) DeepCopy ¶
func (in *ChainNodeSetList) DeepCopy() *ChainNodeSetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainNodeSetList.
func (*ChainNodeSetList) DeepCopyInto ¶
func (in *ChainNodeSetList) DeepCopyInto(out *ChainNodeSetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChainNodeSetList) DeepCopyObject ¶
func (in *ChainNodeSetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ChainNodeSetNodeStatus ¶
type ChainNodeSetNodeStatus struct {
// Name of the node.
Name string `json:"name"`
// Whether this node can be accessed publicly.
Public bool `json:"public"`
// Indicates if this node is running in seed mode.
Seed bool `json:"seed"`
// ID of this node.
ID string `json:"id"`
// Hostname or IP address to reach this node internally.
Address string `json:"address"`
// Hostname or IP address to reach this node publicly.
// +optional
PublicAddress string `json:"publicAddress,omitempty"`
// Port to reach this node publicly.
// +optional
PublicPort int `json:"publicPort,omitempty"`
// P2P port for connecting to this node.
Port int `json:"port"`
// Group to which this ChainNode belongs.
// +optional
Group string `json:"group,omitempty"`
}
ChainNodeSetNodeStatus contains information about a node running on this ChainNodeSet.
func (*ChainNodeSetNodeStatus) DeepCopy ¶
func (in *ChainNodeSetNodeStatus) DeepCopy() *ChainNodeSetNodeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainNodeSetNodeStatus.
func (*ChainNodeSetNodeStatus) DeepCopyInto ¶
func (in *ChainNodeSetNodeStatus) DeepCopyInto(out *ChainNodeSetNodeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChainNodeSetPhase ¶
type ChainNodeSetPhase string
ChainNodeSetPhase is a label for the condition of a nodeset at the current time.
const ( PhaseChainNodeSetRunning ChainNodeSetPhase = "Running" PhaseChainNodeSetInitialing ChainNodeSetPhase = "Initializing" )
These are the valid phases for ChainNodeSets.
type ChainNodeSetSpec ¶
type ChainNodeSetSpec struct {
// Specifies image, version and binary name of the chain application to run. It also allows to schedule upgrades,
// or setting/updating the image for an on-chain upgrade.
App AppSpec `json:"app"`
// Indicates where this node will get the genesis from. Can be omitted when .spec.validator.init is specified.
// +optional
Genesis *GenesisConfig `json:"genesis"`
// Indicates this node set will run a validator and allows configuring it.
// +optional
Validator *NodeSetValidatorConfig `json:"validator,omitempty"`
// List of groups of ChainNodes to be run.
Nodes []NodeGroupSpec `json:"nodes"`
// Ensures that changes to ChainNodeSet are propagated to ChainNode resources one at a time. Cosmopilot will wait
// for each ChainNode to be in either Running or Syncing state before proceeding to the next one. Note that this
// does not apply to upgrades, as those are handled directly by the ChainNode controller. Defaults to `false`.
// +optional
RollingUpdates *bool `json:"rollingUpdates,omitempty"`
// List of ingresses to create for this ChainNodeSet. This allows to create ingresses targeting
// multiple groups of nodes.
// +optional
Ingresses []GlobalIngressConfig `json:"ingresses,omitempty"`
}
ChainNodeSetSpec defines the desired state of ChainNode.
func (*ChainNodeSetSpec) DeepCopy ¶
func (in *ChainNodeSetSpec) DeepCopy() *ChainNodeSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainNodeSetSpec.
func (*ChainNodeSetSpec) DeepCopyInto ¶
func (in *ChainNodeSetSpec) DeepCopyInto(out *ChainNodeSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChainNodeSetStatus ¶
type ChainNodeSetStatus struct {
// Indicates the current phase for this ChainNodeSet.
// +optional
Phase ChainNodeSetPhase `json:"phase,omitempty"`
// Indicates the chain ID.
// +optional
ChainID string `json:"chainID,omitempty"`
// Indicates the total number of ChainNode instances on this ChainNodeSet.
// +optional
Instances int `json:"instances,omitempty"`
// The application version currently deployed.
// +optional
AppVersion string `json:"appVersion,omitempty"`
// Nodes available on this nodeset. Excludes validator node.
// +optional
Nodes []ChainNodeSetNodeStatus `json:"nodes,omitempty"`
// Validator address of the validator in this ChainNodeSet if one is available.
// Omitted when no validator is present in the ChainNodeSet.
// +optional
ValidatorAddress string `json:"validatorAddress,omitempty"`
// Current status of validator if this ChainNodeSet has one.
// +optional
ValidatorStatus ValidatorStatus `json:"validatorStatus,omitempty"`
// Public key of the validator if this ChainNodeSet has one.
// +optional
PubKey string `json:"pubKey,omitempty"`
// All scheduled/completed upgrades performed by cosmopilot on ChainNodes of this CHainNodeSet.
// +optional
Upgrades []Upgrade `json:"upgrades,omitempty"`
// Last height read on the nodes by cosmopilot.
// +optional
LatestHeight int64 `json:"latestHeight,omitempty"`
}
ChainNodeSetStatus defines the observed state of ChainNodeSet.
func (*ChainNodeSetStatus) DeepCopy ¶
func (in *ChainNodeSetStatus) DeepCopy() *ChainNodeSetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainNodeSetStatus.
func (*ChainNodeSetStatus) DeepCopyInto ¶
func (in *ChainNodeSetStatus) DeepCopyInto(out *ChainNodeSetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChainNodeSpec ¶
type ChainNodeSpec struct {
// Indicates where this node will get the genesis from. Can be omitted when .spec.validator.init is specified.
// +optional
Genesis *GenesisConfig `json:"genesis"`
// Specifies image, version and binary name of the chain application to run. It also allows to schedule upgrades,
// or setting/updating the image for an on-chain upgrade.
App AppSpec `json:"app"`
// Allows setting specific configurations for this node.
// +optional
Config *Config `json:"config,omitempty"`
// Configures PVC for persisting data. Automated data snapshots can also be configured in
// this section.
// +optional
Persistence *Persistence `json:"persistence,omitempty"`
// Indicates this node is going to be a validator and allows configuring it.
// +optional
Validator *ValidatorConfig `json:"validator,omitempty"`
// Ensures peers with same chain ID are connected with each other. Enabled by default.
// +optional
AutoDiscoverPeers *bool `json:"autoDiscoverPeers,omitempty"`
// Configures this node to find a state-sync snapshot on the network and restore from it.
// This is disabled by default.
// +optional
StateSyncRestore *bool `json:"stateSyncRestore,omitempty"`
// Additional persistent peers that should be added to this node.
// +optional
Peers []Peer `json:"peers,omitempty"`
// Allows exposing P2P traffic to public.
// +optional
Expose *ExposeConfig `json:"expose,omitempty"`
// Compute Resources required by the app container.
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// Selector which must be true for the pod to fit on a node.
// Selector which must match a node's labels for the pod to be scheduled on that node.
// +optional
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// If specified, the pod's scheduling constraints.
// +optional
Affinity *corev1.Affinity `json:"affinity,omitempty"`
// Whether ChainNodeSet group label should be ignored on pod disruption checks.
// This is useful to ensure no downtime globally or per global ingress, instead of just per group.
// Defaults to `false`.
// +optional
IgnoreGroupOnDisruptionChecks *bool `json:"ignoreGroupOnDisruptionChecks,omitempty"`
// Vertical Pod Autoscaling configuration for this node.
// +optional
VPA *VerticalAutoscalingConfig `json:"vpa,omitempty"`
}
ChainNodeSpec defines the desired state of ChainNode.
func (*ChainNodeSpec) DeepCopy ¶
func (in *ChainNodeSpec) DeepCopy() *ChainNodeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainNodeSpec.
func (*ChainNodeSpec) DeepCopyInto ¶
func (in *ChainNodeSpec) DeepCopyInto(out *ChainNodeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChainNodeStatus ¶
type ChainNodeStatus struct {
// Indicates the current phase for this ChainNode.
// +optional
Phase ChainNodePhase `json:"phase,omitempty"`
// Conditions to track state of the ChainNode.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Indicates this node's ID.
// +optional
NodeID string `json:"nodeID,omitempty"`
// Internal IP address of this node.
// +optional
IP string `json:"ip,omitempty"`
// Public address for P2P when enabled.
// +optional
PublicAddress string `json:"publicAddress,omitempty"`
// Indicates the chain ID.
// +optional
ChainID string `json:"chainID,omitempty"`
// Current size of the data PVC for this node.
// +optional
PvcSize string `json:"pvcSize,omitempty"`
// Usage percentage of data volume.
// +optional
DataUsage string `json:"dataUsage,omitempty"`
// Indicates if this node is a validator.
Validator bool `json:"validator"`
// Account address of this validator. Omitted when not a validator.
// +optional
AccountAddress string `json:"accountAddress,omitempty"`
// Validator address is the valoper address of this validator. Omitted when not a validator.
// +optional
ValidatorAddress string `json:"validatorAddress,omitempty"`
// Indicates if this validator is jailed. Always false if not a validator node.
// +optional
Jailed bool `json:"jailed,omitempty"`
// Application version currently deployed.
// +optional
AppVersion string `json:"appVersion,omitempty"`
// Last height read on the node by cosmopilot.
// +optional
LatestHeight int64 `json:"latestHeight,omitempty"`
// Indicates if this node is running with seed mode enabled.
// +optional
SeedMode bool `json:"seedMode,omitempty"`
// All scheduled/completed upgrades performed by cosmopilot on this ChainNode.
// +optional
Upgrades []Upgrade `json:"upgrades,omitempty"`
// Public key of the validator.
// +optional
PubKey string `json:"pubKey,omitempty"`
// Indicates the current status of validator if this node is one.
// +optional
ValidatorStatus ValidatorStatus `json:"validatorStatus,omitempty"`
}
ChainNodeStatus defines the observed state of ChainNode
func (*ChainNodeStatus) DeepCopy ¶
func (in *ChainNodeStatus) DeepCopy() *ChainNodeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChainNodeStatus.
func (*ChainNodeStatus) DeepCopyInto ¶
func (in *ChainNodeStatus) DeepCopyInto(out *ChainNodeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Config ¶
type Config struct {
// Allows overriding configs on `.toml` configuration files.
// +optional
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:Schemaless
Override *map[string]runtime.RawExtension `json:"override,omitempty"`
// Allows configuring additional containers to run alongside the node.
// +optional
Sidecars []SidecarSpec `json:"sidecars,omitempty"`
// Optional list of references to secrets in the same namespace to use for pulling any of the images used by this node.
// +optional
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// The time to wait for a block before considering node unhealthy.
// Defaults to `15s`.
// +optional
// +default="15s"
// +kubebuilder:validation:Format=duration
BlockThreshold *string `json:"blockThreshold,omitempty"`
// Period at which a reconcile loop will happen for this ChainNode.
// Defaults to `15s`.
// +optional
// +default="15s"
// +kubebuilder:validation:Format=duration
ReconcilePeriod *string `json:"reconcilePeriod,omitempty"`
// Allows configuring this node to perform state-sync snapshots.
// +optional
StateSync *StateSyncConfig `json:"stateSync,omitempty"`
// Configures this node to run on seed mode. Defaults to `false`.
// +optional
// +default=false
SeedMode *bool `json:"seedMode,omitempty"`
// List of environment variables to set in the app container.
// +optional
Env []corev1.EnvVar `json:"env,omitempty"`
// SafeToEvict sets cluster-autoscaler.kubernetes.io/safe-to-evict annotation to the given value. It allows/disallows
// cluster-autoscaler to evict this node's pod.
// +optional
SafeToEvict *bool `json:"safeToEvict,omitempty"`
// Deploys CosmoGuard to protect API endpoints of the node.
// +optional
CosmoGuard *CosmoGuardConfig `json:"cosmoGuard,omitempty"`
// Log level for node-utils container. Defaults to `info`.
// +optional
NodeUtilsLogLevel *string `json:"nodeUtilsLogLevel,omitempty"`
// The time after which a node will be restarted if it does not start properly.
// Defaults to `1h`.
// +optional
// +default="1h"
// +kubebuilder:validation:Format=duration
StartupTime *string `json:"startupTime,omitempty"`
// Marks the node as ready even when it is catching up. This is useful when a chain
// is halted, but you still need the node to be ready for querying existing data.
// Defaults to `false`.
// +optional
IgnoreSyncing *bool `json:"ignoreSyncing,omitempty"`
// Compute Resources for node-utils container.
// +optional
NodeUtilsResources *corev1.ResourceRequirements `json:"nodeUtilsResources,omitempty"`
// Whether to persist address book file in data directory. Defaults to `false`.
// +optional
PersistAddressBook *bool `json:"persistAddressBook,omitempty"`
// Optional duration in seconds the pod needs to terminate gracefully.
// +optional
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
// Whether EVM is enabled on this node. Will add evm-rpc port to services. Defaults to `false`.
// +optional
EvmEnabled *bool `json:"evmEnabled,omitempty"`
// List of flags to be appended to app container when starting the node.
// +optional
RunFlags []string `json:"runFlags,omitempty"`
// Additional volumes to be created and mounted on this node.
// +optional
Volumes []VolumeSpec `json:"volumes,omitempty"`
// Whether field naming in config.toml should use dashes instead of underscores. Defaults to `false`.
// +optional
DashedConfigToml *bool `json:"dashedConfigToml,omitempty"`
// The block height at which the node should stop.
// Cosmopilot will not attempt to restart the node beyond this height.
// +optional
HaltHeight *int64 `json:"haltHeight,omitempty"`
}
Config allows setting specific configurations for a node, including overriding configs in app.toml and config.toml.
func (*Config) CosmoGuardEnabled ¶
func (*Config) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Config) GetBlockThreshold ¶
func (*Config) GetCosmoGuardConfig ¶
func (cfg *Config) GetCosmoGuardConfig() *corev1.ConfigMapKeySelector
func (*Config) GetCosmoGuardResources ¶
func (cfg *Config) GetCosmoGuardResources() corev1.ResourceRequirements
func (*Config) GetHaltHeight ¶ added in v1.40.0
func (*Config) GetNodeUtilsLogLevel ¶
func (*Config) GetNodeUtilsResources ¶
func (cfg *Config) GetNodeUtilsResources() corev1.ResourceRequirements
func (*Config) GetSidecarImagePullPolicy ¶
func (cfg *Config) GetSidecarImagePullPolicy(name string) corev1.PullPolicy
GetSidecarImagePullPolicy returns the pull policy to be used for the sidecar container image
func (*Config) GetStartupTime ¶
func (*Config) GetTerminationGracePeriodSeconds ¶
func (*Config) IsEvmEnabled ¶
func (*Config) SeedModeEnabled ¶
func (*Config) ShouldIgnoreSyncing ¶
func (*Config) ShouldPersistAddressBook ¶
func (*Config) ShouldRestartPodOnCosmoGuardFailure ¶
func (*Config) UseDashedConfigToml ¶
type CosmoGuardConfig ¶
type CosmoGuardConfig struct {
// Whether to enable CosmoGuard on this node.
Enable bool `json:"enable"`
// ConfigMap which CosmoGuard configuration for this node.
Config *corev1.ConfigMapKeySelector `json:"config"`
// Whether the node's pod should be restarted when CosmoGuard fails.
// +optional
RestartPodOnFailure *bool `json:"restartPodOnFailure,omitempty"`
// Compute Resources for CosmoGuard container.
// +optional
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
}
CosmoGuardConfig allows configuring CosmoGuard rules.
func (*CosmoGuardConfig) DeepCopy ¶
func (in *CosmoGuardConfig) DeepCopy() *CosmoGuardConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CosmoGuardConfig.
func (*CosmoGuardConfig) DeepCopyInto ¶
func (in *CosmoGuardConfig) DeepCopyInto(out *CosmoGuardConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CreateValidatorConfig ¶
type CreateValidatorConfig struct {
// Name of the secret containing the mnemonic of the account to be used by
// this validator. Defaults to `<chainnode>-account`. Will be created if it does not exist.
// +optional
AccountMnemonicSecret *string `json:"accountMnemonicSecret,omitempty"`
// HD path of accounts. Defaults to `m/44'/118'/0'/0/0`.
// +optional
// +default="m/44'/118'/0'/0/0"
AccountHDPath *string `json:"accountHDPath,omitempty"`
// Prefix for accounts. Defaults to `nibi`.
// +optional
// +default="nibi"
AccountPrefix *string `json:"accountPrefix,omitempty"`
// Prefix for validator operator accounts. Defaults to `nibivaloper`.
// +optional
// +default="nibivaloper"
ValPrefix *string `json:"valPrefix,omitempty"`
// Maximum commission change rate percentage (per day). Defaults to `0.1`.
// +optional
// +default="0.1"
CommissionMaxChangeRate *string `json:"commissionMaxChangeRate,omitempty"`
// Maximum commission rate percentage. Defaults to `0.1`.
// +optional
// +default="0.1"
CommissionMaxRate *string `json:"commissionMaxRate,omitempty"`
// Initial commission rate percentage. Defaults to `0.1`.
// +optional
// +default="0.1"
CommissionRate *string `json:"commissionRate,omitempty"`
// Minimum self delegation required on the validator. Defaults to `1`.
// +optional
// +default="1"
MinSelfDelegation *string `json:"minSelfDelegation,omitempty"`
// Amount to be staked by this validator.
StakeAmount string `json:"stakeAmount"`
// Gas prices in decimal format to determine the transaction fee.
GasPrices string `json:"gasPrices"`
}
CreateValidatorConfig holds configuration for cosmopilot to submit a create-validator transaction.
func (*CreateValidatorConfig) DeepCopy ¶
func (in *CreateValidatorConfig) DeepCopy() *CreateValidatorConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CreateValidatorConfig.
func (*CreateValidatorConfig) DeepCopyInto ¶
func (in *CreateValidatorConfig) DeepCopyInto(out *CreateValidatorConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExportTarballConfig ¶
type ExportTarballConfig struct {
// Suffix to add to archive name. The name of the tarball will be `<chain-id>-<timestamp>-<suffix>`.
// +optional
Suffix *string `json:"suffix,omitempty"`
// Whether to delete the tarball when the snapshot expires. Default is `false`.
// +optional
// +default=false
DeleteOnExpire *bool `json:"deleteOnExpire,omitempty"`
// Configuration to upload tarballs to a GCS bucket.
// +optional
GCS *GcsExportConfig `json:"gcs,omitempty"`
}
ExportTarballConfig holds config options for tarball upload.
func (*ExportTarballConfig) DeepCopy ¶
func (in *ExportTarballConfig) DeepCopy() *ExportTarballConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExportTarballConfig.
func (*ExportTarballConfig) DeepCopyInto ¶
func (in *ExportTarballConfig) DeepCopyInto(out *ExportTarballConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ExportTarballConfig) DeleteWhenExpired ¶
func (e *ExportTarballConfig) DeleteWhenExpired() bool
func (*ExportTarballConfig) GetSuffix ¶
func (e *ExportTarballConfig) GetSuffix() string
type ExposeConfig ¶
type ExposeConfig struct {
// Whether to expose p2p endpoint for this node. Defaults to `false`.
// +optional
// +default=false
P2P *bool `json:"p2p,omitempty"`
// P2pServiceType indicates how P2P port will be exposed.
// Valid values are:
// - `LoadBalancer`
// - `NodePort` (default)
// +optional
// +default="NodePort"
P2pServiceType *corev1.ServiceType `json:"p2pServiceType,omitempty"`
// Annotations to be appended to the p2p service.
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}
ExposeConfig allows configuring how P2P endpoint is exposed to public.
func (*ExposeConfig) DeepCopy ¶
func (in *ExposeConfig) DeepCopy() *ExposeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExposeConfig.
func (*ExposeConfig) DeepCopyInto ¶
func (in *ExposeConfig) DeepCopyInto(out *ExposeConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ExposeConfig) Enabled ¶
func (exp *ExposeConfig) Enabled() bool
func (*ExposeConfig) GetAnnotations ¶
func (exp *ExposeConfig) GetAnnotations() map[string]string
func (*ExposeConfig) GetServiceType ¶
func (exp *ExposeConfig) GetServiceType() corev1.ServiceType
type FromNodeRPCConfig ¶
type FromNodeRPCConfig struct {
// Defines protocol to use. Defaults to `false`.
// +optional
// +default=false
Secure bool `json:"secure,omitempty"`
// Hostname or IP address of the RPC server
// +kubebuilder:validation:MinLength=1
Hostname string `json:"hostname"`
// TCP port used for RPC queries on the RPC server. Defaults to `26657`.
// +optional
// +default=26657
Port *int `json:"port,omitempty"`
}
FromNodeRPCConfig holds configuration to retrieve genesis from an existing node using RPC endpoint.
func (*FromNodeRPCConfig) DeepCopy ¶
func (in *FromNodeRPCConfig) DeepCopy() *FromNodeRPCConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FromNodeRPCConfig.
func (*FromNodeRPCConfig) DeepCopyInto ¶
func (in *FromNodeRPCConfig) DeepCopyInto(out *FromNodeRPCConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FromNodeRPCConfig) GetGenesisFromRPCUrl ¶
func (gg *FromNodeRPCConfig) GetGenesisFromRPCUrl() string
type GcsExportConfig ¶
type GcsExportConfig struct {
// Name of the bucket to upload tarballs to.
Bucket string `json:"bucket"`
// Secret with the JSON credentials to upload to bucket.
CredentialsSecret *corev1.SecretKeySelector `json:"credentialsSecret"`
// Size limit at which the file will be split into multiple parts. Defaults to `5TB`.
SizeLimit *string `json:"sizeLimit,omitempty"`
// Size of each part when size-limit is crossed. Defaults to `500GB`.
PartSize *string `json:"partSize,omitempty"`
// Size of each chunk uploaded in parallel to GCS. Defaults to `250MB`.
ChunkSize *string `json:"chunkSize,omitempty"`
// Size of the buffer when streaming data to GCS. Defaults to `32MB`.
BufferSize *string `json:"bufferSize,omitempty"`
// Number of concurrent upload or delete jobs. Defaults to `10`.
ConcurrentJobs *int `json:"concurrentJobs,omitempty"`
}
GcsExportConfig holds required settings to upload to GCS.
func (*GcsExportConfig) DeepCopy ¶
func (in *GcsExportConfig) DeepCopy() *GcsExportConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GcsExportConfig.
func (*GcsExportConfig) DeepCopyInto ¶
func (in *GcsExportConfig) DeepCopyInto(out *GcsExportConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GcsExportConfig) GetBufferSize ¶
func (gcs *GcsExportConfig) GetBufferSize() string
func (*GcsExportConfig) GetChunkSize ¶
func (gcs *GcsExportConfig) GetChunkSize() string
func (*GcsExportConfig) GetConcurrentJobs ¶
func (gcs *GcsExportConfig) GetConcurrentJobs() int
func (*GcsExportConfig) GetPartSize ¶
func (gcs *GcsExportConfig) GetPartSize() string
func (*GcsExportConfig) GetSizeLimit ¶
func (gcs *GcsExportConfig) GetSizeLimit() string
type GenesisConfig ¶
type GenesisConfig struct {
// URL to download the genesis from.
// +optional
Url *string `json:"url,omitempty"`
// Get the genesis from an existing node using its RPC endpoint.
// +optional
FromNodeRPC *FromNodeRPCConfig `json:"fromNodeRPC,omitempty"`
// SHA256 to validate the genesis.
// +optional
GenesisSHA *string `json:"genesisSHA,omitempty"`
// ConfigMap specifies a configmap to load the genesis from. It can also be used to specify the name of the
// configmap to store the genesis when retrieving genesis using other methods.
// +optional
ConfigMap *string `json:"configMap,omitempty"`
// UseDataVolume indicates that cosmopilot should save the genesis in the same volume as node data
// instead of a ConfigMap. This is useful for genesis whose size is bigger than ConfigMap limit of 1MiB.
// Ignored when genesis source is a ConfigMap. Defaults to `false`.
// +optional
UseDataVolume *bool `json:"useDataVolume,omitempty"`
// The chain-id of the network. This is only used when useDataVolume is true. If not set, cosmopilot will download
// the genesis and extract chain-id from it. If set, cosmopilot will not download it and use a container to download
// the genesis directly into the volume instead. This is useful for huge genesis that might kill cosmopilot container
// for using too much memory.
// +optional
ChainID *string `json:"chainID,omitempty"`
}
GenesisConfig specifies how genesis will be retrieved.
func (*GenesisConfig) DeepCopy ¶
func (in *GenesisConfig) DeepCopy() *GenesisConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenesisConfig.
func (*GenesisConfig) DeepCopyInto ¶
func (in *GenesisConfig) DeepCopyInto(out *GenesisConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GenesisConfig) GetConfigMapName ¶
func (g *GenesisConfig) GetConfigMapName(chainID string) string
func (*GenesisConfig) HasConfigMapSource ¶
func (g *GenesisConfig) HasConfigMapSource() bool
func (*GenesisConfig) ShouldDownloadUsingContainer ¶
func (g *GenesisConfig) ShouldDownloadUsingContainer() bool
func (*GenesisConfig) ShouldUseDataVolume ¶
func (g *GenesisConfig) ShouldUseDataVolume() bool
type GenesisInitConfig ¶
type GenesisInitConfig struct {
// ChainID of the chain to initialize.
// +kubebuilder:validation:MinLength=1
ChainID string `json:"chainID"`
// Name of the secret containing the mnemonic of the account to be used by
// this validator. Defaults to `<chainnode>-account`. Will be created if it does not exist.
// +optional
AccountMnemonicSecret *string `json:"accountMnemonicSecret,omitempty"`
// HD path of accounts. Defaults to `m/44'/118'/0'/0/0`.
// +optional
// +default="m/44'/118'/0'/0/0"
AccountHDPath *string `json:"accountHDPath,omitempty"`
// Prefix for accounts. Defaults to `nibi`.
// +optional
// +default="nibi"
AccountPrefix *string `json:"accountPrefix,omitempty"`
// Prefix for validator operator accounts. Defaults to `nibivaloper`.
// +optional
// +default="nibivaloper"
ValPrefix *string `json:"valPrefix,omitempty"`
// Maximum commission change rate percentage (per day). Defaults to `0.1`.
// +optional
// +default="0.1"
CommissionMaxChangeRate *string `json:"commissionMaxChangeRate,omitempty"`
// Maximum commission rate percentage. Defaults to `0.1`.
// +optional
// +default="0.1"
CommissionMaxRate *string `json:"commissionMaxRate,omitempty"`
// Initial commission rate percentage. Defaults to `0.1`.
// +optional
// +default="0.1"
CommissionRate *string `json:"commissionRate,omitempty"`
// Minimum self delegation required on the validator. Defaults to `1`.
// NOTE: In most chains this is a required flag. However, in a few other chains (Cosmos Hub for example),
// this flag does not even exist anymore. In those cases, set it to an empty string and cosmopilot will skip it.
// +optional
// +default="1"
MinSelfDelegation *string `json:"minSelfDelegation,omitempty"`
// Assets is the list of tokens and their amounts to be assigned to this validators account.
Assets []string `json:"assets"`
// Amount to be staked by this validator.
StakeAmount string `json:"stakeAmount"`
// Accounts specify additional accounts and respective assets to be added to this chain.
// +optional
Accounts []AccountAssets `json:"accounts,omitempty"`
// List of ChainNodes whose accounts should be included in genesis.
// NOTE: Cosmopilot will wait for the ChainNodes to exist and have accounts before proceeding.
ChainNodeAccounts []ChainNodeAssets `json:"chainNodeAccounts,omitempty"`
// Time required to totally unbond delegations. Defaults to `1814400s` (21 days).
// +optional
// +default="1814400s"
// +kubebuilder:validation:Format=duration
UnbondingTime *string `json:"unbondingTime,omitempty"`
// Voting period for this chain. Defaults to `120h`.
// +optional
// +default="120h"
// +kubebuilder:validation:Format=duration
VotingPeriod *string `json:"votingPeriod,omitempty"`
// Additional commands to run on genesis initialization.
// Note: App home is at `/home/app` and `/temp` is a temporary volume shared by all init containers.
// +optional
AdditionalInitCommands []InitCommand `json:"additionalInitCommands,omitempty"`
}
GenesisInitConfig specifies configs and initialization commands for creating a new genesis.
func (*GenesisInitConfig) DeepCopy ¶
func (in *GenesisInitConfig) DeepCopy() *GenesisInitConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenesisInitConfig.
func (*GenesisInitConfig) DeepCopyInto ¶
func (in *GenesisInitConfig) DeepCopyInto(out *GenesisInitConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GlobalIngressConfig ¶
type GlobalIngressConfig struct {
// The name of this ingress
// +kubebuilder:validation:MinLength=1
Name string `json:"name"`
// Groups of nodes to which this ingress will point to.
// +kubebuilder:validation:MinItems=1
Groups []string `json:"groups"`
// Enable RPC endpoint.
// +optional
EnableRPC bool `json:"enableRPC,omitempty"`
// Enable gRPC endpoint.
// +optional
EnableGRPC bool `json:"enableGRPC,omitempty"`
// Enable LCD endpoint.
// +optional
EnableLCD bool `json:"enableLCD,omitempty"`
// Enable EVM RPC endpoint.
// +optional
EnableEvmRPC bool `json:"enableEvmRPC,omitempty"`
// Enable EVM RPC Websocket endpoint.
// +optional
EnableEvmRpcWs bool `json:"enableEvmRpcWS,omitempty"`
// Host in which endpoints will be exposed. Endpoints are exposed on corresponding
// subdomain of this host. An example host `nodes.example.com` will have endpoints exposed at
// `rpc.nodes.example.com`, `grpc.nodes.example.com` and `lcd.nodes.example.com`.
Host string `json:"host"`
// Annotations to be appended to the ingress.
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
// Whether to disable TLS on ingress resource.
// +optional
DisableTLS bool `json:"disableTLS,omitempty"`
// Name of the secret containing TLS certificate.
// +optional
TlsSecretName *string `json:"tlsSecretName,omitempty"`
}
GlobalIngressConfig specifies configurations for ingress to expose API endpoints of several groups of nodes.
func (*GlobalIngressConfig) DeepCopy ¶
func (in *GlobalIngressConfig) DeepCopy() *GlobalIngressConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalIngressConfig.
func (*GlobalIngressConfig) DeepCopyInto ¶
func (in *GlobalIngressConfig) DeepCopyInto(out *GlobalIngressConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GlobalIngressConfig) GetGrpcName ¶
func (gi *GlobalIngressConfig) GetGrpcName(owner client.Object) string
func (*GlobalIngressConfig) GetName ¶
func (gi *GlobalIngressConfig) GetName(owner client.Object) string
func (*GlobalIngressConfig) GetTlsSecretName ¶
func (gi *GlobalIngressConfig) GetTlsSecretName(owner client.Object) string
func (*GlobalIngressConfig) HasGroup ¶
func (gi *GlobalIngressConfig) HasGroup(name string) bool
func (*GlobalIngressConfig) ShouldUseCosmoGuardPorts ¶
func (gi *GlobalIngressConfig) ShouldUseCosmoGuardPorts(nodeSet *ChainNodeSet) bool
type IngressConfig ¶
type IngressConfig struct {
// Enable RPC endpoint.
// +optional
EnableRPC bool `json:"enableRPC,omitempty"`
// Enable gRPC endpoint.
// +optional
EnableGRPC bool `json:"enableGRPC,omitempty"`
// Enable LCD endpoint.
// +optional
EnableLCD bool `json:"enableLCD,omitempty"`
// Enable EVM RPC endpoint.
// +optional
EnableEvmRPC bool `json:"enableEvmRPC,omitempty"`
// Enable EVM RPC Websocket endpoint.
// +optional
EnableEvmRpcWs bool `json:"enableEvmRpcWS,omitempty"`
// Host in which endpoints will be exposed. Endpoints are exposed on corresponding
// subdomain of this host. An example host `nodes.example.com` will have endpoints exposed at
// `rpc.nodes.example.com`, `grpc.nodes.example.com` and `lcd.nodes.example.com`.
Host string `json:"host"`
// Annotations to be appended to the ingress.
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
// Whether to disable TLS on ingress resource.
// +optional
DisableTLS bool `json:"disableTLS,omitempty"`
// Name of the secret containing TLS certificate.
// +optional
TlsSecretName *string `json:"tlsSecretName,omitempty"`
}
IngressConfig specifies configurations for ingress to expose API endpoints.
func (*IngressConfig) DeepCopy ¶
func (in *IngressConfig) DeepCopy() *IngressConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressConfig.
func (*IngressConfig) DeepCopyInto ¶
func (in *IngressConfig) DeepCopyInto(out *IngressConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InitCommand ¶
type InitCommand struct {
// Image to be used to run this command. Defaults to app image.
// +optional
Image *string `json:"image,omitempty"`
// Command to be used. Defaults to image entrypoint.
// +optional
Command []string `json:"command,omitempty"`
// Args to be passed to this command.
Args []string `json:"args"`
}
InitCommand represents an initialization command. It may be used for running additional commands on genesis or volume initialization.
func (*InitCommand) DeepCopy ¶
func (in *InitCommand) DeepCopy() *InitCommand
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InitCommand.
func (*InitCommand) DeepCopyInto ¶
func (in *InitCommand) DeepCopyInto(out *InitCommand)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LimitSource ¶ added in v1.44.0
type LimitSource string
LimitSource specifies which resource value should be used as the scaling reference. +kubebuilder:validation:Enum=effective-limit;requests;limits
const ( // EffectiveLimit means use limits if set; otherwise fallback to requests. EffectiveLimit LimitSource = "effective-limit" // Requests means always use the pod's requested resource value. Requests LimitSource = "requests" // Limits means always use the pod's resource limit value. Limits LimitSource = "limits" )
type LimitUpdateStrategy ¶ added in v1.44.0
type LimitUpdateStrategy string
LimitUpdateStrategy defines how resource limits should be managed when autoscaling. +kubebuilder:validation:Enum=equal;max;percentage;retain;unset
const ( // LimitRetain retains the original limits from .spec.resources (no updates). LimitRetain LimitUpdateStrategy = "retain" // LimitEqual sets limits to match the updated request value. LimitEqual LimitUpdateStrategy = "equal" // LimitVpaMax sets limits to the configured VPA Max value. LimitVpaMax LimitUpdateStrategy = "max" // LimitPercentage sets limits to a percentage above the request (e.g. 150%). LimitPercentage LimitUpdateStrategy = "percentage" // LimitUnset removes the limits field entirely from the pod spec. LimitUnset LimitUpdateStrategy = "unset" )
type NodeGroupSpec ¶
type NodeGroupSpec struct {
// Name of this group.
Name string `json:"name"`
// Number of ChainNode instances to run on this group.
// +optional
// +default=1
Instances *int `json:"instances,omitempty"`
// Specific configurations for these nodes.
// +optional
Config *Config `json:"config,omitempty"`
// Configures PVC for persisting data. Automated data snapshots can also be configured in
// this section.
// +optional
Persistence *Persistence `json:"persistence,omitempty"`
// Additional persistent peers that should be added to these nodes.
// +optional
Peers []Peer `json:"peers,omitempty"`
// Allows exposing P2P traffic to public.
// +optional
Expose *ExposeConfig `json:"expose,omitempty"`
// Indicates if an ingress should be created to access API endpoints of these nodes and configures it.
// +optional
Ingress *IngressConfig `json:"ingress,omitempty"`
// Compute Resources required by the app container.
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// Selector which must be true for the pod to fit on a node.
// Selector which must match a node's labels for the pod to be scheduled on that node.
// +optional
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// If specified, the pod's scheduling constraints.
// +optional
Affinity *corev1.Affinity `json:"affinity,omitempty"`
// Configures these nodes to find state-sync snapshots on the network and restore from it.
// This is disabled by default.
// +optional
StateSyncRestore *bool `json:"stateSyncRestore,omitempty"`
// Whether these nodes should inherit gas price from validator (if there is not configured on this ChainNodeSet)
// Defaults to `true`.
// +optional
InheritValidatorGasPrice *bool `json:"inheritValidatorGasPrice,omitempty"`
// Whether ChainNodeSet group label should be ignored on pod disruption checks.
// This is useful to ensure no downtime globally or per global ingress, instead of just per group.
// Defaults to `false`.
// +optional
IgnoreGroupOnDisruptionChecks *bool `json:"ignoreGroupOnDisruptionChecks,omitempty"`
// Vertical Pod Autoscaling configuration for this node.
// +optional
VPA *VerticalAutoscalingConfig `json:"vpa,omitempty"`
// Pod Disruption Budget configuration for this group.
// +optional
PDB *PdbConfig `json:"pdb,omitempty"`
}
NodeGroupSpec sets chainnode configurations for a group.
func (*NodeGroupSpec) DeepCopy ¶
func (in *NodeGroupSpec) DeepCopy() *NodeGroupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroupSpec.
func (*NodeGroupSpec) DeepCopyInto ¶
func (in *NodeGroupSpec) DeepCopyInto(out *NodeGroupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeGroupSpec) GetIngressSecretName ¶
func (group *NodeGroupSpec) GetIngressSecretName(owner client.Object) string
func (*NodeGroupSpec) GetInstances ¶
func (group *NodeGroupSpec) GetInstances() int
func (*NodeGroupSpec) GetPdbMinAvailable ¶ added in v1.45.0
func (group *NodeGroupSpec) GetPdbMinAvailable() int
func (*NodeGroupSpec) GetServiceName ¶
func (group *NodeGroupSpec) GetServiceName(owner client.Object) string
func (*NodeGroupSpec) HasPdbEnabled ¶ added in v1.45.0
func (group *NodeGroupSpec) HasPdbEnabled() bool
func (*NodeGroupSpec) ShouldInheritValidatorGasPrice ¶
func (group *NodeGroupSpec) ShouldInheritValidatorGasPrice() bool
type NodeSetValidatorConfig ¶
type NodeSetValidatorConfig struct {
// Secret containing the private key to be used by this validator.
// Defaults to `<chainnode>-priv-key`. Will be created if it does not exist.
// +optional
PrivateKeySecret *string `json:"privateKeySecret,omitempty"`
// Contains information details about the validator.
// +optional
Info *ValidatorInfo `json:"info,omitempty"`
// Specifies configs and initialization commands for creating a new genesis.
// +optional
Init *GenesisInitConfig `json:"init,omitempty"`
// Allows setting specific configurations for the validator.
// +optional
Config *Config `json:"config,omitempty"`
// Configures PVC for persisting data. Automated data snapshots can also be configured in
// this section.
// +optional
Persistence *Persistence `json:"persistence,omitempty"`
// Compute Resources required by the app container.
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// Selector which must be true for the pod to fit on a node.
// Selector which must match a node's labels for the pod to be scheduled on that node.
// +optional
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// If specified, the pod's scheduling constraints.
// +optional
Affinity *corev1.Affinity `json:"affinity,omitempty"`
// TmKMS configuration for signing commits for this validator.
// When configured, .spec.validator.privateKeySecret will not be mounted on the validator node.
// +optional
TmKMS *TmKMS `json:"tmKMS,omitempty"`
// Configures this node to find a state-sync snapshot on the network and restore from it.
// This is disabled by default.
// +optional
StateSyncRestore *bool `json:"stateSyncRestore,omitempty"`
// Indicates cosmopilot should run create-validator tx to make this node a validator.
// +optional
CreateValidator *CreateValidatorConfig `json:"createValidator,omitempty"`
// Vertical Pod Autoscaling configuration for this node.
// +optional
VPA *VerticalAutoscalingConfig `json:"vpa,omitempty"`
// Pod Disruption Budget configuration for the validator pod.
// This is mainly useful in testnets where multiple validators might run in the same namespace.
// In production mainnet environments, where typically only one validator runs per namespace,
// this is rarely needed.
// +optional
PDB *PdbConfig `json:"pdb,omitempty"`
}
NodeSetValidatorConfig contains validator configurations.
func (*NodeSetValidatorConfig) DeepCopy ¶
func (in *NodeSetValidatorConfig) DeepCopy() *NodeSetValidatorConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSetValidatorConfig.
func (*NodeSetValidatorConfig) DeepCopyInto ¶
func (in *NodeSetValidatorConfig) DeepCopyInto(out *NodeSetValidatorConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeSetValidatorConfig) GetAccountHDPath ¶
func (val *NodeSetValidatorConfig) GetAccountHDPath() string
func (*NodeSetValidatorConfig) GetAccountPrefix ¶
func (val *NodeSetValidatorConfig) GetAccountPrefix() string
func (*NodeSetValidatorConfig) GetAccountSecretName ¶
func (val *NodeSetValidatorConfig) GetAccountSecretName(obj client.Object) string
func (*NodeSetValidatorConfig) GetInitUnbondingTime ¶
func (val *NodeSetValidatorConfig) GetInitUnbondingTime() string
func (*NodeSetValidatorConfig) GetInitVotingPeriod ¶
func (val *NodeSetValidatorConfig) GetInitVotingPeriod() string
func (*NodeSetValidatorConfig) GetPdbMinAvailable ¶ added in v1.45.0
func (val *NodeSetValidatorConfig) GetPdbMinAvailable() int
func (*NodeSetValidatorConfig) GetPrivKeySecretName ¶
func (val *NodeSetValidatorConfig) GetPrivKeySecretName(obj client.Object) string
func (*NodeSetValidatorConfig) GetValPrefix ¶
func (val *NodeSetValidatorConfig) GetValPrefix() string
func (*NodeSetValidatorConfig) HasPdbEnabled ¶ added in v1.45.0
func (val *NodeSetValidatorConfig) HasPdbEnabled() bool
type PdbConfig ¶ added in v1.45.0
type PdbConfig struct {
// Whether to deploy a Pod Disruption Budget
Enabled bool `json:"enabled"`
// MinAvailable indicates minAvailable field set in PDB.
// Defaults to the number of instances in the group minus 1,
// i.e. it allows only a single disruption.
// +optional
MinAvailable *int `json:"minAvailable,omitempty"`
}
func (*PdbConfig) DeepCopy ¶ added in v1.45.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PdbConfig.
func (*PdbConfig) DeepCopyInto ¶ added in v1.45.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Peer ¶
type Peer struct {
// Tendermint node ID for this node.
ID string `json:"id"`
// Hostname or IP address of this peer.
Address string `json:"address"`
// P2P port to be used. Defaults to `26656`.
// +optional
// +default=26656
Port *int `json:"port,omitempty"`
// Indicates this peer is unconditional.
// +optional
Unconditional *bool `json:"unconditional,omitempty"`
// Indicates this peer is private.
// +optional
Private *bool `json:"private,omitempty"`
}
Peer represents a persistent peer.
func (*Peer) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Peer.
func (*Peer) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Peer) IsUnconditional ¶
type Persistence ¶
type Persistence struct {
// Size of the persistent volume for storing data. Can't be updated when autoResize is enabled.
// Defaults to `50Gi`.
// +optional
// +default="50Gi"
Size *string `json:"size,omitempty"`
// Name of the storage class to use for the PVC. Uses the default class if not specified.
// to create persistent volumes.
// +optional
StorageClassName *string `json:"storageClass,omitempty"`
// Automatically resize PVC.
// Defaults to `true`.
// +optional
// +default=true
AutoResize *bool `json:"autoResize,omitempty"`
// Percentage of data usage at which an auto-resize event should occur.
// Defaults to `80`.
// +optional
// +default=80
AutoResizeThreshold *int `json:"autoResizeThreshold,omitempty"`
// Increment size on each auto-resize event.
// Defaults to `50Gi`.
// +optional
// +default="50Gi"
AutoResizeIncrement *string `json:"autoResizeIncrement,omitempty"`
// Size at which auto-resize will stop incrementing PVC size.
// Defaults to `2Ti`.
// +optional
// +default="2Ti"
AutoResizeMaxSize *string `json:"autoResizeMaxSize,omitempty"`
// Additional commands to run on data initialization. Useful for downloading and
// extracting snapshots.
// App home is at `/home/app` and data dir is at `/home/app/data`. There is also `/temp`, a temporary volume
// shared by all init containers.
// +optional
AdditionalInitCommands []InitCommand `json:"additionalInitCommands,omitempty"`
// Whether cosmopilot should create volume snapshots according to this config.
// +optional
Snapshots *VolumeSnapshotsConfig `json:"snapshots,omitempty"`
// Restore from the specified snapshot when creating the PVC for this node.
// +optional
RestoreFromSnapshot *PvcSnapshot `json:"restoreFromSnapshot,omitempty"`
// Time to wait for data initialization pod to be successful. Defaults to `5m`.
// +optional
InitTimeout *string `json:"initTimeout,omitempty"`
}
Persistence configuration for a node.
func (*Persistence) DeepCopy ¶
func (in *Persistence) DeepCopy() *Persistence
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Persistence.
func (*Persistence) DeepCopyInto ¶
func (in *Persistence) DeepCopyInto(out *Persistence)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PvcSnapshot ¶
type PvcSnapshot struct {
// Name of the volume snapshot being referenced.
Name string `json:"name"`
}
PvcSnapshot represents a snapshot to be used to restore a PVC.
func (*PvcSnapshot) DeepCopy ¶
func (in *PvcSnapshot) DeepCopy() *PvcSnapshot
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PvcSnapshot.
func (*PvcSnapshot) DeepCopyInto ¶
func (in *PvcSnapshot) DeepCopyInto(out *PvcSnapshot)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScalingDirection ¶ added in v1.44.0
type ScalingDirection string
ScalingDirection determines whether the scaling action is an increase or decrease in resource. +kubebuilder:validation:Enum=up;down
const ( // ScaleUp scales the resource upward (increase). ScaleUp ScalingDirection = "up" // ScaleDown scales the resource downward (decrease). ScaleDown ScalingDirection = "down" )
type SdkVersion ¶
type SdkVersion string
SdkVersion specifies the cosmos-sdk version used by this application. +kubebuilder:validation:Enum=v0.45;v0.47
const ( // Cosmos-sdk version v0.47.x. V0_47 SdkVersion = "v0.47" // Cosmos-sdk version v0.45.x and below. V0_45 SdkVersion = "v0.45" )
type SidecarSpec ¶
type SidecarSpec struct {
// Name to be assigned to the container.
// +kubebuilder:validation:MinLength=1
Name string `json:"name"`
// Container image to be used.
// Defaults to app image being used by ChainNode.
// +kubebuilder:validation:MinLength=1
// +optional
Image *string `json:"image"`
// Indicates the desired pull policy when creating nodes. Defaults to `Always` if `version`
// is `latest` and `IfNotPresent` otherwise.
// +optional
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
// Where data volume will be mounted on this container. It is not mounted if not specified.
// +optional
MountDataVolume *string `json:"mountDataVolume,omitempty"`
// Directory where config files from ConfigMap will be mounted on this container. They are not mounted if not specified.
// +optional
MountConfig *string `json:"mountConfig,omitempty"`
// Command to be run by this container. Defaults to entrypoint defined in image.
// +optional
Command []string `json:"command,omitempty"`
// Args to be passed to this container. Defaults to cmd defined in image.
// +optional
Args []string `json:"args,omitempty"`
// Environment variables to be passed to this container.
// +optional
Env []corev1.EnvVar `json:"env,omitempty"`
// Security options the container should be run with.
// +optional
SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
// Compute Resources for the sidecar container.
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// Whether the pod of this node should be restarted when this sidecar container fails. Defaults to `false`.
// +optional
RestartPodOnFailure *bool `json:"restartPodOnFailure,omitempty"`
// When enabled, this container turns into an init container instead of a sidecar
// as it will have to finish before the node container starts. Defaults to `false`.
// +optional
RunBeforeNode *bool `json:"runBeforeNode,omitempty"`
}
SidecarSpec allows configuring additional containers to run alongside the node.
func (*SidecarSpec) DeepCopy ¶
func (in *SidecarSpec) DeepCopy() *SidecarSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SidecarSpec.
func (*SidecarSpec) DeepCopyInto ¶
func (in *SidecarSpec) DeepCopyInto(out *SidecarSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SidecarSpec) GetImage ¶ added in v1.43.0
func (s *SidecarSpec) GetImage(chainNode *ChainNode) string
func (*SidecarSpec) ShouldRestartPodOnFailure ¶
func (s *SidecarSpec) ShouldRestartPodOnFailure() bool
func (*SidecarSpec) ShouldRunBeforeNode ¶
func (s *SidecarSpec) ShouldRunBeforeNode() bool
type StateSyncConfig ¶
type StateSyncConfig struct {
// Block interval at which local state sync snapshots are taken (0 to disable).
SnapshotInterval int `json:"snapshotInterval"`
// Number of recent snapshots to keep and serve (0 to keep all). Defaults to 2.
// +optional
SnapshotKeepRecent *int `json:"snapshotKeepRecent,omitempty"`
}
StateSyncConfig holds configurations for enabling state-sync snapshots on a node.
func (*StateSyncConfig) DeepCopy ¶
func (in *StateSyncConfig) DeepCopy() *StateSyncConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StateSyncConfig.
func (*StateSyncConfig) DeepCopyInto ¶
func (in *StateSyncConfig) DeepCopyInto(out *StateSyncConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StateSyncConfig) Enabled ¶
func (ss *StateSyncConfig) Enabled() bool
func (*StateSyncConfig) GetKeepRecent ¶
func (ss *StateSyncConfig) GetKeepRecent() int
type TmKMS ¶
type TmKMS struct {
// Signing provider to be used by tmkms. Currently only `vault` is supported.
Provider TmKmsProvider `json:"provider"`
// Format and type of key for chain.
// Defaults to `{"type": "bech32", "account_key_prefix": "nibipub", "consensus_key_prefix": "nibivalconspub"}`.
// +optional
// +default={"type": "bech32", "account_key_prefix": "nibipub", "consensus_key_prefix": "nibivalconspub"}
KeyFormat *TmKmsKeyFormat `json:"keyFormat,omitempty"`
// Tendermint's protocol version to be used.
// Valid options are:
// - `v0.34` (default)
// - `v0.33`
// - `legacy`
// +optional
// +default="v0.34"
ValidatorProtocol *tmkms.ProtocolVersion `json:"validatorProtocol,omitempty"`
// Whether to persist "priv_validator_state.json" file on a PVC. Defaults to `true`.
// +optional
PersistState *bool `json:"persistState,omitempty"`
// Compute Resources for tmkms container.
// +optional
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
}
TmKMS allows configuring tmkms for signing for this validator node instead of using plaintext private key file.
func (*TmKMS) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TmKMS.
func (*TmKMS) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TmKMS) GetKeyFormat ¶
func (kms *TmKMS) GetKeyFormat() *TmKmsKeyFormat
func (*TmKMS) GetProtocolVersion ¶
func (kms *TmKMS) GetProtocolVersion() tmkms.ProtocolVersion
func (*TmKMS) GetResources ¶
func (kms *TmKMS) GetResources() corev1.ResourceRequirements
func (*TmKMS) ShouldPersistState ¶
type TmKmsHashicorpProvider ¶
type TmKmsHashicorpProvider struct {
// Full address of the Vault cluster.
Address string `json:"address"`
// Key to be used by this validator.
Key string `json:"key"`
// Secret containing the CA certificate of the Vault cluster.
// +optional
CertificateSecret *corev1.SecretKeySelector `json:"certificateSecret,omitempty"`
// Secret containing the token to be used.
TokenSecret *corev1.SecretKeySelector `json:"tokenSecret"`
// UploadGenerated indicates if the controller should upload the generated private key to vault.
// Defaults to `false`. Will be set to `true` if this validator is initializing a new genesis.
// This should not be used in production.
// +optional
UploadGenerated bool `json:"uploadGenerated,omitempty"`
// Whether to automatically renew vault token. Defaults to `false`.
// +optional
AutoRenewToken bool `json:"autoRenewToken,omitempty"`
// Whether to skip certificate verification. Defaults to `false`.
// +optional
SkipCertificateVerify bool `json:"skipCertificateVerify,omitempty"`
}
TmKmsHashicorpProvider holds `hashicorp` provider specific configurations.
func (*TmKmsHashicorpProvider) DeepCopy ¶
func (in *TmKmsHashicorpProvider) DeepCopy() *TmKmsHashicorpProvider
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TmKmsHashicorpProvider.
func (*TmKmsHashicorpProvider) DeepCopyInto ¶
func (in *TmKmsHashicorpProvider) DeepCopyInto(out *TmKmsHashicorpProvider)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TmKmsKeyFormat ¶
type TmKmsKeyFormat struct {
// Key type
Type string `json:"type"`
// Account keys prefixes
AccountKeyPrefix string `json:"account_key_prefix"`
// Consensus keys prefix
ConsensusKeyPrefix string `json:"consensus_key_prefix"`
}
TmKmsKeyFormat represents key format for tmKMS.
func (*TmKmsKeyFormat) DeepCopy ¶
func (in *TmKmsKeyFormat) DeepCopy() *TmKmsKeyFormat
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TmKmsKeyFormat.
func (*TmKmsKeyFormat) DeepCopyInto ¶
func (in *TmKmsKeyFormat) DeepCopyInto(out *TmKmsKeyFormat)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TmKmsProvider ¶
type TmKmsProvider struct {
// Hashicorp provider.
// +optional
Hashicorp *TmKmsHashicorpProvider `json:"hashicorp,omitempty"`
}
TmKmsProvider allows configuring providers for tmKMS. Note that only one should be configured.
func (*TmKmsProvider) DeepCopy ¶
func (in *TmKmsProvider) DeepCopy() *TmKmsProvider
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TmKmsProvider.
func (*TmKmsProvider) DeepCopyInto ¶
func (in *TmKmsProvider) DeepCopyInto(out *TmKmsProvider)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Upgrade ¶
type Upgrade struct {
// Height at which the upgrade should occur.
Height int64 `json:"height"`
// Container image replacement to be used in the upgrade.
Image string `json:"image"`
// Upgrade status.
Status UpgradePhase `json:"status"`
// Where cosmopilot got this upgrade from.
Source UpgradeSource `json:"source"`
}
Upgrade represents an upgrade processed by cosmopilot and added to status.
func (*Upgrade) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Upgrade.
func (*Upgrade) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Upgrade) GetVersion ¶
type UpgradePhase ¶
type UpgradePhase string
UpgradePhase indicates the current phase of an upgrade.
const ( // UpgradeImageMissing indicates that a scheduled upgrade is missing the image. UpgradeImageMissing UpgradePhase = "image-missing" // UpgradeScheduled indicates that the upgrade is scheduled and will be // performed by cosmopilot. UpgradeScheduled UpgradePhase = "scheduled" // UpgradeOnGoing indicates that the upgrade is on going. UpgradeOnGoing UpgradePhase = "ongoing" // UpgradeCompleted indicates that the upgrade was successfully finished. // Note: successfully finished means the container was restarted with the // new image. Application issues after the upgrade won't be detected. UpgradeCompleted UpgradePhase = "completed" // UpgradeSkipped indicates that cosmopilot will not perform the upgrade // because it is in the past. UpgradeSkipped UpgradePhase = "skipped" )
type UpgradeSource ¶
type UpgradeSource string
UpgradeSource indicates the source of a scheduled upgrade.
const ( // OnChainUpgrade represents an upgrade that was retrieved from governance // on chain. OnChainUpgrade UpgradeSource = "on-chain" // ManualUpgrade represents an upgrade that was manually specified by the user. ManualUpgrade UpgradeSource = "manual" )
type UpgradeSpec ¶
type UpgradeSpec struct {
// Height at which the upgrade should occur.
Height int64 `json:"height"`
// Container image replacement to be used in the upgrade.
Image string `json:"image"`
// Whether to force this upgrade to be processed as a gov planned upgrade.
// Defaults to `false`.
// +optional
ForceOnChain *bool `json:"forceOnChain,omitempty"`
}
UpgradeSpec represents a manual upgrade.
func (*UpgradeSpec) DeepCopy ¶
func (in *UpgradeSpec) DeepCopy() *UpgradeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeSpec.
func (*UpgradeSpec) DeepCopyInto ¶
func (in *UpgradeSpec) DeepCopyInto(out *UpgradeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UpgradeSpec) ForceGovUpgrade ¶
func (u *UpgradeSpec) ForceGovUpgrade() bool
func (*UpgradeSpec) GetVersion ¶
func (u *UpgradeSpec) GetVersion() string
type ValidatorConfig ¶
type ValidatorConfig struct {
// Indicates the secret containing the private key to be used by this validator.
// Defaults to `<chainnode>-priv-key`. Will be created if it does not exist.
// +optional
PrivateKeySecret *string `json:"privateKeySecret,omitempty"`
// Contains information details about this validator.
// +optional
Info *ValidatorInfo `json:"info,omitempty"`
// Specifies configs and initialization commands for creating a new genesis.
// +optional
Init *GenesisInitConfig `json:"init,omitempty"`
// TmKMS configuration for signing commits for this validator.
// When configured, .spec.validator.privateKeySecret will not be mounted on the validator node.
// +optional
TmKMS *TmKMS `json:"tmKMS,omitempty"`
// Indicates that cosmopilot should run create-validator tx to make this node a validator.
// +optional
CreateValidator *CreateValidatorConfig `json:"createValidator,omitempty"`
}
ValidatorConfig contains the configuration for running a node as validator.
func (*ValidatorConfig) DeepCopy ¶
func (in *ValidatorConfig) DeepCopy() *ValidatorConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorConfig.
func (*ValidatorConfig) DeepCopyInto ¶
func (in *ValidatorConfig) DeepCopyInto(out *ValidatorConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ValidatorConfig) GetAccountHDPath ¶
func (val *ValidatorConfig) GetAccountHDPath() string
func (*ValidatorConfig) GetAccountPrefix ¶
func (val *ValidatorConfig) GetAccountPrefix() string
func (*ValidatorConfig) GetAccountSecretName ¶
func (val *ValidatorConfig) GetAccountSecretName(obj client.Object) string
func (*ValidatorConfig) GetCommissionMaxChangeRate ¶
func (val *ValidatorConfig) GetCommissionMaxChangeRate() string
func (*ValidatorConfig) GetCommissionMaxRate ¶
func (val *ValidatorConfig) GetCommissionMaxRate() string
func (*ValidatorConfig) GetCommissionRate ¶
func (val *ValidatorConfig) GetCommissionRate() string
func (*ValidatorConfig) GetInitUnbondingTime ¶
func (val *ValidatorConfig) GetInitUnbondingTime() string
func (*ValidatorConfig) GetInitVotingPeriod ¶
func (val *ValidatorConfig) GetInitVotingPeriod() string
func (*ValidatorConfig) GetMinSelfDelegation ¶
func (val *ValidatorConfig) GetMinSelfDelegation() *string
func (*ValidatorConfig) GetPrivKeySecretName ¶
func (val *ValidatorConfig) GetPrivKeySecretName(obj client.Object) string
func (*ValidatorConfig) GetValPrefix ¶
func (val *ValidatorConfig) GetValPrefix() string
type ValidatorInfo ¶
type ValidatorInfo struct {
// Moniker to be used by this validator. Defaults to the ChainNode name.
// +optional
Moniker *string `json:"moniker,omitempty"`
// Details of this validator.
// +optional
Details *string `json:"details,omitempty"`
// Website of the validator.
// +optional
Website *string `json:"website,omitempty"`
// Identity signature of this validator.
// +optional
Identity *string `json:"identity,omitempty"`
}
ValidatorInfo contains information about this validator.
func (*ValidatorInfo) DeepCopy ¶
func (in *ValidatorInfo) DeepCopy() *ValidatorInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorInfo.
func (*ValidatorInfo) DeepCopyInto ¶
func (in *ValidatorInfo) DeepCopyInto(out *ValidatorInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValidatorStatus ¶
type ValidatorStatus string
ValidatorStatus represents the current status of a validator.
type VerticalAutoscalingConfig ¶ added in v1.44.0
type VerticalAutoscalingConfig struct {
// Enables vertical autoscaling for the pod.
Enabled bool `json:"enabled"`
// CPU resource autoscaling configuration.
// +optional
CPU *VerticalAutoscalingMetricConfig `json:"cpu,omitempty"`
// Memory resource autoscaling configuration.
// +optional
Memory *VerticalAutoscalingMetricConfig `json:"memory,omitempty"`
}
VerticalAutoscalingConfig defines rules and thresholds for vertical autoscaling of a pod.
func (*VerticalAutoscalingConfig) DeepCopy ¶ added in v1.44.0
func (in *VerticalAutoscalingConfig) DeepCopy() *VerticalAutoscalingConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerticalAutoscalingConfig.
func (*VerticalAutoscalingConfig) DeepCopyInto ¶ added in v1.44.0
func (in *VerticalAutoscalingConfig) DeepCopyInto(out *VerticalAutoscalingConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VerticalAutoscalingConfig) IsEnabled ¶ added in v1.44.0
func (vpa *VerticalAutoscalingConfig) IsEnabled() bool
type VerticalAutoscalingMetricConfig ¶ added in v1.44.0
type VerticalAutoscalingMetricConfig struct {
// Source determines whether to base autoscaling decisions on requests, limits, or effective limit.
// Valid values are:
// `effective-limit` (default) (use limits if set; otherwise fallback to requests)
// `requests` (use the pod’s requested resource value)
// `limits` (use the pod’s resource limit value)
// +optional
// +default="effective-limit"
Source *LimitSource `json:"source,omitempty"`
// Minimum resource value allowed during scaling (e.g. "100m" or "128Mi").
Min resource.Quantity `json:"min"`
// Maximum resource value allowed during scaling (e.g. "8000m" or "2Gi").
Max resource.Quantity `json:"max"`
// Rules define when and how scaling should occur based on sustained usage levels.
Rules []*VerticalAutoscalingRule `json:"rules"`
// Cooldown is the minimum duration to wait between consecutive scaling actions.
// Defaults to "5m".
// +optional
// +default="5m"
// +kubebuilder:validation:Format=duration
Cooldown *string `json:"cooldown,omitempty"`
// LimitStrategy controls how resource limits should be updated after autoscaling.
// Valid values are:
// `retain` (default) (keep original limits)
// `equal` (match request value)
// `max` (use configured VPA Max)
// `percentage` (request × percentage)
// `unset` (remove the limits field entirely)
// +optional
// +default="retain"
LimitStrategy *LimitUpdateStrategy `json:"limitStrategy,omitempty"`
// LimitPercentage defines the percentage multiplier to apply when using "percentage" LimitStrategy.
// For example, 150 means limit = request * 1.5.
// Only used when LimitStrategy = "percentage". Defaults to `150` when not set.
// +optional
LimitPercentage *int `json:"limitPercentage,omitempty"`
}
VerticalAutoscalingMetricConfig defines autoscaling behavior for a specific resource type (CPU or memory).
func (*VerticalAutoscalingMetricConfig) DeepCopy ¶ added in v1.44.0
func (in *VerticalAutoscalingMetricConfig) DeepCopy() *VerticalAutoscalingMetricConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerticalAutoscalingMetricConfig.
func (*VerticalAutoscalingMetricConfig) DeepCopyInto ¶ added in v1.44.0
func (in *VerticalAutoscalingMetricConfig) DeepCopyInto(out *VerticalAutoscalingMetricConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VerticalAutoscalingMetricConfig) GetCooldownDuration ¶ added in v1.44.0
func (vpam *VerticalAutoscalingMetricConfig) GetCooldownDuration() time.Duration
func (*VerticalAutoscalingMetricConfig) GetLimitPercentage ¶ added in v1.44.0
func (vpam *VerticalAutoscalingMetricConfig) GetLimitPercentage() int
func (*VerticalAutoscalingMetricConfig) GetLimitUpdateStrategy ¶ added in v1.44.0
func (vpam *VerticalAutoscalingMetricConfig) GetLimitUpdateStrategy() LimitUpdateStrategy
func (*VerticalAutoscalingMetricConfig) GetSource ¶ added in v1.44.0
func (vpam *VerticalAutoscalingMetricConfig) GetSource() LimitSource
type VerticalAutoscalingRule ¶ added in v1.44.0
type VerticalAutoscalingRule struct {
// Direction of scaling: "up" or "down".
Direction ScalingDirection `json:"direction"`
// UsagePercent is the resource usage percentage (0–100) that must be met.
// Usage is compared against the selected Source value.
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=100
UsagePercent int `json:"usagePercent"`
// Duration is the length of time the usage must remain above/below the threshold before scaling.
// Defaults to "5m".
// +optional
// +default="5m"
// +kubebuilder:validation:Format=duration
Duration *string `json:"duration,omitempty"`
// StepPercent defines how much to adjust the resource by, as a percentage of the current value.
// For example, 50 = scale by 50% of current value.
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=100
StepPercent int `json:"stepPercent"`
}
VerticalAutoscalingRule defines a single rule for when to trigger a scaling adjustment.
func (*VerticalAutoscalingRule) DeepCopy ¶ added in v1.44.0
func (in *VerticalAutoscalingRule) DeepCopy() *VerticalAutoscalingRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerticalAutoscalingRule.
func (*VerticalAutoscalingRule) DeepCopyInto ¶ added in v1.44.0
func (in *VerticalAutoscalingRule) DeepCopyInto(out *VerticalAutoscalingRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VerticalAutoscalingRule) GetDuration ¶ added in v1.44.0
func (vpar *VerticalAutoscalingRule) GetDuration() time.Duration
type VolumeSnapshotsConfig ¶
type VolumeSnapshotsConfig struct {
// How often a snapshot should be created.
// +kubebuilder:validation:Format=duration
Frequency string `json:"frequency"`
// How long a snapshot should be retained. Default is indefinite retention.
// +optional
// +kubebuilder:validation:Format=duration
Retention *string `json:"retention,omitempty"`
// Name of the volume snapshot class to be used. Uses the default class if not specified.
// +optional
SnapshotClassName *string `json:"snapshotClass,omitempty"`
// Whether the node should be stopped while the snapshot is taken. Defaults to `false`.
// +optional
// +default=false
StopNode *bool `json:"stopNode,omitempty"`
// Whether to create a tarball of data directory in each snapshot and upload it to external storage.
// +optional
ExportTarball *ExportTarballConfig `json:"exportTarball,omitempty"`
// Whether cosmopilot should verify the snapshot for corruption after it is ready. Defaults to `false`.
// +optional
// +default=false
Verify *bool `json:"verify,omitempty"`
// Whether to disable snapshots while the node is syncing
// +optional
DisableWhileSyncing *bool `json:"disableWhileSyncing,omitempty"`
}
VolumeSnapshotsConfig holds the configuration of snapshotting feature.
func (*VolumeSnapshotsConfig) DeepCopy ¶
func (in *VolumeSnapshotsConfig) DeepCopy() *VolumeSnapshotsConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotsConfig.
func (*VolumeSnapshotsConfig) DeepCopyInto ¶
func (in *VolumeSnapshotsConfig) DeepCopyInto(out *VolumeSnapshotsConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VolumeSnapshotsConfig) ShouldDisableWhileSyncing ¶
func (s *VolumeSnapshotsConfig) ShouldDisableWhileSyncing() bool
func (*VolumeSnapshotsConfig) ShouldExportTarballs ¶
func (s *VolumeSnapshotsConfig) ShouldExportTarballs() bool
func (*VolumeSnapshotsConfig) ShouldStopNode ¶
func (s *VolumeSnapshotsConfig) ShouldStopNode() bool
func (*VolumeSnapshotsConfig) ShouldVerify ¶
func (s *VolumeSnapshotsConfig) ShouldVerify() bool
type VolumeSpec ¶
type VolumeSpec struct {
// The name of the volume.
Name string `json:"name"`
// Size of the volume.
Size string `json:"size"`
// The path at which this volume should be mounted
Path string `json:"path"`
// Name of the storage class to use for this volume. Uses the default class if not specified.
// +optional
StorageClassName *string `json:"storageClass,omitempty"`
// Whether this volume should be deleted when node is deleted. Defaults to `false`.
// +optional
DeleteWithNode *bool `json:"deleteWithNode,omitempty"`
}
func (*VolumeSpec) DeepCopy ¶
func (in *VolumeSpec) DeepCopy() *VolumeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSpec.
func (*VolumeSpec) DeepCopyInto ¶
func (in *VolumeSpec) DeepCopyInto(out *VolumeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VolumeSpec) ShouldDeleteWithNode ¶
func (v *VolumeSpec) ShouldDeleteWithNode() bool