lxag_container_agent

by devops-bar

Helm chartv1.0.0App 1.16.0Verified publisher

A Helm chart for Kubernetes

About this chart

Qualys Cloud Agent Container

Qualys Cloud Agent Container continuously secure containers from build to runtime.

The installation will deploy the Qualys Cloud Agent Container on each worker node as a daemon set. By default, it assumes containerd and CRI-O as the default runtimes on Kubernetes cluster and OpenShift Cluster, respectively. If you are using a different container runtime, provide the appropriate value in the helm chart configuration.

Prerequisites

Know Your Runtime

Get the details about the container runtime by executing the following command:

kubectl get nodes -o wide

Kubernetes & Helm

  • Kubernetes 1.17+
  • Helm v3.10.x

Get Repository Info

  • helm repo add qualys-helm-chart https://qualys.github.io/Qualys-Helm-Charts/
  • helm repo update

RedHat OpenShift

  • OpenShift v4.0+ (Default Container Engine is CRI-O)

Installing the Chart

Use the following command to install the chart:

helm install [NAME] [CHART] [flags]

  • Install on Kubernetes cluster with containerd runtime (Default) helm install lxagent-demo qualys-helm-chart/lxagent --namespace qualys-agent --create-namespace --set qualys.args.activationId=${ACTIVATIONID},qualys.args.customerId=${CUSTOMERID},qualys.args.providerName=${PROVIDERNAME},qualys.args.serverUri=${SERVER_URI}

  • Install on Kubernetes cluster with cri-o runtime helm install lxagent-demo qualys-helm-chart/lxagent --namespace qualys-agent --create-namespace --set qualys.args.activationId=${ACTIVATIONID},qualys.args.customerId=${CUSTOMERID},qualys.args.providerName=${PROVIDERNAME},qualys.args.serverUri=${SERVER_URI},crio.enabled=true

  • Install on Kubernetes cluster with docker runtime helm install lxagent-demo qualys-helm-chart/lxagent --namespace qualys-agent --create-namespace --set qualys.args.activationId=${ACTIVATIONID},qualys.args.customerId=${CUSTOMERID},qualys.args.providerName=${PROVIDERNAME},qualys.args.serverUri=${SERVER_URI},docker.enabled=true

  • Install on OpenShift cluster with cri-o runtime (Default) helm install lxagent-demo qualys-helm-chart/lxagent --namespace qualys-agent --create-namespace --set qualys.args.activationId=${ACTIVATIONID},qualys.args.customerId=${CUSTOMERID},qualys.args.providerName=${PROVIDERNAME},qualys.args.serverUri=${SERVER_URI},openshift=true,crio.enabled=true

Upgrading the Release

Use the following command to upgrade the chart:

helm upgrade [RELEASE] [CHART] [flags]

Where,

[RELEASE] is the release name.

[CHART] is the chart path.

e.g.

helm upgrade lxagent-demo qualys-helm-chart/lxagent --namespace qualys-agent

Uninstalling the Chart

Use the following command to uninstall the chart:

helm uninstall RELEASE_NAME [...] [flags]

e.g.

helm uninstall lxagent-demo --namespace qualys

Configuration

Configurable Parameters

The following table lists the configurable parameters for the Qualys Container Security chart and their default values:

