Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: using kustomize for adjusting resources #558

Merged
merged 4 commits into from
May 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions site/content/en/docs/installation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
omerap12 marked this conversation as resolved.
Show resolved Hide resolved
```

### 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 -
omerap12 marked this conversation as resolved.
Show resolved Hide resolved
```

## Uninstall

Expand Down