Skip to content

Commit

Permalink
Use PodPlacementPolicy from v2 podTemplate
Browse files Browse the repository at this point in the history
Signed-off-by: Arnob kumar saha <[email protected]>
  • Loading branch information
ArnobKumarSaha committed Jun 3, 2024
1 parent 74e7190 commit 0cfc34a
Show file tree
Hide file tree
Showing 32 changed files with 221 additions and 714 deletions.
8 changes: 0 additions & 8 deletions apis/kubedb/v1alpha2/clickhouse_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,8 @@ type ClickHouse struct {
Status ClickHouseStatus `json:"status,omitempty"`
}

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// ClickHouseSpec defines the desired state of ClickHouse
type ClickHouseSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Version of ClickHouse to be deployed.
Version string `json:"version"`

Expand Down Expand Up @@ -145,8 +139,6 @@ type ClickHouseKeeperNode struct {

// ClickHouseStatus defines the observed state of ClickHouse
type ClickHouseStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
// Specifies the current phase of the database
// +optional
Phase DatabasePhase `json:"phase,omitempty"`
Expand Down
20 changes: 0 additions & 20 deletions apis/kubedb/v1alpha2/druid_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ type Druid struct {

// DruidSpec defines the desired state of Druid
type DruidSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Version of Druid to be deployed.
Version string `json:"version"`

Expand Down Expand Up @@ -141,21 +138,6 @@ type DruidNode struct {
// PodTemplate is an optional configuration for pods used to expose database
// +optional
PodTemplate ofst.PodTemplateSpec `json:"podTemplate,omitempty"`

// NodeSelector is a selector which must be true for the pod to fit on a node.
// Selector which must match a node's labels for the pod to be scheduled on that node.
// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
// +optional
// +mapType=atomic
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// If specified, the pod's tolerations.
// +optional
Tolerations []core.Toleration `json:"tolerations,omitempty"`

// PodPlacementPolicy is the reference of the podPlacementPolicy
// +kubebuilder:default={name: "default"}
// +optional
PodPlacementPolicy *core.LocalObjectReference `json:"podPlacementPolicy,omitempty"`
}

type DruidDataNode struct {
Expand Down Expand Up @@ -210,8 +192,6 @@ type ZookeeperRef struct {

// DruidStatus defines the observed state of Druid
type DruidStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
// Specifies the current phase of the database
// +optional
Phase DruidPhase `json:"phase,omitempty"`
Expand Down
5 changes: 0 additions & 5 deletions apis/kubedb/v1alpha2/ferretdb_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ type FerretDBSpec struct {
Monitor *mona.AgentSpec `json:"monitor,omitempty"`

Backend *FerretDBBackend `json:"backend"`

// PodPlacementPolicy is the reference of the podPlacementPolicy
// +kubebuilder:default={name: "default"}
// +optional
PodPlacementPolicy *core.LocalObjectReference `json:"podPlacementPolicy,omitempty"`
}

type FerretDBStatus struct {
Expand Down
5 changes: 0 additions & 5 deletions apis/kubedb/v1alpha2/mssqlserver_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ type MSSQLServerSpec struct {
// +optional
// +kubebuilder:default={periodSeconds: 10, timeoutSeconds: 10, failureThreshold: 1}
HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"`

// PodPlacementPolicy is the reference of the podPlacementPolicy
// +kubebuilder:default={name: "default"}
// +optional
PodPlacementPolicy *core.LocalObjectReference `json:"podPlacementPolicy,omitempty"`
}

// InternalAuthentication provides different way of endpoint authentication
Expand Down
187 changes: 8 additions & 179 deletions apis/kubedb/v1alpha2/openapi_generated.go

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

Loading

0 comments on commit 0cfc34a

Please sign in to comment.