ParameterDescriptionDefaultNotes
containerd.enabledSet to true, if the container runtime is containerd.trueImportant: Enable only one runtime environment.
containerd.socketPathThe host path of the mounted volume for the containerd socket./var/run/containerd/containerd.sockOptional
containerd.storageDriverPathThe root directory path of containerd overlay storage driver/var/lib/containerdOptional
crio.enabledSet to true, if the container runtime is CRI-O.falseImportant: Enable only one runtime environment.
crio.socketPathThe host path of the mounted volume for the CRI-O socket./var/run/crio/crio.sockOptional
docker.enabledSet to true, if the container runtime is docker.falseImportant: Enable only one runtime environment.
docker.socketPathThe host path of the mounted volume for the docker socket./var/run/docker.sockOptional
docker.tlsVerify.enabledEnables the TLS authentication. The value should be 0 or 1.falseOptional
docker.tlsVerify.tlsCertPathProvide the path of the client certificate directory.-Optional (Mandatory if DOCKER_TLS_VERIFY=1 is defined).
docker.tlsVerify.dockerHostSpecify the address on which the docker daemon is configured to listen.-Optional (Mandatory if DOCKER_TLS_VERIFY=1 is defined).
docker.tlsVerify.dockerHostValueSpecify the loopback IPv4 address or hostname, and port :<port#>.-Optional
openshiftSet to true, if deploying in OpenShift.false
qualys.createNamespaceSet to true, if you want to create new custom namespace.falseOptional
qualys.namespaceProvide the namespace to be used.qualysOptional Use the same namespace in values.yaml and on command line when using the helm install command. Check the examples at the bottom of this page.
qualys.customerIDProvide the Qualys customer id.-Mandatory
qualys.activationIDProvide the Qualys activation id.-Mandatory
qualys.pod_urlProvide the URL of a Qualys POD.-Mandatory
qualys.containerLaunchTimeoutSpecify the launch timeout for the scanning container in minutes.10Optional
qualys.imageSpecify the name of the Qualys Cloud Agent image in the private/dockerhub registry.qualys/lxagent:1.0.0-0Optional
qualys.imagePullPolicySpecify how to pull (download) the specified image.IfNotPresentOptional
qualys.cpuSpecify the CPU usage limit in percentage for the lxagent. Valid range: 0-100.0.2 (20% per core on the host)Optional
qualys.args.withoutPersistentStorageRuns the lxagent without using the persistent storage on the host.falseOptional
qualys.args.enableConsoleLogsPrints logs on the console.falseOptional
qualys.args.cicdDeployedLxagentRun the lxagent in a CI/CD environment.falseOptional
qualys.args.registryLxagentRun the lxagent to list and scan the registry assets.falseOptional
qualys.args.concurrentScanSpecify the number of docker/registry asset scans to run in parallel. Valid range: 1-20.4Optional
qualys.args.disableLog4jScanningDisables the log4j vulnerability scanning for container images.falseOptional
qualys.args.disableLog4jStaticDetectionDisables the log4j static detection for dynamic/static image scans.falseOptional
qualys.args.logFilePurgeCountThe maximum number of lxagent log files to archive.5Optional
qualys.args.logFileSizeThe maximum size for a lxagent log file in bytes. You can specify "<K/M/>", where K is kilobytes and M is megabytes.10MOptional
qualys.args.logLevelSets the logging level for lxagent. It determines the type of lxagent data you want to log. Specify a value from 0 to 5. 0=FATAL, 1=ERROR, 2=WARNING, 3=INFORMATION, 4=VERBOSE, 5=TRACE3 (INFORMATION)Optional
qualys.args.maskEnvVariableMasks the environment variables for images and containers.falseOptional
qualys.args.optimizeImageScansOptimizes the image scans for the General lxagent. It is available for the General lxagent type only.falseOptional
qualys.args.disableImageScanDisables the image scans for the General lxagent.falseOptional
qualys.args.performScaScanSCA scanning will be performed for container images.falseOptional
qualys.args.disallowInternetAccessForScaInternet access is enabled for the SCA scan and the SCA scan is performed in online mode.falseOptional
qualys.args.performSecretDetectionSecret scanning will be performed for container images.falseOptional
qualys.args.performMalwareDetectionMalware scanning will be performed for container images.falseOptional
qualys.args.limitResourceUsageUsed to limit the usage of resources for SCA or Secret or Malware Scan.falseOptional
qualys.args.scaScanTimeoutInSecondsSpecify the SCA scan timeout in seconds.900Optional
qualys.args.insecureRegistryUsed in case self sign certs are not being configured for private registries in containerdfalseOptional
qualys.args.storageDriverTypeUsed in case of containerd overlay storage driverfalseOptional
qualys.readOnlyRuns the lxagent in read-only mode.-Optional
qualys.tolerations.enabledAllows the DaemonSet runnable on master nodes.falseOptional
qualys.tolerations.toleration.keySpecify the toleration key.-Optional
qualys.tolerations.toleration.operatorSpecify the toleration operator.-Optional
qualys.tolerations.toleration.valueSpecify the toleration value.-Optional
qualys.tolerations.toleration.effectSpecify the toleration effect.-Optional
qualys.proxy.enabledSet to true, if a proxy is required to connect to the Qualys cloud.falseOptional
qualys.proxy.proxyvalueSpecify the IPv4/IPv6 address or FQDN of the proxy server.-Optional
qualys.proxy.proxycertpathSpecify the path of the proxy certificate file. proxycertpath is applicable only if the proxy has a valid certificate file.-Optional
qualys.LxagentContResources.enabledSpecifies the memory resources for the lxagent container.falseOptional
qualys.LxagentContResources.memoryLimitSpecify the memory usage limit for the lxagent container.-Optional
qualys.LxagentContResources.memoryRequestSpecify the memory usage request for the lxagent container.-Optional
qualys.scanningContResources.enabledSpecifies the memory resources for the scanning container.falseOptional
qualys.scanningContResources.memoryLimitSpecify the memory usage limit for the scanning container.-Optional
qualys.scanningContResources.memoryRequestSpecify the memory usage request for the scanning container.-Optional
qualys.persistentvolhostpathSpecify the directory where the lxagent will store the files./usr/local/qualys/cloud-agent/dataOptional
qualys.persistentVolumeClaim.enabledRequests for a storage of a specific size from the gross persistent volume.falseOptional
qualys.persistentVolumeClaim.storageClassNameSpecify the storage class name used by Kubernetes PersistentVolume.-Mandatory if qualys.persistentVolumeClaim.enabled is true
qualys.persistentVolumeClaim.storageSpecify the storage memory required. For example, 1Gi for the general/cicd lxagent and 10Gi for the registry lxagent.-Mandatory if qualys.persistentVolumeClaim.enabled is true
qualys.priorityClass.enabledSet to true, if you want to use the priority and preemption on PODs.falseOptional
qualys.priorityClass.priorityClassNameSpecify the priority class name used in DaemonSet.-Optional
qualys.priorityClass.priorityClassValueSpecify the value that determines the priority. For example, "1000000". Enter an integer less than or equal to 1 billion (1000000000). The higher the value, the higher the priority. Values are relative to the values of other priority classes in the cluster. Reserve very high numbers for system critical pods that you don't want to be preempted (removed).-Optional
qualys.priorityClass.preemptionPolicySpecify the preemption policy for a POD.-Optional
qualys.priorityClass.globalDefaultIndicates that the value of this PriorityClass should be used for PODs without a priorityClassName.-Optional
containerd.secretSet to true, when using self-signed certificate for registry in containerd. Add base 64 encoded content of ca.crt file in lxagent-secret yaml under data section. Also update the registry hostIP in daemonset yaml under volumeMounts for registry-cert-volume.falseOptional

How to specify the parameters?

Specify each parameter using the --set key=value[,key=value] argument to helm install.

For example,

helm install lxagent-demo qualys-helm-chart/lxagent --namespace qualys --set containerd.enabled=true

NOTE: A command line parameter value takes precedence over the parameter value from values.yaml.

Namespace Usage and Example

  • Create a new custom namespace: helm install lxagent-demo qualys-helm-chart/lxagent --set qualys.createNamespace=true --set qualys.namespace=namespace_name -n namespace_name --create-namespace

  • Use an existing namespace: helm install lxagent-demo qualys-helm-chart/lxagent --set qualys.namespace=existing_namespace_name -n existing_namespace_name

  • Use the default (qualys) namespace: helm install lxagent-demo qualys-helm-chart/lxagent -n qualys

Tip: You can use the default values.yaml


Contact

Contact [email protected] for assistance.

Deploy lxag_container_agent with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has lxag_container_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 chartlxag_container_agent is pinned at v1.0.0 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