You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: charts/lightrun-agents/README.md
+48-33Lines changed: 48 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -1,51 +1,57 @@
1
1
# Helm Chart for Deploying Lightrun Agents
2
-
This Helm chart allows you to deploy and manage Lightrun Agents as custom resources in your Kubernetes cluster.
3
-
Currently only java based agents are supported.
4
-
The LightrunJavaAgent custom resource will be configured based on the values provided in the values.yaml file.
2
+
3
+
This Helm chart enables the deployment and management of Lightrun Agents as custom resources within your Kubernetes cluster. Currently, only Java-based agents are supported. The LightrunJavaAgent custom resource will be configured according to the settings specified in the values.yaml file.
5
4
6
5
## Prerequisites
7
-
- Kubernetes 1.16+
8
-
- Helm 3.0+
9
-
- Ability to fetch images of the init containers from [Lightrun Repository Dockerhub](https://hub.docker.com/u/lightruncom). or alternatively have them available in private registry.
6
+
7
+
- Kubernetes 1.19+
8
+
- Ability to fetch images of the init containers from [Lightrun Repository Dockerhub](https://hub.docker.com/u/lightruncom). or alternatively have them available in private registry.
|`javaAgents[].agentCliFlags`|[Command-line flags for the Lightrun Java Agent.](https://docs.lightrun.com/jvm/agent-configuration/#additional-command-line-flags). | Optional `""` (empty string) |
22
-
|`javaAgents[].agentConfig`|[Additional configuration for the Lightrun Java Agent.](https://docs.lightrun.com/jvm/agent-configuration/#agent-flags)| Optional `{}` (empty map) |
23
-
|`javaAgents[].agentEnvVarName`| Specifies the Java environment variable name used for adding `--agentpath`| Optional (if not provided, defaults to `"JAVA_TOOL_OPTIONS"`) |
24
-
|`javaAgents[].agentName`| Custom name to assign to the Lightrun Java Agent. | Optional (if not provided, defaults to pod name) |
25
-
|`javaAgents[].agentPoolCredentials.existingSecret`| Name of an existing Kubernetes secret containing api key and pinned cert hash for agent pool. [secret example](https://github.com/lightrun-platform/lightrun-k8s-operator/blob/main/examples/lightrunjavaagent.yaml#L64-L73)| Optional (if not provided, defaults to `name-secret`) |
26
-
|`javaAgents[].agentPoolCredentials.apiKey`| Lightrun agent API key. | Required if `existingSecret` not set |
27
-
|`javaAgents[].agentPoolCredentials.pinnedCertHash`| 64 character sha256 certificate public key hash for pinning | Required if `existingSecret` not set |
|`javaAgents[].containerSelector`| Selector for containers within the deployment to inject the Lightrun Java Agent. | Required |
30
-
|`javaAgents[].deploymentName`| Name of the Kubernetes deployment to attach the Lightrun Java Agent. | Required |
31
-
|`javaAgents[].initContainer.image`| Image for the Lightrun Java Agent init container. | Required |
32
-
|`javaAgents[].initContainer.sharedVolumeMountPath`| Mount path for the shared volume in the init container. | Optional (if not provided, defaults to `"/lightrun"`" |
33
-
|`javaAgents[].initContainer.sharedVolumeName`| Name of the shared volume for the init container. | Optional (if not provided, defaults to `"lightrun-agent-init"`" |
34
-
|`javaAgents[].name`| Name of the Lightrun Java Agent custom resource. | Required |
35
-
|`javaAgents[].namespace`| Namespace of the Lightrun Java Agent custom resource. Must be in the same namespace as the workload | Required |
36
-
|`javaAgents[].serverHostname`| Hostname of the Lightrun server to connect the agent. | Required |
37
-
38
-
#### 2.1 - Set `initContainer.image`
20
+
21
+
The values.yaml file includes the following configurable parameters for each Java agent object:
|`javaAgents[].agentCliFlags`|[Command-line flags for the Lightrun Java Agent.](https://docs.lightrun.com/jvm/agent-configuration/#additional-command-line-flags). | Optional `""` (empty string) |
26
+
|`javaAgents[].agentConfig`|[Additional configuration for the Lightrun Java Agent.](https://docs.lightrun.com/jvm/agent-configuration/#agent-flags). | Optional `{}` (empty map) |
27
+
|`javaAgents[].agentEnvVarName`| Specifies the Java environment variable name used to add `--agentpath`. | Optional (if not provided, defaults to `"JAVA_TOOL_OPTIONS"`) |
28
+
|`javaAgents[].agentName`| Custom name to assign to the Lightrun Java Agent. | Optional (if not provided, defaults to pod name) |
29
+
|`javaAgents[].agentPoolCredentials.existingSecret`| Name of an existing Kubernetes secret that contains the API key and pinned certificate hash for the agent pool. [secret example](https://github.com/lightrun-platform/lightrun-k8s-operator/blob/main/examples/lightrunjavaagent.yaml#L64-L73). | Optional (if not provided, defaults to `name-secret`) |
30
+
|`javaAgents[].agentPoolCredentials.apiKey`| Lightrun agent API key. | Required if `existingSecret` not set |
31
+
|`javaAgents[].agentPoolCredentials.pinnedCertHash`| 64 character sha256 certificate public key hash for pinning. | Required if `existingSecret` not set |
|`javaAgents[].containerSelector`| Selector for containers within the deployment to inject the Lightrun Java Agent. | Required |
34
+
|`javaAgents[].deploymentName`| Name of the Kubernetes deployment to attach the Lightrun Java Agent. | Required |
35
+
|`javaAgents[].initContainer.image`| Image for the Lightrun Java Agent init container. | Required |
36
+
|`javaAgents[].initContainer.sharedVolumeMountPath`| Mount path for the shared volume in the init container. | Optional (if not provided, defaults to `"/lightrun"`" |
37
+
|`javaAgents[].initContainer.sharedVolumeName`| Name of the shared volume for the init container. | Optional (if not provided, defaults to `"lightrun-agent-init"`" |
38
+
|`javaAgents[].name`| Name of the Lightrun Java Agent custom resource. | Required |
39
+
|`javaAgents[].namespace`| Namespace of the Lightrun Java Agent custom resource. Must be in the same namespace as the workload | Required |
40
+
|`javaAgents[].serverHostname`| Hostname of the Lightrun server to connect the agent. | Required |
41
+
42
+
#### 2.1 - Set `initContainer.image`
39
43
40
44
Based on your workload's OS and architecture, you should select the appropriate DockerHub repository from the following options:
After determining the appropriate image, you'll need to choose a tag. The tag can either be "latest," which corresponds to the most up-to-date version, or it can be a specific Lightrun version following the convention `<x.y.z>-init.<number>`. Typically, the `<number>` part is 0, but it's always good to verify on the DockerHub repository.
51
+
After determining the appropriate image, you will need to choose a tag. The tag can either be "latest," which corresponds to the most up-to-date Lightrun version, or it can be a specific Lightrun version following the convention `<x.y.z>-init.<number>`. Typically, the `<number>` part is 0, but it is always good to verify on the DockerHub repository.
47
52
48
53
For your convenience, here are some possible combinations of how the final image might look:
54
+
49
55
```text
50
56
Linux amd64 with the latest version -> lightruncom/k8s-operator-init-java-agent-linux:latest
51
57
Linux amd64 with a specific version -> lightruncom/k8s-operator-init-java-agent-linux:1.39.1-init.0
@@ -56,20 +62,25 @@ Alpine amd64 with a specific version -> lightruncom/k8s-operator-init-java-agent
56
62
Alpine arm64 with the latest version -> lightruncom/k8s-operator-init-java-agent-alpine-arm64:latest
57
63
Alpine arm64 with a specific version -> lightruncom/k8s-operator-init-java-agent-alpine-arm64:1.39.1-init.0
58
64
```
65
+
59
66
#### 2.2 Install the chart
60
67
61
-
When installing the chart, it's important to understand that the -n flag provided in the helm install command does not determine where the actual resources will be deployed. Instead, deployment is controlled by the javaAgents[].namespace parameter for each object in the values.yaml file.
68
+
When installing the chart, it is important to understand that the -n flag provided in the helm install command does not determine where the actual resources will be deployed. Instead, deployment is controlled by the javaAgents[].namespace parameter for each object in the values.yaml file.
62
69
63
70
Use the -n flag to specify a namespace, either using the same namespace where your Lightrun Kubernetes Operator is installed or creating a new namespace specifically for this purpose, such as "lightrun-agents". This namespace will be referenced if you need to uninstall the chart later.
- The `my-service-1` does not use an `existingSecret` and instead the `agentPoolCredentials.apiKey` and `agentPoolCredentials.pinnedCertHash` are provided directly.
71
81
72
82
- The `my-service-2` uses an `existingSecret` named `my-existing-secret`
83
+
73
84
```yaml
74
85
javaAgents:
75
86
- name: 'my-service-1'
@@ -109,9 +120,11 @@ javaAgents:
109
120
```
110
121
111
122
### Full
123
+
112
124
- The `my-service-1` does not use an `existingSecret` and instead the `agentPoolCredentials.apiKey` and `agentPoolCredentials.pinnedCertHash` are provided directly.
113
125
114
126
- The `my-service-2` uses an `existingSecret` named `my-existing-secret`
0 commit comments