Skip to content

Commit 4457c5b

Browse files
author
Leonid Podolinskiy
committed
adjust helm chart for artifachub.io
1 parent f7aafe8 commit 4457c5b

File tree

3 files changed

+148
-15
lines changed

3 files changed

+148
-15
lines changed

helm-chart/Chart.yaml

+59
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ description: A Helm chart for Lightrun k8s operator
1010
# a dependency of application charts to inject those utilities and functions into the rendering
1111
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
1212
type: application
13+
icon: https://lightrun-public.s3.amazonaws.com/img/lightrun-logo.png
1314

1415
## Kubeversion due to "seccompProfile" in the controller deployment
1516
kubeVersion: ">= 1.19.0"
@@ -18,3 +19,61 @@ kubeVersion: ">= 1.19.0"
1819
# to the chart and its templates, including the app version.
1920
# Versions are expected to follow Semantic Versioning (https://semver.org/)
2021
version: 0.1.0 # Will be updated by CI pipeline
22+
23+
24+
25+
# ArtifactHub.io annotations
26+
annotations:
27+
artifacthub.io/crds: |
28+
- kind: LightrunJavaAgent
29+
version: v1beta
30+
name: lightrunjavaagent
31+
shortName: lrja
32+
description: Custom resource describing Lightrun agent version, configuration and deployment that will be patched. Dependend on secret with few Lightrun key
33+
artifacthub.io/crdsExamples: |
34+
apiVersion: agents.lightrun.com/v1beta
35+
kind: LightrunJavaAgent
36+
metadata:
37+
name: example-cr
38+
spec:
39+
initContainer:
40+
image: "lightruncom/k8s-operator-init-java-agent-linux:1.8.5-init.1"
41+
sharedVolumeName: lightrun-agent-init
42+
sharedVolumeMountPath: "/lightrun"
43+
deploymentName: app
44+
secretName: lightrun-secrets
45+
serverHostname: app.lightrun.com
46+
agentEnvVarName: JAVA_TOOL_OPTIONS
47+
agentConfig:
48+
max_log_cpu_cost: "2"
49+
agentTags:
50+
- operator
51+
- example
52+
- 1.8.3
53+
containerSelector:
54+
- app
55+
---
56+
apiVersion: v1
57+
metadata:
58+
name: lightrun-secrets
59+
stringData:
60+
lightrun_key: <lightrun_key_from_ui>
61+
pinned_cert_hash: <pinned_cert_hash>
62+
kind: Secret
63+
type: Opaque
64+
65+
artifacthub.io/license: Apache-2.0
66+
artifacthub.io/links: |
67+
- name: Operator repo
68+
url: https://github.com/lightrun-platform/lightrun-k8s-operator
69+
- name: CR example with explanation
70+
url: https://github.com/lightrun-platform/lightrun-k8s-operator/blob/main/examples/lightrunjavaagent.yaml
71+
artifacthub.io/maintainers: |
72+
- name: Lightrun devops team
73+
74+
- name: LeonidP
75+
76+
artifacthub.io/operator: "true"
77+
artifacthub.io/operatorCapabilities: Basic Install
78+
artifacthub.io/prerelease: "false"
79+

