Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(controller): Support cluster-preferred-endpoint-type valkey application configuration option #199

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api/v1/valkey_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ type ValkeySpec struct {

// Node Selector
NodeSelector map[string]string `json:"nodeSelector,omitempty"`

// Which endpoint is shown as the preferred endpoint valid values are 'ip', 'hostname', or 'unknown-endpoint'.
// +kubebuilder:default:="ip"
// +kubebuilder:validation:Enum=ip;hostname;unknown-endpoint
ClusterPreferredEndpointType string `json:"clusterPreferredEndpointType,omitempty"`
}

// ExternalAccess defines the external access configuration
Expand Down
9 changes: 9 additions & 0 deletions config/crd/bases/hyperspike.io_valkeys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ spec:
default: cluster.local
description: Cluster Domain - used for DNS
type: string
clusterPreferredEndpointType:
default: ip
description: Which endpoint is shown as the preferred endpoint valid
values are 'ip', 'hostname', or 'unknown-endpoint'.
enum:
- ip
- hostname
- unknown-endpoint
type: string
exporterImage:
description: Exporter Image to use
type: string
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/scripts/valkey.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1746,7 +1746,7 @@ cluster-config-file /data/nodes.conf
# the client to reach out on the same endpoint it used for making the last request, but use
# the port provided in the response.

cluster-preferred-endpoint-type hostname
cluster-preferred-endpoint-type {{ .Spec.ClusterPreferredEndpointType }}

########################## CLUSTER DOCKER/NAT support ########################

Expand Down
Loading