Skip to content

Commit

Permalink
feat: ✨ opensearchcluster spec add Job resource config and all initco…
Browse files Browse the repository at this point in the history
…ntainer inherit the settings from Spec.InitHelper.Resource

opensearchcluster spec add Job  resource config  and all initcontainer inherit the settings from Spec.InitHelper.Resource

Signed-off-by: wangshulei098 <850732903@qq.com>
  • Loading branch information
wangshulei098 authored and wangshulei committed Feb 28, 2024
1 parent f4f8b77 commit 4aea38e
Show file tree
Hide file tree
Showing 4 changed files with 971 additions and 4 deletions.
8 changes: 8 additions & 0 deletions opensearch-operator/api/v1/opensearch_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ type ReadinessProbeConfig struct {
FailureThreshold int32 `json:"failureThreshold,omitempty"`
}

type JobConfig struct {
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
}

type NodePool struct {
Component string `json:"component"`
Replicas int32 `json:"replicas"`
Expand Down Expand Up @@ -315,6 +322,7 @@ type ClusterSpec struct {
Security *Security `json:"security,omitempty"`
NodePools []NodePool `json:"nodePools"`
InitHelper InitHelperConfig `json:"initHelper,omitempty"`
Job JobConfig `json:"job,omitempty"`
}

// ClusterStatus defines the observed state of Es
Expand Down
36 changes: 36 additions & 0 deletions opensearch-operator/api/v1/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 4aea38e

Please sign in to comment.