Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update VirtualClusterInstance status
Signed-off-by: Xiaodong Ye <yeahdongcn@gmail.com>
- Loading branch information
1 parent
213659a
commit 787494a
Showing
10 changed files
with
234 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package v1 | ||
|
||
import ( | ||
corev1 "k8s.io/api/core/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// ConditionType is a valid value for Condition.Type. | ||
type ConditionType string | ||
|
||
const ( | ||
// InitializedCondition defines the helm chart initialized condition type that defines if the helm chart was initialized correctly. | ||
InitializedCondition ConditionType = "Initialized" | ||
|
||
// DeployedCondition defines the helm chart deployed condition type that defines if the helm chart was deployed correctly. | ||
DeployedCondition ConditionType = "Deployed" | ||
) | ||
|
||
// ConditionSeverity expresses the severity of a Condition Type failing. | ||
type ConditionSeverity string | ||
|
||
const ( | ||
// ConditionSeverityError specifies that a condition with `Status=False` is an error. | ||
ConditionSeverityError ConditionSeverity = "Error" | ||
|
||
// ConditionSeverityWarning specifies that a condition with `Status=False` is a warning. | ||
ConditionSeverityWarning ConditionSeverity = "Warning" | ||
|
||
// ConditionSeverityInfo specifies that a condition with `Status=False` is informative. | ||
ConditionSeverityInfo ConditionSeverity = "Info" | ||
|
||
// ConditionSeverityNone should apply only to conditions with `Status=True`. | ||
ConditionSeverityNone ConditionSeverity = "" | ||
) | ||
|
||
// Conditions is an array of conditions | ||
type Conditions []Condition | ||
|
||
type Condition struct { | ||
// Type of condition in CamelCase or in foo.example.com/CamelCase. | ||
// Many .condition.type values are consistent across resources like Available, but because arbitrary conditions | ||
// can be useful (see .node.status.conditions), the ability to deconflict is important. | ||
// +required | ||
Type ConditionType `json:"type"` | ||
|
||
// Status of the condition, one of True, False, Unknown. | ||
// +required | ||
Status corev1.ConditionStatus `json:"status"` | ||
|
||
// Severity provides an explicit classification of Reason code, so the users or machines can immediately | ||
// understand the current situation and act accordingly. | ||
// The Severity field MUST be set only when Status=False. | ||
// +optional | ||
Severity ConditionSeverity `json:"severity,omitempty"` | ||
|
||
// Last time the condition transitioned from one status to another. | ||
// This should be when the underlying condition changed. If that is not known, then using the time when | ||
// the API field changed is acceptable. | ||
// +required | ||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` | ||
|
||
// The reason for the condition's last transition in CamelCase. | ||
// The specific API may choose whether this field is considered a guaranteed API. | ||
// This field may not be empty. | ||
// +optional | ||
Reason string `json:"reason,omitempty"` | ||
|
||
// A human readable message indicating details about the transition. | ||
// This field may be empty. | ||
// +optional | ||
Message string `json:"message,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters