From 58cec5124dddc133c911ae97bd5fd8a5b2e7abed Mon Sep 17 00:00:00 2001 From: Omer Aplatony Date: Sat, 4 May 2024 14:26:08 +0300 Subject: [PATCH 1/4] Adjust resource limits and requests for jobset-controller-manager deployment --- site/content/en/docs/installation/_index.md | 76 +++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/site/content/en/docs/installation/_index.md b/site/content/en/docs/installation/_index.md index 54e51a16..9e914d5e 100644 --- a/site/content/en/docs/installation/_index.md +++ b/site/content/en/docs/installation/_index.md @@ -65,6 +65,82 @@ kubectl apply -f https://github.com/kubernetes-sigs/jobset/releases/download/$VE If you are using [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus), metrics can be scraped without performing this step. +## Customize Your Installation + +You can customize the installation according to your requirements using [kustomize](https://kustomize.io/). + +For instance, if you need to modify the resource allocations for a specific deployment, follow these steps: + +### Step 1: Set Up Your Kustomization Environment + +Start by creating a directory for your Kustomize configuration and navigate into it: + +```shell +mkdir kustomize-jobset +cd kustomize-jobset +``` + +### Step 2: Download the Remote Manifest + +Retrieve the remote manifest file specifying the version you need: + +```shell +VERSION={{< param "version" >}} +curl -LO https://github.com/kubernetes-sigs/jobset/releases/download/$VERSION/manifests.yaml +``` + +### Step 3: Create a kustomization.yaml File + +Create a kustomization.yaml file that references the downloaded manifest: + +```shell +resources: + - manifests.yaml +``` + +### Step 4: Define Your Resource Adjustments + +Create a resource_patch.yaml file to specify your desired resource adjustments for the deployment. For example, to update the jobset-controller-manager: + +```shell +apiVersion: apps/v1 +kind: Deployment +metadata: + name: jobset-controller-manager + namespace: jobset-system +spec: + template: + spec: + containers: + - name: manager + resources: + requests: + cpu: "1" # Updated CPU request + memory: "256Mi" # Updated memory request + limits: + cpu: "4" # Updated CPU limit + memory: "1Gi" # Updated memory limit +``` + +### Step 5: Include the Patch in Your Kustomization + + +Add the resource_patch.yaml file to your kustomization.yaml to apply the patch: + +```shell +resources: + - manifests.yaml +patches: + - path: resource_patch.yaml +``` + +### Step 5: Include the Patch in Your Kustomization + +Apply the configuration to your Kubernetes cluster using Kustomize and kubectl: + +```shell +kustomize build . | kubectl apply -f - +``` ## Uninstall From dcccfad88b6ee4a9f364a85d868dd00ecc99a415 Mon Sep 17 00:00:00 2001 From: Omer Aplatony Date: Sat, 4 May 2024 22:36:15 +0300 Subject: [PATCH 2/4] Use kubectl apply -k instead --- site/content/en/docs/installation/_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/content/en/docs/installation/_index.md b/site/content/en/docs/installation/_index.md index 9e914d5e..18b497f3 100644 --- a/site/content/en/docs/installation/_index.md +++ b/site/content/en/docs/installation/_index.md @@ -139,7 +139,7 @@ patches: Apply the configuration to your Kubernetes cluster using Kustomize and kubectl: ```shell -kustomize build . | kubectl apply -f - +kubectl apply -k . ``` ## Uninstall @@ -276,4 +276,4 @@ kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/ Next, in the file ``jobset/config/default/kustomization.yaml`` replace ``../components/internalcert`` with ``../components/certmanager`` then uncomment all the lines beginning with ``[CERTMANAGER]``. -Finally, apply these configurations to your cluster with ``kubectl apply --server-side -k config/default``. \ No newline at end of file +Finally, apply these configurations to your cluster with ``kubectl apply --server-side -k config/default``. From 86fbc24033161a686f867ef93b14e2b62fd5e648 Mon Sep 17 00:00:00 2001 From: Omer Aplatony Date: Sat, 4 May 2024 22:53:01 +0300 Subject: [PATCH 3/4] Add new line at the end of file --- site/content/en/docs/installation/_index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/site/content/en/docs/installation/_index.md b/site/content/en/docs/installation/_index.md index 18b497f3..6bcb9435 100644 --- a/site/content/en/docs/installation/_index.md +++ b/site/content/en/docs/installation/_index.md @@ -277,3 +277,4 @@ Next, in the file ``jobset/config/default/kustomization.yaml`` replace ``../comp ``../components/certmanager`` then uncomment all the lines beginning with ``[CERTMANAGER]``. Finally, apply these configurations to your cluster with ``kubectl apply --server-side -k config/default``. + From b0de713fab3246dc2b56fab16992b0d544a68dbc Mon Sep 17 00:00:00 2001 From: Omer Aplatony Date: Sun, 5 May 2024 09:05:55 +0300 Subject: [PATCH 4/4] Removed comments from manifest --- site/content/en/docs/installation/_index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/site/content/en/docs/installation/_index.md b/site/content/en/docs/installation/_index.md index 6bcb9435..c50e80b5 100644 --- a/site/content/en/docs/installation/_index.md +++ b/site/content/en/docs/installation/_index.md @@ -115,11 +115,11 @@ spec: - name: manager resources: requests: - cpu: "1" # Updated CPU request - memory: "256Mi" # Updated memory request + cpu: "1" + memory: "256Mi" limits: - cpu: "4" # Updated CPU limit - memory: "1Gi" # Updated memory limit + cpu: "4" + memory: "1Gi" ``` ### Step 5: Include the Patch in Your Kustomization