|
| 1 | +# lightrun-k8s-operator |
| 2 | + |
| 3 | + |
| 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) |
0 commit comments