mirror of https://github.com/linkerd/linkerd2.git
Relax validation for ExternalWorkload Status fields (#11979)
ExternalWorkload resources require that status condition has almost all of its
fields set (with the exception of a date field). The original inspiration for
this design was the HTTPRoute object.
When using the resource, it is more practical to handle many of the fields as
optional; it is cumbersome to fill out the fields when creating an
ExternalWorkload. We change the settings to be in-line with a [Pod] object
instead.
[Pod]:
7d1a2f7a73/core/v1/types.go (L3063-L3084)
---------
Signed-off-by: Matei David <matei@buoyant.io>
This commit is contained in:
parent
34ef27307a
commit
dbd72cc283
|
@ -154,8 +154,5 @@ spec:
|
|||
maxLength: 32768
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- status
|
||||
- type
|
||||
- reason
|
||||
- message
|
||||
|
|
|
@ -10382,8 +10382,5 @@ spec:
|
|||
maxLength: 32768
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- status
|
||||
- type
|
||||
- reason
|
||||
- message
|
||||
|
|
|
@ -10400,8 +10400,5 @@ spec:
|
|||
maxLength: 32768
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- status
|
||||
- type
|
||||
- reason
|
||||
- message
|
||||
|
|
|
@ -10400,8 +10400,5 @@ spec:
|
|||
maxLength: 32768
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- status
|
||||
- type
|
||||
- reason
|
||||
- message
|
||||
|
|
|
@ -111,12 +111,15 @@ type WorkloadCondition struct {
|
|||
// +optional
|
||||
LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
|
||||
// Last time a condition transitioned from one status to another.
|
||||
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
|
||||
// +optional
|
||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
|
||||
// Unique one word reason in CamelCase that describes the reason for a
|
||||
// transition.
|
||||
Reason string `json:"reason"`
|
||||
// +optional
|
||||
Reason string `json:"reason,omitempty"`
|
||||
// Human readable message that describes details about last transition.
|
||||
Message string `json:"message"`
|
||||
// +optional
|
||||
Message string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// WorkloadConditionType is a value for the type of a condition in an
|
||||
|
|
|
@ -77,14 +77,14 @@ pub struct Condition {
|
|||
/// Can be True, False, Unknown
|
||||
status: ConditionStatus,
|
||||
/// Last time a condition transitioned from one status to another.
|
||||
last_transition_time: crate::apimachinery::pkg::apis::meta::v1::Time,
|
||||
last_transition_time: Option<crate::apimachinery::pkg::apis::meta::v1::Time>,
|
||||
/// Last time an ExternalWorkload was probed for a condition.
|
||||
last_probe_time: Option<crate::apimachinery::pkg::apis::meta::v1::Time>,
|
||||
/// Unique one word reason in CamelCase that describes the reason for a
|
||||
/// transition.
|
||||
reason: String,
|
||||
reason: Option<String>,
|
||||
/// Human readable message that describes details about last transition.
|
||||
message: String,
|
||||
message: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize, JsonSchema)]
|
||||
|
|
Loading…
Reference in New Issue