Skip to content
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
2 changes: 1 addition & 1 deletion api/v1alpha1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ type NetworkPolicy struct {
type HAProxy struct {
Enabled bool `json:"enabled,omitempty"`
// +kubebuilder:default:="haproxytech/haproxy-alpine:3.1"
Image string `json:"image"`
Image string `json:"image,omitempty"`
// +kubebuilder:default:=1
ReplicaCount int32 `json:"replicas,omitempty"`
// +kubebuilder:default:=80
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha1/marklogiccluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// MarklogicClusterSpec defines the desired state of MarklogicCluster

// +kubebuilder:validation:XValidation:rule="!(self.haproxy.enabled == true && self.haproxy.pathBasedRouting == true) || int(self.image.split(':')[1].split('.')[0] + self.image.split(':')[1].split('.')[1]) >= 111", message="HAProxy and Pathbased Routing is enabled. PathBasedRouting is only supported for MarkLogic 11.1 and above"
type MarklogicClusterSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
Expand Down
11 changes: 6 additions & 5 deletions config/crd/bases/database.marklogic.com_marklogicclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ spec:
metadata:
type: object
spec:
description: MarklogicClusterSpec defines the desired state of MarklogicCluster
properties:
affinity:
description: Affinity is a group of affinity scheduling rules.
Expand Down Expand Up @@ -2048,8 +2047,6 @@ spec:
secretName:
type: string
type: object
required:
- image
type: object
hugePages:
default:
Expand Down Expand Up @@ -4200,8 +4197,6 @@ spec:
secretName:
type: string
type: object
required:
- image
type: object
hugePages:
properties:
Expand Down Expand Up @@ -9391,6 +9386,12 @@ spec:
required:
- image
type: object
x-kubernetes-validations:
- message: HAProxy and Pathbased Routing is enabled. PathBasedRouting
is only supported for MarkLogic 11.1 and above
rule: '!(self.haproxy.enabled == true && self.haproxy.pathBasedRouting
== true) || int(self.image.split('':'')[1].split(''.'')[0] + self.image.split('':'')[1].split(''.'')[1])
>= 111'
status:
description: MarklogicClusterStatus defines the observed state of MarklogicCluster
properties:
Expand Down