-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from cynepco3hahue/deploy_master_mhc_mdb
Deploy master mhc mdb
- Loading branch information
Showing
46 changed files
with
7,966 additions
and
7 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package components | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"k8s.io/utils/pointer" | ||
|
||
mrv1 "kubevirt.io/machine-remediation-operator/pkg/apis/machineremediation/v1alpha1" | ||
"kubevirt.io/machine-remediation-operator/pkg/consts" | ||
) | ||
|
||
// NewMastersMachineDisruptionBudget retruns new MachineDisruptionBudget object for master nodes | ||
func NewMastersMachineDisruptionBudget(name string, namespace string, operatorVersion string) *mrv1.MachineDisruptionBudget { | ||
return &mrv1.MachineDisruptionBudget{ | ||
TypeMeta: metav1.TypeMeta{ | ||
APIVersion: "machineremediation.kubevirt.io/v1alpha1", | ||
Kind: "MachineDisruptionBudget", | ||
}, | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: name, | ||
Namespace: namespace, | ||
Labels: map[string]string{ | ||
mrv1.SchemeGroupVersion.Group: "", | ||
mrv1.SchemeGroupVersion.Group + "/version": operatorVersion, | ||
}, | ||
}, | ||
Spec: mrv1.MachineDisruptionBudgetSpec{ | ||
Selector: &metav1.LabelSelector{ | ||
MatchLabels: map[string]string{ | ||
consts.MasterRoleLabel: "", | ||
}, | ||
}, | ||
MinAvailable: pointer.Int32Ptr(1), | ||
}, | ||
} | ||
} |
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,35 @@ | ||
package components | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
|
||
mrv1 "kubevirt.io/machine-remediation-operator/pkg/apis/machineremediation/v1alpha1" | ||
"kubevirt.io/machine-remediation-operator/pkg/consts" | ||
) | ||
|
||
// NewMastersMachineHealthCheck retruns new MachineHealthCheck object for master nodes | ||
func NewMastersMachineHealthCheck(name string, namespace string, operatorVersion string) *mrv1.MachineHealthCheck { | ||
rebootStrategy := mrv1.RemediationStrategyTypeReboot | ||
return &mrv1.MachineHealthCheck{ | ||
TypeMeta: metav1.TypeMeta{ | ||
APIVersion: "machineremediation.kubevirt.io/v1alpha1", | ||
Kind: "MachineHealthCheck", | ||
}, | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: name, | ||
Namespace: namespace, | ||
Labels: map[string]string{ | ||
mrv1.SchemeGroupVersion.Group: "", | ||
mrv1.SchemeGroupVersion.Group + "/version": operatorVersion, | ||
}, | ||
}, | ||
Spec: mrv1.MachineHealthCheckSpec{ | ||
Selector: metav1.LabelSelector{ | ||
MatchLabels: map[string]string{ | ||
consts.MasterRoleLabel: "", | ||
}, | ||
}, | ||
RemediationStrategy: &rebootStrategy, | ||
}, | ||
} | ||
} |
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
Oops, something went wrong.