cron-10x

by log10x

Helm chartv1.1.4App 1.1.183Verified publisher

Official Log10x helm chart for running the 10x Compiler as a scheduled CronJob

About this chart

cron-10x

Runs the 10x Compiler on a schedule: a Kubernetes CronJob that pulls sources, scans them for log statements, links the result into a symbol library and pushes it back to a config repository.

Install

helm repo add log10x https://log-10x.github.io/helm-charts
helm repo update

helm install my-compiler log10x/cron-10x \
  --set-file tenx.licenseJwt=./license.jwt \
  -f my-compiler.yaml

Download the licence from console.log10x.com. Prefer --set-file over --set so the JWT never lands in shell history. An install with no licence fails at render time rather than scheduling a CronJob whose every run exits non-zero.

Example values files are in examples/: minimal.yaml, gitops.yaml, airgapped.yaml.

The image

The chart runs log10x/compiler-10x, tag defaulting to the chart appVersion.

The compiler's pull stage shells out to fetch source repositories, container images and charts, so the image has to carry that toolchain. Measured on compiler-10x:1.1.45:

ToolPathVersion
git/usr/bin/git2.43.7
docker/usr/local/bin/dockersymlink to /usr/bin/podman 4.9.4
helm/usr/local/bin/helmv3.16.4

The docker CLI is podman, which matters in a good way: image pulls work inside the pod with no host docker socket mounted and no privileged container. kubectl is not present.

The lean log10x/pipeline-10x runtime image carries none of the three, which is why earlier versions of this chart could only ever scan what was already on disk.

The licence

The engine reads the licence from TENX_LICENSE_FILE or TENX_LICENSE_KEY. Nothing reads TENX_API_KEY; it appears nowhere in the compiler image's config tree, where the compile bootstrap resolves

licenseKey:  $=TenXEnv.get("TENX_LICENSE_KEY", "NO-LICENSE")
licenseFile: $=TenXEnv.get("TENX_LICENSE_FILE")

tenx.licenseDelivery picks between them. file, the default, projects the Secret to /etc/tenx/license/<licenseSecretKey> and points TENX_LICENSE_FILE at it, which keeps the token out of the process environment and lets a Secret rotation rotate the file in place. env injects TENX_LICENSE_KEY through a secretKeyRef.

log10xApiKey, apiKeySecret.* and log10xLicense are deprecated. When no tenx.license* value is set the chart reads them as the licence JWT, so an existing install starts working instead of silently continuing to do nothing.

Values

KeyDefaultDescription
image.repositorylog10x/compiler-10xCompiler image
image.tag""Defaults to .Chart.AppVersion
configFetcherImage.tag1.0.0Git config fetcher init container
tenx.licenseJwt""Licence JWT; the chart creates the Secret
tenx.licenseSecret""Existing Secret holding the JWT; takes precedence
tenx.licenseSecretKeylicense-jwtKey inside the Secret
tenx.licenseDeliveryfilefile or env
tenx.airgappedfalseSets TENX_AIRGAPPED, no calls to the vendor gateway
gitToken""Token for private config and symbol repositories
jobsone compiler-jobList of scheduled compiles
podSecurityContextrunAsNonRoot: trueApplied to every job that does not override it
containerSecurityContextdrops all capabilitiesApplied to every job that does not override it
serviceAccount.createtrue

Per job

KeyDefaultDescription
nameRequired. Becomes part of the CronJob name
scheduleRequired, cron syntax
argsRequired, normally ["@apps/compiler"]
timeZoneunsetIANA zone, needs Kubernetes 1.27 or later
suspendunsetPause the schedule without uninstalling
concurrencyPolicyForbidTwo compiles writing one symbol library is not a default worth having
activeDeadlineSeconds3600 in the shipped jobUnset means a stuck run blocks every following one under Forbid
backoffLimit0 in the shipped jobThe next tick is the retry
startingDeadlineSecondsunset
restartPolicyNeverNever or OnFailure only
runtimeNameSets TENX_RUNTIME_NAME
config.git / config.volumedisabledConfig tree from a repository or a PVC
symbols.git / symbols.volumedisabledSymbol files from a repository or a PVC
extraEnv, initContainers, volumes, volumeMounts, configFilesempty
resources{}A compile is CPU-bound while scanning and holds the symbol set in memory while linking
nodeSelector, tolerations, affinityemptyPod fields

Verify

Nothing runs until the schedule fires. To force a run:

kubectl create job --from=cronjob/my-compiler-cron-10x-compiler-job compile-now
kubectl logs -l job-name=compile-now --tail=100

A successful run ends with a JSON report naming the Scan and Link phases and "success": true.

Upgrading from 1.0.6

1.0.6 rendered log10x/pipeline-10x and set TENX_API_KEY. Both are corrected here, so an upgrade changes the image and the environment. Set tenx.licenseJwt or tenx.licenseSecret; if you leave log10xApiKey in place it is read as the licence.

1.0.6 also rendered nodeSelector, tolerations and affinity inside the container, and the API server rejects that outright:

strict decoding error: unknown field
"spec.jobTemplate.spec.template.spec.containers[0].nodeSelector"

so no values file that set one of them could be installed at all. They are pod fields again.

Deploy cron-10x with OpenTenant

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