Skip to content

Commit 62fa922

Browse files
pengzhoumlPeng Zhou
andauthored
MLE-19811 pathbased Routing bug fix (#57)
Co-authored-by: Peng Zhou <[email protected]>
1 parent b5ed9b9 commit 62fa922

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

api/v1alpha1/common_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ type HAProxy struct {
8585
// +kubebuilder:default:=80
8686
FrontendPort int32 `json:"frontendPort,omitempty"`
8787
AppServers []AppServers `json:"appServers,omitempty"`
88-
// +kubebuilder:default:=true
88+
// +kubebuilder:default:=false
8989
PathBasedRouting *bool `json:"pathBasedRouting,omitempty"`
9090
RestartWhenUpgrade *bool `json:"restartWhenUpgrade,omitempty"`
9191
Service *corev1.ServiceType `json:"service,omitempty"`

config/crd/bases/database.marklogic.com_marklogicclusters.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3989,7 +3989,7 @@ spec:
39893989
type: string
39903990
type: object
39913991
pathBasedRouting:
3992-
default: true
3992+
default: false
39933993
type: boolean
39943994
replicas:
39953995
default: 1
@@ -8270,7 +8270,7 @@ spec:
82708270
type: string
82718271
type: object
82728272
pathBasedRouting:
8273-
default: true
8273+
default: false
82748274
type: boolean
82758275
replicas:
82768276
default: 1

pkg/k8sutil/marklogicServer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func generateMarkLogicClusterParams(cr *databasev1alpha1.MarklogicCluster) *Mark
220220
AdditionalVolumes: cr.Spec.AdditionalVolumes,
221221
AdditionalVolumeMounts: cr.Spec.AdditionalVolumeMounts,
222222
}
223-
if cr.Spec.HAProxy == nil || cr.Spec.HAProxy.PathBasedRouting == nil || !*cr.Spec.HAProxy.PathBasedRouting {
223+
if cr.Spec.HAProxy == nil || cr.Spec.HAProxy.PathBasedRouting == nil || !cr.Spec.HAProxy.Enabled || !*cr.Spec.HAProxy.PathBasedRouting {
224224
markLogicClusterParameters.PathBasedRouting = false
225225
} else {
226226
markLogicClusterParameters.PathBasedRouting = true

0 commit comments

Comments
 (0)