Skip to content

Commit

Permalink
feat(pdb): add PodDisruptionBudget support (#102)
Browse files Browse the repository at this point in the history
* refactor(Makefile): update chainsaw setup and Helm targets in Makefile

Description:
This PR refactors the Helm targets and updates the chainsaw setup in the Makefile. The changes include:

- Removed helm-install and helm-uninstall targets.
- Updated chainsaw-setup target to use helm-install-depends instead of helm-install.

Purpose:
1. Refactor chainsaw test to rely on the helm-install-depends task for better modularity and dependency management.
2. Ensure the current operator uses the deploy task for deployment, aligning with the updated setup process.

These changes improve the modularity, clarity, and maintainability of the Makefile, making it easier to manage Helm dependencies and the chainsaw setup process.

* feat(pdb): add PodDisruptionBudget support
  • Loading branch information
lwpk110 authored Nov 12, 2024
1 parent 97bed57 commit dfb56f1
Show file tree
Hide file tree
Showing 13 changed files with 410 additions and 310 deletions.
5 changes: 1 addition & 4 deletions api/v1alpha1/master_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type MasterSpec struct {
RoleGroups map[string]MasterRoleGroupSpec `json:"roleGroups,omitempty"`

// +kubebuilder:validation:Optional
PodDisruptionBudget *commonsv1alpha1.PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
RoleConfig *commonsv1alpha1.RoleConfigSpec `json:"roleConfig,omitempty"`

// +kubebuilder:validation:Optional
CliOverrides []string `json:"cliOverrides,omitempty"`
Expand Down Expand Up @@ -60,9 +60,6 @@ type MasterRoleGroupSpec struct {
// +kubebuilder:validation:Optional
Config *MasterConfigSpec `json:"config,omitempty"`

// +kubebuilder:validation:Optional
PodDisruptionBudget *commonsv1alpha1.PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`

// +kubebuilder:validation:Optional
CliOverrides []string `json:"cliOverrides,omitempty"`

Expand Down
6 changes: 2 additions & 4 deletions api/v1alpha1/regionserver_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ type RegionServerSpec struct {
// +kubebuilder:validation:Optional
RoleGroups map[string]RegionServerRoleGroupSpec `json:"roleGroups,omitempty"`

PodDisruptionBudget *commonsv1alpha1.PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
// +kubebuilder:validation:Optional
RoleConfig *commonsv1alpha1.RoleConfigSpec `json:"roleConfig,omitempty"`

// +kubebuilder:validation:Optional
CliOverrides []string `json:"cliOverrides,omitempty"`
Expand Down Expand Up @@ -58,9 +59,6 @@ type RegionServerRoleGroupSpec struct {
// +kubebuilder:validation:Optional
Config *RegionConfigSpec `json:"config,omitempty"`

// +kubebuilder:validation:Optional
PodDisruptionBudget *commonsv1alpha1.PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`

// +kubebuilder:validation:Optional
CliOverrides []string `json:"cliOverrides,omitempty"`

Expand Down
5 changes: 1 addition & 4 deletions api/v1alpha1/restserver_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type RestServerSpec struct {
RoleGroups map[string]RestServerRoleGroupSpec `json:"roleGroups,omitempty"`

// +kubebuilder:validation:Optional
PodDisruptionBudget *commonsv1alpha1.PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
RoleConfig *commonsv1alpha1.RoleConfigSpec `json:"roleConfig,omitempty"`

// +kubebuilder:validation:Optional
CliOverrides []string `json:"cliOverrides,omitempty"`
Expand Down Expand Up @@ -60,9 +60,6 @@ type RestServerRoleGroupSpec struct {
// +kubebuilder:validation:Optional
Config *RestServerConfigSpec `json:"config,omitempty"`

// +kubebuilder:validation:Optional
PodDisruptionBudget *commonsv1alpha1.PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`

// +kubebuilder:validation:Optional
CliOverrides []string `json:"cliOverrides,omitempty"`

Expand Down
45 changes: 15 additions & 30 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dfb56f1

Please sign in to comment.