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: 2 additions & 0 deletions apis/apps/v1/componentdefinition_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,8 @@ type ComponentAvailable struct {

// Specifies the strategies for determining whether the component is available based on the available probe.
//
// If specified, it will take precedence over the WithPhases and WithRole fields.
//
// This field is immutable once set.
//
// +optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ spec:
Specifies the strategies for determining whether the component is available based on the available probe.


If specified, it will take precedence over the WithPhases and WithRole fields.


This field is immutable once set.
properties:
condition:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ spec:
Specifies the strategies for determining whether the component is available based on the available probe.


If specified, it will take precedence over the WithPhases and WithRole fields.


This field is immutable once set.
properties:
condition:
Expand Down
1 change: 1 addition & 0 deletions docs/developer_docs/api-reference/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -4612,6 +4612,7 @@ ComponentAvailableWithProbe
<td>
<em>(Optional)</em>
<p>Specifies the strategies for determining whether the component is available based on the available probe.</p>
<p>If specified, it will take precedence over the WithPhases and WithRole fields.</p>
<p>This field is immutable once set.</p>
</td>
</tr>
Expand Down
8 changes: 6 additions & 2 deletions pkg/controller/component/available.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,12 @@ func GetComponentAvailablePolicy(compDef *appsv1.ComponentDefinition) appsv1.Com
// has available policy defined
if compDef.Spec.Available != nil {
policy := *compDef.Spec.Available
if policy.WithProbe != nil && policy.WithProbe.TimeWindowSeconds == nil {
policy.WithProbe.TimeWindowSeconds = timeWindowSeconds()
if policy.WithProbe != nil {
if policy.WithProbe.TimeWindowSeconds == nil {
policy.WithProbe.TimeWindowSeconds = timeWindowSeconds()
}
policy.WithPhases = nil
policy.WithRole = nil
}
return policy
}
Expand Down