Comments (5)
More improvement is better if a user can pass as
apiVersion: opensearch.opster.io/v1
kind: OpenSearchCluster
metadata:
name: my-first-cluster
namespace: default
spec:
general:
serviceName: my-first-cluster
dashboards:
enable: true
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
nodePools:
- component: masters
replicas: 3
diskSize: 30
NodeSelector:
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
roles:
- "data"
- "master"
from opensearch-k8s-operator.
So a couple of thoughts here. Functionally for memory the limit and request should be the same. Setting them differently doesn't make sense for an opensearch node. Also we should set the JVM heapsize to be half of whatever the memory limit/request is. I think it's OK to let the user override this (they shouldn't) but set it by default.
from opensearch-k8s-operator.
Hey @dbason yes JVM is currently set as jvm = "-Xmx512M -Xms512M" which is default, but as per my thought it would be good to allow users to set the resource upper and lower limits as per the their own environment.
from opensearch-k8s-operator.
Hey my point is if we have to add resources, it should be the same for both opensearch and opensearch-dashboard
Example as
apiVersion: opensearch.opster.io/v1
kind: OpenSearchCluster
metadata:
name: my-first-cluster
namespace: default
spec:
general:
serviceName: my-first-cluster
dashboards:
enable: true
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
nodePools:
- component: masters
replicas: 3
diskSize: 30
NodeSelector:
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
roles:
- "data"
- "master"
Key points
-
If we have to remove the option for
requests
, then it should be for both opensearch and opensearch-dashboard as this makes easy for a user to declare resources for both opensearch and opensearch-dashboard -
we can consider adding as follows
apiVersion: opensearch.opster.io/v1
kind: OpenSearchCluster
metadata:
name: my-first-cluster
namespace: default
spec:
general:
serviceName: my-first-cluster
dashboards:
enable: true
resources:
memory: "64Mi"
cpu: "250m"
nodePools:
- component: masters
replicas: 3
diskSize: 30
NodeSelector:
resources:
memory: "64Mi"
cpu: "250m"
roles:
- "data"
- "master"
This will make sure both the limits and requests are set to values passed in memory:
and cpu:
fields and allow node.Jvm to be half of this value.
https://github.com/Opster/opensearch-k8s-operator/blob/5c6610a6822cf162601990c7a9969fa11f25808a/opensearch-operator/pkg/builders/cluster.go#L123
(still a user can override this with Jvm field)
- Its definitely good to have both requests and limits to be passed during runtime, as this allows backend to use the required resources in range of declared requests and limits and not locking the max value even when not needed.
I'm open for any inputs and suggestions here, so that I can modify my PR in accordingly :)
#69
from opensearch-k8s-operator.
Hey Closing this issue, as cluster resources reconciler has been added to the PR, will re-open if required.
from opensearch-k8s-operator.
Related Issues (20)
- [BUG] Missing Options to set labels/annotations for "bootstrap" and "securityconfig-update-job" HOT 1
- [BUG] Operator cannot reliably bootstrap a cluster HOT 3
- [BUG] ISM policy "allocation" not working through CRD
- [BUG] Operator 2.6.0 can't be uninstalled cleanly due to finalizer HOT 1
- [BUG] Operator certificate generation / renewals not working HOT 4
- [BUG] What are the ways to enable ssl hot reload?
- [FEATURE] Allow CRDs to target an `OpenSearchCluster` in another namespace HOT 2
- [BUG] Missing snapshotRepositories in Helm Chart (opensearch-cluster) Template HOT 1
- What is the diff between master role vs data role vs cluster_manager role? HOT 3
- [PROPOSAL] OpenSearchISMPolicy.applyToExistingIndices HOT 2
- [BUG] ISM CRD allocation action is broken
- [PROPOSAL] Seperate the operator helm chart release with the actual operator release HOT 3
- [PROPOSAL] Add the capability to use RoleBindings instead of ClusterRoleBindings HOT 1
- [FEATURE] Allow overriding image spec for node group
- [BUG] ISM policies and index templates are constantly updated
- How to get common pvc for all nodes? HOT 1
- [BUG] OpenSearchISMPolicy runtime error during cluster install
- [BUG] Security config handling means either API/Dashboard-created Users are deleted or you're stuck with default admin credentials
- [FEATURE] setting dashboard annotations on deployment level
- [BUG] Opensearch does not get deployed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opensearch-k8s-operator.