@@ -45,113 +45,134 @@ type ValkeySpec struct {
45
45
46
46
// Turn on an init container to set permissions on the persistent volume
47
47
// +kubebuilder:default:=false
48
- VolumePermissions bool `json:"volumePermissions,omitempty "`
48
+ VolumePermissions bool `json:"volumePermissions"`
49
49
50
50
// TLS Support
51
51
// +kubebuilder:default:=false
52
+ // +optional
52
53
TLS bool `json:"tls,omitempty"`
53
54
// Certificate Issuer
55
+ // +optional
54
56
CertIssuer string `json:"certIssuer,omitempty"`
55
57
// Certificate Issuer Type
56
58
// +kubebuilder:default:="ClusterIssuer"
57
59
// +kubebuilder:validation:Enum=ClusterIssuer;Issuer
60
+ // +optional
58
61
CertIssuerType string `json:"certIssuerType,omitempty"`
59
62
60
63
// Enable prometheus
61
64
// +kubebuilder:default:=false
62
- Prometheus bool `json:"prometheus,omitempty "`
65
+ Prometheus bool `json:"prometheus"`
63
66
// Extra prometheus labels for operator targeting
67
+ // +optional
64
68
PrometheusLabels map [string ]string `json:"prometheusLabels,omitempty"`
65
69
66
70
// Cluster Domain - used for DNS
67
71
// +kubebuilder:default:=cluster.local
68
- ClusterDomain string `json:"clusterDomain,omitempty "`
72
+ ClusterDomain string `json:"clusterDomain"`
69
73
70
74
// Persistent volume claim
75
+ // +optional
71
76
Storage * corev1.PersistentVolumeClaim `json:"storage,omitempty"`
72
77
73
78
// Resources requirements and limits for the Valkey Server container
79
+ // +optional
74
80
Resources * corev1.ResourceRequirements `json:"resources,omitempty"`
75
81
76
82
// External access configuration
83
+ // +optional
77
84
ExternalAccess * ExternalAccess `json:"externalAccess,omitempty"`
78
85
79
86
// Anonymous Auth
80
87
// +kubebuilder:default:=false
81
- AnonymousAuth bool `json:"anonymousAuth,omitempty "`
88
+ AnonymousAuth bool `json:"anonymousAuth"`
82
89
83
90
// Service Password
91
+ // +optional
84
92
ServicePassword * corev1.SecretKeySelector `json:"servicePassword,omitempty"`
85
93
86
94
// Tolerations
95
+ // +optional
87
96
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
88
97
89
98
// Node Selector
99
+ // +optional
90
100
NodeSelector map [string ]string `json:"nodeSelector,omitempty"`
91
101
92
102
// Which endpoint is shown as the preferred endpoint valid values are 'ip', 'hostname', or 'unknown-endpoint'.
93
103
// +kubebuilder:default:="ip"
94
104
// +kubebuilder:validation:Enum=ip;hostname;unknown-endpoint
105
+ // +optional
95
106
ClusterPreferredEndpointType string `json:"clusterPreferredEndpointType,omitempty"`
96
107
}
97
108
98
109
// ExternalAccess defines the external access configuration
99
110
type ExternalAccess struct {
100
111
// Enable external access
101
112
// +kubebuilder:default:=false
102
- Enabled bool `json:"enabled,omitempty "`
113
+ Enabled bool `json:"enabled"`
103
114
104
115
// External access type
105
116
// LoadBalancer or Proxy, the LoadBalancer type will create a LoadBalancer service for each Valkey Shard (master node)
106
117
// The Proxy type will create a single LoadBalancer service and use an envoy proxy to route traffic to the Valkey Shards
107
118
// +kubebuilder:default:=Proxy
108
119
// +kubebuilder:validation:Enum=LoadBalancer;Proxy
109
- Type string `json:"type,omitempty "`
120
+ Type string `json:"type"`
110
121
111
122
// Proxy Settings
123
+ // +optional
112
124
Proxy * ProxySettings `json:"proxy,omitempty"`
113
125
114
126
// LoadBalancer Settings
115
127
LoadBalancer * LoadBalancerSettings `json:"loadBalancer,omitempty"`
116
128
117
129
// Cert Issuer for external access TLS certificate
130
+ // +optional
118
131
CertIssuer string `json:"certIssuer,omitempty"`
119
132
120
133
// Cert Issuer Type for external access TLS certificate
121
134
// +kubebuilder:default:="ClusterIssuer"
122
135
// +kubebuilder:validation:Enum=ClusterIssuer;Issuer
136
+ // +optional
123
137
CertIssuerType string `json:"certIssuerType,omitempty"`
124
138
125
139
// Support External DNS
126
140
// +kubebuilder:default:=false
141
+ // +optional
127
142
ExternalDNS bool `json:"externalDNS,omitempty"`
128
143
}
129
144
130
145
// ProxySettings defines the proxy settings
131
146
type ProxySettings struct {
132
147
// Image to use for the proxy
133
148
// +kubebuilder:default:="envoyproxy/envoy:v1.32.1"
149
+ // +optional
134
150
Image string `json:"image,omitempty"`
135
151
// Resources requirements and limits for the proxy container
152
+ // +optional
136
153
Resources * corev1.ResourceRequirements `json:"resources,omitempty"`
137
154
138
155
// Extra Envoy configuration
156
+ // +optional
139
157
ExtraConfig string `json:"extraConfig,omitempty"`
140
158
141
159
// Annotations for the proxy service
160
+ // +optional
142
161
Annotations map [string ]string `json:"annotations,omitempty"`
143
162
144
163
// Replicas for the proxy
145
164
// +kubebuilder:default:=1
146
- Replicas * int32 `json:"replicas,omitempty "`
165
+ Replicas * int32 `json:"replicas"`
147
166
148
167
// External Hostname for the proxy
168
+ // +optional
149
169
Hostname string `json:"hostname,omitempty"`
150
170
}
151
171
152
172
// LoadBalancerSettings defines the load balancer settings
153
173
type LoadBalancerSettings struct {
154
174
// Annotations for the load balancer service
175
+ // +optional
155
176
Annotations map [string ]string `json:"annotations,omitempty"`
156
177
}
157
178
0 commit comments