kubevious-agent

by joaquinito2051

Helm chartv1.0.4App 1.0.4

A Helm chart for Kubevious SaaS Agent

About this chart

Kubevious Agent Helm Charts

Kubevious Agent reports configuration from inside the cluster to Kubevious SaaS (https://portal.kubevious.io).

Prerequisites

  • Kubernetes v1.13 or higher
  • Helm v3.2 or higher

Installation

  1. Create a namespace:
kubectl create namespace kubevious-agent
  1. Create token secret kubevious-token. Specific instructions with token data value is available in cluster editor.
kubectl create secret generic kubevious-token -n kubevious-agent \
    --from-literal=key=<data-from-kubevious-portal-cluster-editor> \
    --dry-run=client -o yaml |
    kubectl apply -f -
  1. Add repository
helm repo add kubevious https://helm.kubevious.io
  1. Install the agent chart
helm upgrade --atomic -i -n kubevious-agent kubevious-agent kubevious/kubevious-agent

Configuration

The following table lists the configurable parameters of the kubevious chart and their default values.

ValueDescriptionDefault
nameOverrideOverrides the app.kubernetes.io/name label value
fullnameOverrideOverrides name of the app
kubevious.api.skipEventsIndicates whether Kubernetes Events should be collected by Kubevious. On some systems, that can significantly increase memory, processing, and storage requirements.True
kubevious.api.skipSecretsIndicates whether Kubevious should collect Kubernetes Secrets. Values of Secrets are always sanitized and replaced with null. Collecting Secrets helps detect inconsistencies between data keys and their references.False
kubevious.api.skippedList of APIs to be skipped from the collection. Use <apiVersion>:<kind> format. For example: apps/v1:ControllerRevision or discovery.k8s.io/v1:EndpointSlice[]
parser.podAnnotationsKubevious parser pod annotations
parser.image.pullPolicyKubevious parser PodSpec pullPolicyIfNotPresent
parser.image.imagePullSecretsKubevious parser PodSpec imagePullSecrets
parser.resources.requests.cpuKubevious parser request CPU100m
parser.resources.requests.memoryKubevious parser request Memory200Mi
parser.resources.limits.cpuKubevious parser limit CPU
parser.resources.limits.memoryKubevious parser limit Memory
parser.v8MaxOldSpaceParser V8 old memory section (in megabytes)
parser.podSecurityContextKubevious parser PodSpec securityContext
parser.nodeSelectorKubevious parser PodSpec nodeSelector
parser.tolerationsKubevious parser PodSpec tolerations
parser.affinityKubevious parser PodSpec affinity
parser.log.levelParser backend log level. Values are: error, warn, info, verbose, debug, sillyInfo
parser.serviceAccount.createIndicates whether a service account should be created for Kubevious parsertrue
parser.serviceAccount.annotationsAnnotations to add to Kubevious parser service account
parser.serviceAccount.nameThe name of the service account to use. If not and create is true, a name is generated

Detailed Notes

Kubernetes Secret Sanitization

Data from Kubernetes secrets is sanitized and does not leave the cluster. Keys of data are maintained but data is completely removed. Maintaining information about keys in secret allows validation of structure of secrets and show how things are mapped to environment variables and volume mounts. Below is the example of Secret reported to Kubevious SaaS:

kind: Secret
apiVersion: v1
metadata:
  name: default-token-w2656
data:
  ca.crt: <null-instead-of-the-data>
  token: <null-instead-of-the-data>

If you want to learn more how sanitization works, please see the following code snippet below. Search for the _sanitizeSecret function. It may take few seconds for github to scroll to the line of interest. https://github.com/kubevious/parser/commit/1c3f19b781d6c22ccf4a4fa24bce10b514ea8150#diff-179652d03fa7d2a54b9fe88c99bd1e94bea9147b01b2b6616610a069244a348fR96-R104

Deploy kubevious-agent with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kubevious-agent on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkubevious-agent is pinned at v1.0.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply