HoustonPutman commented on code in PR #571:
URL: https://github.com/apache/solr-operator/pull/571#discussion_r1211828633
##########
api/v1beta1/common_types.go:
##########
@@ -164,6 +164,14 @@ type ServiceOptions struct {
// Labels to be added for the Service.
// +optional
Labels map[string]string `json:"labels,omitempty"`
+
+ // Supports "ClientIP" and "None". Used to maintain session affinity.
Enable client IP based session affinity. Must be ClientIP or None. Defaults to
None
+ // +optional
Review Comment:
```suggestion
// +optional
// +kubebuilder:default=None
// +kubebuilder:validation:Enum=None,ClientIP
```
So we can actually put the default, and the enum constraints into the CRD
itself using [Kubebuilder CRD
markers](https://book.kubebuilder.io/reference/markers/crd-validation.html)!
##########
api/v1beta1/common_types.go:
##########
@@ -164,6 +164,14 @@ type ServiceOptions struct {
// Labels to be added for the Service.
// +optional
Labels map[string]string `json:"labels,omitempty"`
+
+ // Supports "ClientIP" and "None". Used to maintain session affinity.
Enable client IP based session affinity. Must be ClientIP or None. Defaults to
None
+ // +optional
+ SessionAffinity string `json:"sessionAffinity,omitempty"`
+
+ // sessionAffinityConfig contains the configurations of session
affinity.
+ // +optional
+ SessionAffinityConfig corev1.SessionAffinityConfig
`json:"sessionAffinityConfig,omitempty"`
Review Comment:
```suggestion
SessionAffinityConfig *corev1.SessionAffinityConfig
`json:"sessionAffinityConfig,omitempty"`
```
Making this field a pointer, makes it easier for us to know whether the user
provided one or not!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]