Skip to content

Commit

Permalink
Add doc for container resources (#154)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: rebekah-lawrence <[email protected]>
Co-authored-by: Hasan Çelik <[email protected]>
Co-authored-by: Serdar Ozmen <[email protected]>
  • Loading branch information
4 people authored Jan 31, 2024
1 parent a478bc7 commit 7298e59
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/modules/ROOT/examples/hazelcast-resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: hazelcast.com/v1alpha1
kind: Hazelcast
metadata:
name: hazelcast
spec:
clusterSize: 3
repository: 'docker.io/hazelcast/hazelcast-enterprise'
licenseKeySecretName: hazelcast-license-key
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
16 changes: 16 additions & 0 deletions docs/modules/ROOT/examples/management-center-resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: hazelcast.com/v1alpha1
kind: ManagementCenter
metadata:
name: mancenter
spec:
hazelcastClusters:
- address: hazelcast
name: dev
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"

17 changes: 17 additions & 0 deletions docs/modules/ROOT/examples/sidecar-resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: hazelcast.com/v1alpha1
kind: Hazelcast
metadata:
name: hazelcast
spec:
clusterSize: 3
repository: 'docker.io/hazelcast/hazelcast-enterprise'
licenseKeySecretName: hazelcast-license-key
agent:
repository: hazelcast/platform-operator-agent
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* xref:high-availability-mode.adoc[High Availability Mode]
* xref:native-memory.adoc[Native Memory]
* xref:jvm-parameters.adoc[Configuring JVM Parameters]
* xref:resource-configuration.adoc[Configuring Resource Limits]
* xref:hazelcast-parameters.adoc[Configuring System Properties]
* xref:advanced-networking.adoc[Advanced Networking]
* xref:tls.adoc[Configuring TLS]
Expand Down
37 changes: 37 additions & 0 deletions docs/modules/ROOT/pages/resource-configuration.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
= Configuring Container Resources

:description: pass:q[You can configure resources for Hazelcast, sidecar agent, and Management Center containers.]

{description}

You can find detailed information about resources in the link:https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/[Resource Management for Pods and Containers] Kubernetes documentation.

== Configuring Resources for Hazelcast

You can configure resources for Hazelcast containers using the `resources` field of the CRD `spec`.

.Example configuration
[source,yaml,subs="attributes+"]
----
include::ROOT:example$/hazelcast-resources.yaml[]
----

== Configuring Resources for Sidecar

You can configure resources for sidecar containers using the `agent.resources` field of the CRD `spec`.

.Example configuration
[source,yaml,subs="attributes+"]
----
include::ROOT:example$/sidecar-resources.yaml[]
----

== Configuring Resources for Management Center

You can configure resources for Management Center containers using the `resources` field of the CRD `spec`.

.Example configuration
[source,yaml,subs="attributes+"]
----
include::ROOT:example$/management-center-resources.yaml[]
----

0 comments on commit 7298e59

Please sign in to comment.