helm-chart/README.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# lightrun-k8s-operator
2+
3+
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
4+
5+
A Helm chart for Lightrun k8s operator
6+
7+
## Requirements
8+
9+
Kubernetes: `>= 1.19.0`
10+
11+
12+
[Helm chart](../helm-chart/) is available in repository branch `helm-repo`
13+
- Add the repo to your Helm repository list
14+
```sh
15+
helm repo add lightrun-k8s-operator https://lightrun-platform.github.io/lightrun-k8s-operator
16+
```
17+
18+
- Install the Helm chart:
19+
> _Using default [values](../helm-chart/values.yaml)_
20+
21+
```sh
22+
helm install lightrun-k8s-operator/lightrun-k8s-operator -n lightrun-operator --create-namespace
23+
```
24+
25+
> _Using custom values file_
26+
27+
```sh
28+
helm install lightrun-k8s-operator/lightrun-k8s-operator -f <values file> -n lightrun-operator --create-namespace
29+
```
30+
> `helm upgrade --install` or `helm install --dry-run` may not work properly due to limitations of how Helm work with CRDs.
31+
You can find more info [here](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/)
32+
33+
34+
- Uninstall the Helm chart.
35+
```sh
36+
helm delete lightrun-k8s-operator
37+
```
38+
> `CRDs` will not be deleted due to Helm CRDs limitations. You can learn more about the limitations [here](https://helm.sh/docs/topics/charts/#limitations-on-crds).
39+
40+
### Chart version vs controller version
41+
For the sake of simplicity, we are keeping the convention of the same version for both the controller image and the Helm chart. This helps to ensure that controller actions are aligned with CRDs preventing failed resource validation errors.
42+
43+
44+
## Values
45+
46+
| Key | Type | Default | Description |
47+
|-----|------|---------|-------------|
48+
| controllerManager.kubeRbacProxy.image.repository | string | `"gcr.io/kubebuilder/kube-rbac-proxy"` | |
49+
| controllerManager.kubeRbacProxy.image.tag | string | `"v0.11.0"` | |
50+
| controllerManager.kubeRbacProxy.resources.limits.cpu | string | `"500m"` | |
51+
| controllerManager.kubeRbacProxy.resources.limits.memory | string | `"128Mi"` | |
52+
| controllerManager.kubeRbacProxy.resources.requests.cpu | string | `"5m"` | |
53+
| controllerManager.kubeRbacProxy.resources.requests.memory | string | `"64Mi"` | |
54+
| controllerManager.manager.image.repository | string | `"lightruncom/lightrun-k8s-operator"` | |
55+
| controllerManager.manager.image.tag | string | `"latest"` | For simplicity of version compatibilities we are keeping the same controller and chart versions So the most safe approach is to use same version as the Chart. When installing chart from the helm repo, every helm package version will have controller image set to chart version |
56+
| controllerManager.manager.nodeSelector | object | `{}` | |
57+
| controllerManager.manager.resources.limits.cpu | string | `"500m"` | |
58+
| controllerManager.manager.resources.limits.memory | string | `"128Mi"` | |
59+
| controllerManager.manager.resources.requests.cpu | string | `"10m"` | |
60+
| controllerManager.manager.resources.requests.memory | string | `"64Mi"` | |
61+
| controllerManager.manager.tolerations | list | `[]` | |
62+
| controllerManager.replicas | int | `1` | |
63+
| managerConfig.controllerManagerConfigYaml.health.healthProbeBindAddress | string | `":8081"` | |
64+
| managerConfig.controllerManagerConfigYaml.leaderElection.leaderElect | bool | `true` | |
65+
| managerConfig.controllerManagerConfigYaml.leaderElection.resourceName | string | `"5b425f09.lightrun.com"` | |
66+
| managerConfig.controllerManagerConfigYaml.metrics.bindAddress | string | `"127.0.0.1:8080"` | |
67+
| managerConfig.controllerManagerConfigYaml.webhook.port | int | `9443` | |
68+
| managerConfig.logLevel | string | `"info"` | Log level: 1 - 5 Higher number - more logs Documentation of logr module https://pkg.go.dev/github.com/go-logr/[email protected]#hdr-Verbosity On level info (0) (default) you'll see only deployments that are being added or deleted and errors On level 1 you'll see 1 additional log per every successful reconciliation loop run On level 2 you'll see all debug prints with intermediate steps while patching deployment per every reconciliation loop run |
69+
| managerConfig.operatorScope | object | `{"namespacedScope":false,"namespaces":["default"]}` | Operator may work in 2 scopes: cluster and namespaced Cluster scope will give permissions to operator to watch and patch deployment in the whole cluster With namespaced scope you need to provide list of namespaces that operator will be able to watch. Namespaced scope implemented by both controller code and creation of the appropriate Roles by the chart Any change to the list of namespaces will cause restart of the operator controller pod. |
70+
| metricsService | object | `{"ports":[{"name":"https","port":8443,"protocol":"TCP","targetPort":8443}],"type":"ClusterIP"}` | Metrics service for prometheus compatible poller |
71+
| nameOverride | string | `"lightrun-k8s-operator"` | |
72+
73+
----------------------------------------------
74+
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)

helm-chart/values.yaml

+15-15
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ controllerManager:
2020
manager:
2121
image:
2222
repository: lightruncom/lightrun-k8s-operator
23-
## For simplicity of version compatibilities we are keeping the same controller and chart versions
24-
## So the most safe approach is to use same version as the Chart.
25-
## When installing chart from the helm repo, every helm package version will have controller image set to chart version
23+
# -- For simplicity of version compatibilities we are keeping the same controller and chart versions
24+
# So the most safe approach is to use same version as the Chart.
25+
# When installing chart from the helm repo, every helm package version will have controller image set to chart version
2626
tag: latest
2727
resources:
2828
limits:
@@ -51,12 +51,12 @@ controllerManager:
5151

5252
## Controller configuration
5353
managerConfig:
54-
## Log level: 1 - 5
55-
## Higher number - more logs
56-
## Documentation of logr module https://pkg.go.dev/github.com/go-logr/[email protected]#hdr-Verbosity
57-
## On level info (0) (default) you'll see only deployments that are being added or deleted and errors
58-
## On level 1 you'll see 1 additional log per every successful reconciliation loop run
59-
## On level 2 you'll see all debug prints with intermediate steps while patching deployment per every reconciliation loop run
54+
# -- Log level: 1 - 5
55+
# Higher number - more logs
56+
# Documentation of logr module https://pkg.go.dev/github.com/go-logr/[email protected]#hdr-Verbosity
57+
# On level info (0) (default) you'll see only deployments that are being added or deleted and errors
58+
# On level 1 you'll see 1 additional log per every successful reconciliation loop run
59+
# On level 2 you'll see all debug prints with intermediate steps while patching deployment per every reconciliation loop run
6060
logLevel: info
6161

6262
## Default values of the container inside pod. In most cases you don't need to change those
@@ -70,17 +70,17 @@ managerConfig:
7070
bindAddress: 127.0.0.1:8080
7171
webhook:
7272
port: 9443
73-
## Operator may work in 2 scopes: cluster and namespaced
74-
## Cluster scope will give permissions to operator to watch and patch deployment in the whole cluster
75-
## With namespaced scope you need to provide list of namespaces that operator will be able to watch.
76-
## Namespaced scope implemented by both controller code and creation of the appropriate Roles by the chart
77-
## Any change to the list of namespaces will cause restart of the operator controller pod.
73+
# -- Operator may work in 2 scopes: cluster and namespaced
74+
# Cluster scope will give permissions to operator to watch and patch deployment in the whole cluster
75+
# With namespaced scope you need to provide list of namespaces that operator will be able to watch.
76+
# Namespaced scope implemented by both controller code and creation of the appropriate Roles by the chart
77+
# Any change to the list of namespaces will cause restart of the operator controller pod.
7878
operatorScope:
7979
namespaces:
8080
- default
8181
namespacedScope: false
8282

83-
## Metrics service for prometheus compatible poller
83+
# -- Metrics service for prometheus compatible poller
8484
metricsService:
8585
ports:
8686
- name: https

0 commit comments

Comments
 (0)