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>

#678
  • Loading branch information
wangshulei098 committed Dec 6, 2023
1 parent 6a862a7 commit 2785992
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 @@ -84,6 +84,13 @@ type InitHelperConfig struct {
Version *string `json:"version,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 @@ -293,6 +300,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 2785992

Please sign in to comment.