Skip to content

Commit

Permalink
Support custom probes (#234)
Browse files Browse the repository at this point in the history
Signed-off-by: haorenfsa <[email protected]>
  • Loading branch information
haorenfsa authored Jan 14, 2025
1 parent b9cd019 commit 90ff623
Show file tree
Hide file tree
Showing 12 changed files with 466 additions and 9 deletions.
13 changes: 13 additions & 0 deletions apis/milvus.io/v1beta1/components_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,19 @@ type ComponentSpec struct {
// DNSPolicy indicates the pod's DNS policy
// +kubebuilder:validation:Optional
DNSPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty"`

// Probes has fields startupProbe, livenessProbe, readinessProbe
// +kubebuilder:validation:Optional
// +kubebuilder:pruning:PreserveUnknownFields
// +nullable
Probes Values `json:"probes,omitempty"`
}

// Probes is the actual struct for the Probes field in ComponentSpec
type Probes struct {
StartupProbe *corev1.Probe `json:"startupProbe,omitempty"`
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
}

// ImageUpdateMode is how the milvus components' image should be updated. works only when rolling update is enabled.
Expand Down
31 changes: 31 additions & 0 deletions apis/milvus.io/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

100 changes: 100 additions & 0 deletions charts/milvus-operator/templates/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -1437,6 +1441,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -2093,6 +2101,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -2653,6 +2665,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -3215,6 +3231,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -3319,6 +3339,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
proxy:
properties:
affinity:
Expand Down Expand Up @@ -3819,6 +3843,10 @@ spec:
type: integer
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -4397,6 +4425,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -4957,6 +4989,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -5550,6 +5586,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -6146,6 +6186,10 @@ spec:
type: integer
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -6724,6 +6768,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -7916,6 +7964,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
type: integer
Expand Down Expand Up @@ -9020,6 +9072,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -9580,6 +9636,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -10236,6 +10296,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -10796,6 +10860,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -11358,6 +11426,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -11462,6 +11534,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
proxy:
properties:
affinity:
Expand Down Expand Up @@ -11962,6 +12038,10 @@ spec:
type: integer
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -12540,6 +12620,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -13100,6 +13184,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -13693,6 +13781,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -14289,6 +14381,10 @@ spec:
type: integer
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down Expand Up @@ -14867,6 +14963,10 @@ spec:
type: object
priorityClassName:
type: string
probes:
nullable: true
type: object
x-kubernetes-preserve-unknown-fields: true
replicas:
format: int32
minimum: -1
Expand Down
Loading

0 comments on commit 90ff623

Please sign in to comment.