Skip to content

Commit 18ac708

Browse files
authored
Merge branch 'main' into DEVOPS-2694-security-lightrun-installer-container-must-not-consume-secrets-as-env-vars
2 parents d4efd4d + b649aa3 commit 18ac708

File tree

2 files changed

+41
-8
lines changed

2 files changed

+41
-8
lines changed

docs/README.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,27 +107,58 @@ A [Helm chart](../charts/lightrun-operator/) is available in the repository bran
107107
1. Add the Lightrun repository to your Helm repositories:
108108
```sh
109109
helm repo add lightrun-k8s-operator https://lightrun-platform.github.io/lightrun-k8s-operator
110+
helm repo update
110111
```
111112
112-
2. Install the chart:
113+
2. **Initial Installation:**
113114
- Using default [values](../charts/lightrun-operator/values.yaml):
114115
```sh
115-
helm install lightrun-k8s-operator/lightrun-k8s-operator -n lightrun-operator --create-namespace
116+
helm install lightrun-k8s-operator lightrun-k8s-operator/lightrun-k8s-operator -n lightrun-operator --create-namespace
116117
```
117118
118119
- Using custom values file:
119120
```sh
120-
helm install lightrun-k8s-operator/lightrun-k8s-operator -f <values-file> -n lightrun-operator --create-namespace
121+
helm install lightrun-k8s-operator lightrun-k8s-operator/lightrun-k8s-operator -f <values-file> -n lightrun-operator --create-namespace
121122
```
122123
124+
3. **Upgrading the Operator:**
125+
126+
Due to Helm's limitations with CRD management, upgrades require special handling:
127+
128+
**For upgrades that include CRD changes:**
129+
```sh
130+
# Step 1: Update the repository
131+
helm repo update
132+
133+
# Step 2: Apply CRDs manually (if CRDs have changed)
134+
kubectl apply -f https://raw.githubusercontent.com/lightrun-platform/lightrun-k8s-operator/main/config/crd/bases/agents.lightrun.com_lightrunjavaagents
135+
136+
# Step 3: Upgrade the Helm release
137+
helm upgrade lightrun-k8s-operator lightrun-k8s-operator/lightrun-k8s-operator -n lightrun-operator
138+
```
139+
140+
**For upgrades without CRD changes:**
141+
```sh
142+
helm repo update
143+
helm upgrade lightrun-k8s-operator lightrun-k8s-operator/lightrun-k8s-operator -n lightrun-operator
144+
```
145+
146+
> **Important:** Always check the [release notes](https://github.com/lightrun-platform/lightrun-k8s-operator/releases) to determine if CRDs have been updated in the new version.
147+
123148
> **Note:** `helm upgrade --install` or `helm install --dry-run` may not work properly due to limitations with how Helm handles CRDs.
124149
> For more information, see the [Helm documentation](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/).
125150

126-
3. Uninstall the chart:
151+
4. **Uninstall the chart:**
152+
```sh
153+
helm delete lightrun-k8s-operator -n lightrun-operator
154+
```
155+
156+
**Manual CRD cleanup (if needed):**
127157
```sh
128-
helm delete lightrun-k8s-operator
158+
# Warning: This will delete all LightrunJavaAgent custom resources
159+
kubectl delete crd lightrunjavaagents.agents.lightrun.com
129160
```
130-
> **Note:** CRDs will not be deleted due to Helm limitations. See [Helm's documentation on CRD limitations](https://helm.sh/docs/topics/charts/#limitations-on-crds) for more details.
161+
> **Note:** CRDs are not automatically deleted by Helm due to safety reasons. See [Helm's documentation on CRD limitations](https://helm.sh/docs/topics/charts/#limitations-on-crds) for more details.
131162
132163
### Version Compatibility
133164

examples/lightrunjavaagent.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ spec:
66
###############################################################################################
77
# Fields that you need to change if you want to try operator with your own deployment
88
###############################################################################################
9-
# Name of the deployment that you are going to patch.
9+
# Name of the workload that you are going to patch.
1010
# Has to be in the same namespace
11-
deploymentName: sample-deployment
11+
workloadName: sample-deployment
12+
# Type of the workload. Supported values are `Deployment` and `StatefulSet`
13+
workloadType: Deployment
1214
# List of container names inside the pod of the deployment
1315
# If container not mentioned here it will be not patched
1416
containerSelector:

0 commit comments

Comments
 (0)