Refine controller template and probe listeners
This commit is contained in:
@@ -44,3 +44,12 @@ func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
||||
func NodeAgentLabels() map[string]string {
|
||||
return map[string]string{
|
||||
"app.kubernetes.io/name": NodeAgentName,
|
||||
"app.kubernetes.io/component": "agent",
|
||||
"app.kubernetes.io/part-of": "monok8s",
|
||||
"app.kubernetes.io/managed-by": NodeControlName,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,6 +133,12 @@ type OSUpgradeProgressStatus struct {
|
||||
CurrentStep int32 `json:"currentStep,omitempty" yaml:"currentStep,omitempty"`
|
||||
CurrentFrom string `json:"currentFrom,omitempty" yaml:"currentFrom,omitempty"`
|
||||
CurrentTo string `json:"currentTo,omitempty" yaml:"currentTo,omitempty"`
|
||||
|
||||
// ObservedRetryNonce records the last retryNonce value the agent accepted.
|
||||
// When spec.retryNonce is changed by the user and differs from this value,
|
||||
// the agent may retry a failed upgrade.
|
||||
// +optional
|
||||
ObservedRetryNonce string `json:"observedRetryNonce,omitempty"`
|
||||
}
|
||||
|
||||
func (osu OSUpgrade) StatusPhase() string {
|
||||
@@ -142,3 +148,11 @@ func (osu OSUpgrade) StatusPhase() string {
|
||||
}
|
||||
return phase
|
||||
}
|
||||
|
||||
func (osup OSUpgradeProgress) StatusPhase() string {
|
||||
phase := ""
|
||||
if osup.Status != nil {
|
||||
phase = string(osup.Status.Phase)
|
||||
}
|
||||
return phase
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user