Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the vko v1 API group. +kubebuilder:object:generate=true +groupName=vko.gtrfc.com
Index ¶
- Variables
- func UnreadyWhenDefault(v *bool) bool
- type AuthSpec
- type CertManagerIssuerSpec
- type CertManagerSpec
- type ConditionType
- type MetricsSpec
- type NetworkPolicySpec
- type ObserverLogLevel
- type ObserverMTLSSpec
- type ObserverSpec
- type ObserverUnreadyWhenSpec
- type PersistenceMode
- type PersistenceSpec
- type RollingUpdateSpec
- type SentinelSpec
- type TLSSpec
- type Valkey
- func (in *Valkey) DeepCopy() *Valkey
- func (in *Valkey) DeepCopyInto(out *Valkey)
- func (in *Valkey) DeepCopyObject() runtime.Object
- func (v *Valkey) GetObserverDB() int
- func (v *Valkey) GetObserverLogLevel() string
- func (v *Valkey) GetObserverResources() corev1.ResourceRequirements
- func (v *Valkey) GetObserverUnreadyWhen() ObserverUnreadyWhenSpec
- func (v *Valkey) GetSyncTimeout() time.Duration
- func (v *Valkey) IsAuthEnabled() bool
- func (v *Valkey) IsCertManagerEnabled() bool
- func (v *Valkey) IsMetricsEnabled() bool
- func (v *Valkey) IsMultiReplicaWithoutSentinel() bool
- func (v *Valkey) IsNetworkPolicyEnabled() bool
- func (v *Valkey) IsObserverEnabled() bool
- func (v *Valkey) IsObserverMTLSActive() bool
- func (v *Valkey) IsObserverSentinelMTLSEnabled() bool
- func (v *Valkey) IsObserverValkeyMTLSEnabled() bool
- func (v *Valkey) IsPersistenceEnabled() bool
- func (v *Valkey) IsSentinelAuthDisabled() bool
- func (v *Valkey) IsSentinelEnabled() bool
- func (v *Valkey) IsSentinelUnencryptedAllowed() bool
- func (v *Valkey) IsTLSEnabled() bool
- func (v *Valkey) IsTLSSecretProvided() bool
- func (v *Valkey) IsUnifiedCertificateEnabled() bool
- func (v *Valkey) IsValkeyUnencryptedAllowed() bool
- type ValkeyList
- type ValkeyPhase
- type ValkeySpec
- type ValkeyStatus
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "vko.gtrfc.com", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionResource scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func UnreadyWhenDefault ¶ added in v1.8.0
UnreadyWhenDefault returns the effective bool value for an unreadyWhen field. A nil pointer means "use default", which is true.
Types ¶
type AuthSpec ¶
type AuthSpec struct {
// SecretName is the name of the Kubernetes Secret containing the password.
// +optional
SecretName string `json:"secretName,omitempty"`
// SecretPasswordKey is the key within the Secret that holds the password.
// +kubebuilder:default=password
// +optional
SecretPasswordKey string `json:"secretPasswordKey,omitempty"`
}
AuthSpec defines authentication configuration for Valkey.
func (*AuthSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthSpec.
func (*AuthSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CertManagerIssuerSpec ¶
type CertManagerIssuerSpec struct {
// Group is the API group of the issuer (defaults to cert-manager.io).
// +kubebuilder:default="cert-manager.io"
// +optional
Group string `json:"group,omitempty"`
// Kind is the kind of the issuer (Issuer or ClusterIssuer).
// +kubebuilder:validation:Enum=Issuer;ClusterIssuer
Kind string `json:"kind"`
// Name is the name of the issuer resource.
Name string `json:"name"`
}
CertManagerIssuerSpec defines the cert-manager issuer reference.
func (*CertManagerIssuerSpec) DeepCopy ¶
func (in *CertManagerIssuerSpec) DeepCopy() *CertManagerIssuerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertManagerIssuerSpec.
func (*CertManagerIssuerSpec) DeepCopyInto ¶
func (in *CertManagerIssuerSpec) DeepCopyInto(out *CertManagerIssuerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CertManagerSpec ¶
type CertManagerSpec struct {
// Issuer references the cert-manager issuer to use.
Issuer CertManagerIssuerSpec `json:"issuer"`
// ExtraDNSNames specifies additional DNS names to include in the certificate
// beyond the automatically generated ones (pod DNS names, service names).
// +optional
ExtraDNSNames []string `json:"extraDnsNames,omitempty"`
}
CertManagerSpec defines the cert-manager configuration.
func (*CertManagerSpec) DeepCopy ¶
func (in *CertManagerSpec) DeepCopy() *CertManagerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertManagerSpec.
func (*CertManagerSpec) DeepCopyInto ¶
func (in *CertManagerSpec) DeepCopyInto(out *CertManagerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConditionType ¶ added in v1.2.0
type ConditionType = string
ConditionType is the type identifier for a status condition.
const ( // ConditionTypeSidecarUpdatePending is set on standalone Valkey instances when // the sidecar container image has drifted from the desired version. // Standalone pods are not automatically restarted for sidecar-only changes; // the update will occur on the next pod restart (manual delete or image change). ConditionTypeSidecarUpdatePending ConditionType = "SidecarUpdatePending" // ConditionTypeRollingUpdatePaused is set when a rolling update is paused // because a replaced pod failed to sync within the configured timeout. // The operator will not resume until the user applies a new spec change. ConditionTypeRollingUpdatePaused ConditionType = "RollingUpdatePaused" )
type MetricsSpec ¶
type MetricsSpec struct {
// Enabled activates the metrics exporter sidecar.
// +kubebuilder:default=false
Enabled bool `json:"enabled,omitempty"`
}
MetricsSpec defines metrics/exporter configuration.
func (*MetricsSpec) DeepCopy ¶
func (in *MetricsSpec) DeepCopy() *MetricsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsSpec.
func (*MetricsSpec) DeepCopyInto ¶
func (in *MetricsSpec) DeepCopyInto(out *MetricsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkPolicySpec ¶
type NetworkPolicySpec struct {
// Enabled activates NetworkPolicy creation.
// +kubebuilder:default=false
Enabled bool `json:"enabled,omitempty"`
// NamePrefix is prepended to generated NetworkPolicy names.
// +optional
NamePrefix string `json:"namePrefix,omitempty"`
}
NetworkPolicySpec defines network policy configuration.
func (*NetworkPolicySpec) DeepCopy ¶
func (in *NetworkPolicySpec) DeepCopy() *NetworkPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicySpec.
func (*NetworkPolicySpec) DeepCopyInto ¶
func (in *NetworkPolicySpec) DeepCopyInto(out *NetworkPolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObserverLogLevel ¶ added in v1.8.0
type ObserverLogLevel string
ObserverLogLevel defines the log verbosity for the observer process. +kubebuilder:validation:Enum=debug;info;warn;error
const ( // ObserverLogLevelDebug enables verbose logging including stack traces for all errors. ObserverLogLevelDebug ObserverLogLevel = "debug" // ObserverLogLevelInfo is the default level; expected check failures are logged without stack traces. ObserverLogLevelInfo ObserverLogLevel = "info" // ObserverLogLevelWarn suppresses info-level messages. ObserverLogLevelWarn ObserverLogLevel = "warn" // ObserverLogLevelError only emits error-level messages. ObserverLogLevelError ObserverLogLevel = "error" )
type ObserverMTLSSpec ¶ added in v1.6.0
type ObserverMTLSSpec struct {
// Valkey controls whether the observer sends a client certificate to Valkey pods.
// Set to true to enable mTLS; when nil or false, no client certificate is sent.
// Default: false.
// +optional
Valkey *bool `json:"valkey,omitempty"`
// Sentinel controls whether the observer sends a client certificate to Sentinel pods.
// When nil or false, only the CA certificate is used (no client certificate).
// Set to true to enable mTLS for Sentinel connections.
// Default: false.
// +optional
Sentinel *bool `json:"sentinel,omitempty"`
}
ObserverMTLSSpec controls whether the observer presents client certificates for its connections to Valkey and Sentinel. Only effective when spec.tls.enabled is true. Sending a client certificate enables mutual TLS (mTLS); omitting it means the observer only verifies the server certificate.
func (*ObserverMTLSSpec) DeepCopy ¶ added in v1.6.0
func (in *ObserverMTLSSpec) DeepCopy() *ObserverMTLSSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObserverMTLSSpec.
func (*ObserverMTLSSpec) DeepCopyInto ¶ added in v1.6.0
func (in *ObserverMTLSSpec) DeepCopyInto(out *ObserverMTLSSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObserverSpec ¶ added in v1.5.0
type ObserverSpec struct {
// Enabled activates the observer deployment.
// +kubebuilder:default=false
Enabled bool `json:"enabled,omitempty"`
// DB is the Valkey database number used for the health check key.
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=15
// +optional
DB *int `json:"db,omitempty"`
// MTLS configures mutual TLS behaviour for the observer's outbound connections.
// Only effective when spec.tls.enabled is true.
// +optional
MTLS *ObserverMTLSSpec `json:"mtls,omitempty"`
// Resources defines the compute resource requirements for the observer container.
// +optional
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
// LogLevel sets the verbosity of observer log output.
// At debug level, stack traces are included for all errors.
// At info, warn, and error levels, stack traces are suppressed.
// +kubebuilder:validation:Enum=debug;info;warn;error
// +kubebuilder:default=info
// +optional
LogLevel ObserverLogLevel `json:"logLevel,omitempty"`
// UnreadyWhen configures which check failures cause the observer to report
// unReady. Omitting a field is equivalent to true (failure causes unReady).
// Failures are always logged regardless of this setting.
// +optional
UnreadyWhen *ObserverUnreadyWhenSpec `json:"unreadyWhen,omitempty"`
}
ObserverSpec defines the observer configuration for cluster health monitoring.
func (*ObserverSpec) DeepCopy ¶ added in v1.5.0
func (in *ObserverSpec) DeepCopy() *ObserverSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObserverSpec.
func (*ObserverSpec) DeepCopyInto ¶ added in v1.5.0
func (in *ObserverSpec) DeepCopyInto(out *ObserverSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObserverUnreadyWhenSpec ¶ added in v1.8.0
type ObserverUnreadyWhenSpec struct {
// MasterUnreachable: PING to the master node fails.
// +kubebuilder:default=true
// +optional
MasterUnreachable *bool `json:"masterUnreachable,omitempty"`
// WriteTestFailure: health key cannot be written to the master.
// +kubebuilder:default=true
// +optional
WriteTestFailure *bool `json:"writeTestFailure,omitempty"`
// ReadTestFailure: health key cannot be read back from the master.
// +kubebuilder:default=true
// +optional
ReadTestFailure *bool `json:"readTestFailure,omitempty"`
// ReplicaSyncFailure: a replica is disconnected or bulk sync is in progress.
// +kubebuilder:default=true
// +optional
ReplicaSyncFailure *bool `json:"replicaSyncFailure,omitempty"`
// ReplicaReadTestFailure: a replica returns stale or missing health key data.
// +kubebuilder:default=true
// +optional
ReplicaReadTestFailure *bool `json:"replicaReadTestFailure,omitempty"`
// SentinelUnreachable: one or more Sentinel instances do not respond to PING.
// +kubebuilder:default=true
// +optional
SentinelUnreachable *bool `json:"sentinelUnreachable,omitempty"`
// SentinelQuorumFailure: Sentinels disagree on the current master address.
// +kubebuilder:default=true
// +optional
SentinelQuorumFailure *bool `json:"sentinelQuorumFailure,omitempty"`
// SentinelMasterDown: Sentinel reports s_down or o_down flags on the master.
// +kubebuilder:default=true
// +optional
SentinelMasterDown *bool `json:"sentinelMasterDown,omitempty"`
// SentinelMasterHostnameInvalid: Sentinel reports a bare IP instead of a
// DNS hostname for the master.
// +kubebuilder:default=true
// +optional
SentinelMasterHostnameInvalid *bool `json:"sentinelMasterHostnameInvalid,omitempty"`
// SentinelReplicaHostnamesInvalid: Sentinel reports bare IPs instead of
// DNS hostnames for one or more replicas.
// +kubebuilder:default=true
// +optional
SentinelReplicaHostnamesInvalid *bool `json:"sentinelReplicaHostnamesInvalid,omitempty"`
}
ObserverUnreadyWhenSpec controls which check failures cause the observer to report unReady. When a field is false, the failure is still logged but the ready state is not affected by that check. All fields default to true.
func (*ObserverUnreadyWhenSpec) DeepCopy ¶ added in v1.8.0
func (in *ObserverUnreadyWhenSpec) DeepCopy() *ObserverUnreadyWhenSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObserverUnreadyWhenSpec.
func (*ObserverUnreadyWhenSpec) DeepCopyInto ¶ added in v1.8.0
func (in *ObserverUnreadyWhenSpec) DeepCopyInto(out *ObserverUnreadyWhenSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PersistenceMode ¶
type PersistenceMode string
PersistenceMode defines the persistence strategy for Valkey. +kubebuilder:validation:Enum=rdb;aof;both
const ( // PersistenceModeRDB enables RDB snapshotting. PersistenceModeRDB PersistenceMode = "rdb" // PersistenceModeAOF enables append-only file persistence. PersistenceModeAOF PersistenceMode = "aof" // PersistenceModeBoth enables both RDB and AOF persistence. PersistenceModeBoth PersistenceMode = "both" )
type PersistenceSpec ¶
type PersistenceSpec struct {
// Enabled activates persistent storage for Valkey data.
// +kubebuilder:default=false
Enabled bool `json:"enabled,omitempty"`
// Mode selects the persistence strategy: rdb, aof, or both.
// +kubebuilder:default=rdb
// +optional
Mode PersistenceMode `json:"mode,omitempty"`
// StorageClass is the name of the StorageClass to use. Empty string means default.
// +optional
StorageClass string `json:"storageClass,omitempty"`
// Size is the requested storage size.
// +kubebuilder:default="1Gi"
// +optional
Size resource.Quantity `json:"size,omitempty"`
}
PersistenceSpec defines data persistence configuration.
func (*PersistenceSpec) DeepCopy ¶
func (in *PersistenceSpec) DeepCopy() *PersistenceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistenceSpec.
func (*PersistenceSpec) DeepCopyInto ¶
func (in *PersistenceSpec) DeepCopyInto(out *PersistenceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RollingUpdateSpec ¶ added in v1.7.0
type RollingUpdateSpec struct {
// SyncTimeout is the maximum duration to wait for a replaced pod to
// complete replication sync before pausing the rolling update.
// Default: 5m.
// +optional
SyncTimeout *metav1.Duration `json:"syncTimeout,omitempty"`
}
RollingUpdateSpec configures the behaviour of rolling updates.
func (*RollingUpdateSpec) DeepCopy ¶ added in v1.7.0
func (in *RollingUpdateSpec) DeepCopy() *RollingUpdateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingUpdateSpec.
func (*RollingUpdateSpec) DeepCopyInto ¶ added in v1.7.0
func (in *RollingUpdateSpec) DeepCopyInto(out *RollingUpdateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SentinelSpec ¶
type SentinelSpec struct {
// Enabled activates Sentinel-based HA mode.
// +kubebuilder:default=false
Enabled bool `json:"enabled,omitempty"`
// Replicas is the number of Sentinel instances to run.
// +kubebuilder:validation:Minimum=1
// +kubebuilder:default=3
Replicas int32 `json:"replicas,omitempty"`
// PodLabels are additional labels applied to Sentinel pods.
// +optional
PodLabels map[string]string `json:"podLabels,omitempty"`
// PodAnnotations are additional annotations applied to Sentinel pods.
// +optional
PodAnnotations map[string]string `json:"podAnnotations,omitempty"`
// AllowUnencrypted keeps the plaintext Sentinel port (26379) open alongside the TLS port (36379).
// Only effective when spec.tls.enabled is true. Default: false.
// +kubebuilder:default=false
// +optional
AllowUnencrypted bool `json:"allowUnencrypted,omitempty"`
// DisableAuth disables password authentication for Sentinel client connections.
// When true, Sentinel does not require a password from connecting clients
// (no requirepass directive), but still uses sentinel auth-pass to
// authenticate with Valkey nodes. Only effective when spec.auth is configured.
// Default: false (Sentinel requires the same password as Valkey).
// +kubebuilder:default=false
// +optional
DisableAuth bool `json:"disableAuth,omitempty"`
}
SentinelSpec defines the Sentinel configuration embedded in the Valkey CRD.
func (*SentinelSpec) DeepCopy ¶
func (in *SentinelSpec) DeepCopy() *SentinelSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentinelSpec.
func (*SentinelSpec) DeepCopyInto ¶
func (in *SentinelSpec) DeepCopyInto(out *SentinelSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSSpec ¶
type TLSSpec struct {
// Enabled activates TLS encryption.
// +kubebuilder:default=false
Enabled bool `json:"enabled,omitempty"`
// CertManager configures cert-manager integration for automatic certificate management.
// Mutually exclusive with SecretName.
// +optional
CertManager *CertManagerSpec `json:"certManager,omitempty"`
// SecretName references an existing Kubernetes Secret containing TLS certificates.
// The Secret must contain keys: tls.crt, tls.key, and ca.crt.
// Mutually exclusive with CertManager.
// +optional
SecretName string `json:"secretName,omitempty"`
// AllowUnencrypted keeps the plaintext Valkey port (6379) open alongside the TLS port (16379).
// Internal replication always uses TLS. Default: false (plaintext port disabled when TLS is active).
// +kubebuilder:default=false
// +optional
AllowUnencrypted bool `json:"allowUnencrypted,omitempty"`
// UnifiedCertificate, when true, makes Valkey and Sentinel share a single
// TLS certificate / Secret that covers both sets of hostnames. With
// cert-manager, the operator issues one Certificate (instead of one per
// component) and migrates existing clusters by deleting the legacy
// <name>-sentinel-tls Certificate and Secret once the Sentinel StatefulSet
// has switched to the unified Secret. With a user-provided Secret, both
// StatefulSets already mount that Secret, so the flag is informational.
// This avoids TLS verification errors in clients (e.g., go-redis Sentinel
// mode) that share one tls.Config across the Sentinel discovery and the
// Valkey master connection.
// +kubebuilder:default=false
// +optional
UnifiedCertificate bool `json:"unifiedCertificate,omitempty"`
}
TLSSpec defines TLS configuration for Valkey.
func (*TLSSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSSpec.
func (*TLSSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Valkey ¶
type Valkey struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ValkeySpec `json:"spec,omitempty"`
Status ValkeyStatus `json:"status,omitempty"`
}
Valkey is the Schema for the valkeys API.
func (*Valkey) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Valkey.
func (*Valkey) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Valkey) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Valkey) GetObserverDB ¶ added in v1.5.0
GetObserverDB returns the Valkey database number for the observer health key.
func (*Valkey) GetObserverLogLevel ¶ added in v1.8.0
GetObserverLogLevel returns the configured observer log level, defaulting to "info".
func (*Valkey) GetObserverResources ¶ added in v1.5.0
func (v *Valkey) GetObserverResources() corev1.ResourceRequirements
GetObserverResources returns the resource requirements for the observer container.
func (*Valkey) GetObserverUnreadyWhen ¶ added in v1.8.0
func (v *Valkey) GetObserverUnreadyWhen() ObserverUnreadyWhenSpec
GetObserverUnreadyWhen returns the effective UnreadyWhen config, never nil — falls back to all-true defaults when spec.observer.unreadyWhen is not set.
func (*Valkey) GetSyncTimeout ¶ added in v1.7.0
GetSyncTimeout returns the configured sync timeout for rolling updates, defaulting to 5 minutes if not set.
func (*Valkey) IsAuthEnabled ¶
IsAuthEnabled returns true if authentication is configured.
func (*Valkey) IsCertManagerEnabled ¶
IsCertManagerEnabled returns true if TLS is enabled and cert-manager is configured.
func (*Valkey) IsMetricsEnabled ¶
IsMetricsEnabled returns true if metrics exporter is enabled.
func (*Valkey) IsMultiReplicaWithoutSentinel ¶ added in v1.3.4
IsMultiReplicaWithoutSentinel returns true when more than one replica is requested but Sentinel is not enabled. In this mode the operator uses a simple ordinal-based init container to assign pod-0 as master.
func (*Valkey) IsNetworkPolicyEnabled ¶
IsNetworkPolicyEnabled returns true if network policies are enabled.
func (*Valkey) IsObserverEnabled ¶ added in v1.5.0
IsObserverEnabled returns true if the observer deployment is configured and enabled.
func (*Valkey) IsObserverMTLSActive ¶ added in v1.6.0
IsObserverMTLSActive returns true when at least one of the observer's mTLS targets is enabled, meaning the TLS secret must be mounted.
func (*Valkey) IsObserverSentinelMTLSEnabled ¶ added in v1.6.0
IsObserverSentinelMTLSEnabled returns true when the observer should send client certificates to Sentinel pods. Defaults to false when not explicitly configured.
func (*Valkey) IsObserverValkeyMTLSEnabled ¶ added in v1.6.0
IsObserverValkeyMTLSEnabled returns true when the observer should send client certificates to Valkey pods. Defaults to false when not explicitly configured.
func (*Valkey) IsPersistenceEnabled ¶
IsPersistenceEnabled returns true if persistence is configured and enabled.
func (*Valkey) IsSentinelAuthDisabled ¶ added in v1.4.0
IsSentinelAuthDisabled returns true when auth is configured but Sentinel client connections should not require a password (no requirepass directive). Sentinel still uses sentinel auth-pass to authenticate with Valkey nodes.
func (*Valkey) IsSentinelEnabled ¶
IsSentinelEnabled returns true if Sentinel HA mode is configured and enabled.
func (*Valkey) IsSentinelUnencryptedAllowed ¶ added in v1.3.0
IsSentinelUnencryptedAllowed returns true when TLS is enabled but the plaintext Sentinel port (26379) should remain open alongside the TLS port (36379).
func (*Valkey) IsTLSEnabled ¶
IsTLSEnabled returns true if TLS is configured and enabled.
func (*Valkey) IsTLSSecretProvided ¶
IsTLSSecretProvided returns true if TLS is enabled with a user-provided Secret.
func (*Valkey) IsUnifiedCertificateEnabled ¶ added in v1.10.0
IsUnifiedCertificateEnabled returns true if Valkey and Sentinel should share a single TLS certificate / Secret. With cert-manager this changes the issued Certificate to cover both hostname sets; with a user-provided Secret the flag is informational (both StatefulSets already mount the same Secret). When Sentinel is disabled, the flag has no observable effect.
func (*Valkey) IsValkeyUnencryptedAllowed ¶ added in v1.3.0
IsValkeyUnencryptedAllowed returns true when TLS is enabled but the plaintext Valkey port (6379) should remain open alongside the TLS port (16379).
type ValkeyList ¶
type ValkeyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Valkey `json:"items"`
}
ValkeyList contains a list of Valkey.
func (*ValkeyList) DeepCopy ¶
func (in *ValkeyList) DeepCopy() *ValkeyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValkeyList.
func (*ValkeyList) DeepCopyInto ¶
func (in *ValkeyList) DeepCopyInto(out *ValkeyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ValkeyList) DeepCopyObject ¶
func (in *ValkeyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ValkeyPhase ¶
type ValkeyPhase string
ValkeyPhase describes the current phase of the Valkey instance.
const ( // ValkeyPhaseOK indicates a healthy instance. ValkeyPhaseOK ValkeyPhase = "OK" // ValkeyPhaseProvisioning indicates the instance is being set up. ValkeyPhaseProvisioning ValkeyPhase = "Provisioning" // ValkeyphaseSyncing indicates replication is in progress. ValkeyphaseSyncing ValkeyPhase = "Syncing" // ValkeyPhaseRollingUpdate indicates a rolling update is in progress. ValkeyPhaseRollingUpdate ValkeyPhase = "Rolling Update" // ValkeyPhaseFailover indicates a failover is in progress. ValkeyPhaseFailover ValkeyPhase = "Failover in progress" // ValkeyPhaseError indicates an error state. ValkeyPhaseError ValkeyPhase = "Error" )
type ValkeySpec ¶
type ValkeySpec struct {
// Replicas is the number of Valkey instances to run.
// +kubebuilder:validation:Minimum=1
// +kubebuilder:default=1
Replicas int32 `json:"replicas,omitempty"`
// Image is the Valkey container image to use.
// +kubebuilder:validation:MinLength=1
Image string `json:"image"`
// Sentinel configures Sentinel-based HA mode.
// +optional
Sentinel *SentinelSpec `json:"sentinel,omitempty"`
// Auth configures authentication.
// +optional
Auth *AuthSpec `json:"auth,omitempty"`
// TLS configures TLS encryption.
// +optional
TLS *TLSSpec `json:"tls,omitempty"`
// Metrics configures the metrics exporter.
// +optional
Metrics *MetricsSpec `json:"metrics,omitempty"`
// NetworkPolicy configures network policies.
// +optional
NetworkPolicy *NetworkPolicySpec `json:"networkPolicy,omitempty"`
// Persistence configures data persistence.
// +optional
Persistence *PersistenceSpec `json:"persistence,omitempty"`
// Observer configures the observer deployment for cluster health monitoring.
// +optional
Observer *ObserverSpec `json:"observer,omitempty"`
// PodLabels are additional labels applied to Valkey pods.
// +optional
PodLabels map[string]string `json:"podLabels,omitempty"`
// PodAnnotations are additional annotations applied to Valkey pods.
// +optional
PodAnnotations map[string]string `json:"podAnnotations,omitempty"`
// Resources defines the compute resource requirements for Valkey containers.
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// RollingUpdate configures rolling update behaviour.
// +optional
RollingUpdate *RollingUpdateSpec `json:"rollingUpdate,omitempty"`
}
ValkeySpec defines the desired state of Valkey.
func (*ValkeySpec) DeepCopy ¶
func (in *ValkeySpec) DeepCopy() *ValkeySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValkeySpec.
func (*ValkeySpec) DeepCopyInto ¶
func (in *ValkeySpec) DeepCopyInto(out *ValkeySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValkeyStatus ¶
type ValkeyStatus struct {
// ReadyReplicas is the number of ready Valkey instances.
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
// MasterPod is the name of the current master pod.
// +optional
MasterPod string `json:"masterPod,omitempty"`
// Phase describes the current lifecycle phase of the Valkey cluster.
// +optional
Phase ValkeyPhase `json:"phase,omitempty"`
// Message is a human-readable description of the current state.
// +optional
Message string `json:"message,omitempty"`
// OperatorVersion is the version of the operator that last reconciled this resource.
// +optional
OperatorVersion string `json:"operatorVersion,omitempty"`
// ObserverReady indicates whether the observer deployment is ready.
// Only set when observer is enabled.
// +optional
ObserverReady *bool `json:"observerReady,omitempty"`
// Conditions represent the latest available observations of the Valkey state.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
ValkeyStatus defines the observed state of Valkey.
func (*ValkeyStatus) DeepCopy ¶
func (in *ValkeyStatus) DeepCopy() *ValkeyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValkeyStatus.
func (*ValkeyStatus) DeepCopyInto ¶
func (in *ValkeyStatus) DeepCopyInto(out *ValkeyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.