allure-docker-service

by Think-Cube

Helm chartv1.0.1App 2.44.0MITVerified publisher

Allure Docker Service on Kubernetes, with optional Allure UI, ingress and persistent report storage

About this chart

allure-docker-service-chart

Helm chart for Allure Docker Service on Kubernetes, with an optional Allure UI, ingress and persistent report storage.

The chart is published to GitHub Container Registry as an OCI artifact and signed with keyless Cosign. It is tested with Helm 4 and also installs with Helm 3.8 or newer, the first version with OCI support.

Install

helm install allure oci://ghcr.io/think-cube/charts/allure-docker-service \
  --namespace allure --create-namespace \
  --set api.security.adminUser=admin \
  --set api.security.adminPassword='change-me'

This installs the newest version. In production, pin one from Releases with --version.

Security is on by default, so the install fails until you set an admin user and password, or point api.security.existingSecret to a Secret you manage. That Secret needs the keys SECURITY_USER and SECURITY_PASS, and optionally SECURITY_VIEWER_USER and SECURITY_VIEWER_PASS.

Without an ingress, reach the API with a port-forward; the install notes print the command.

With ingress and the UI

api:
  urlPrefix: /allure-api
  tls: true
  security:
    existingSecret: allure-credentials
ui:
  enabled: true
ingress:
  enabled: true
  className: nginx
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: 500m
  api:
    host: allure-api.example.com
  ui:
    host: allure.example.com
  tls:
    - secretName: allure-tls
      hosts:
        - allure-api.example.com
        - allure.example.com

The UI is off by default because upstream has not updated it since January 2021; the API serves reports on its own. When the UI is enabled, it reaches the API at the ingress host and prefix, or at ui.publicApiUrl if you set it.

Storage

Reports are stored in a PersistentVolumeClaim of the cluster's default storage class. The claim is kept when the release is uninstalled, so reports survive a reinstall; set persistence.keepOnUninstall: false to delete it with the release. Allure runs as a single replica because all reports live on one volume.

Values

KeyDefaultDescription
api.image.repositoryfrankescobar/allure-docker-serviceAPI image
api.image.tag2.44.0API image tag
api.urlPrefix""Path prefix the API is served under, for example /allure-api
api.checkResultsEverySecondsNONESeconds between checks for new results, or NONE to generate reports on request
api.keepHistorytrueKeep the history of previous reports
api.tlsfalseSet when clients reach the API over HTTPS
api.security.enabledtrueRequire a login
api.security.makeViewerEndpointsPublicfalseLet anyone read reports without logging in
api.security.existingSecret""Existing Secret with the credentials
api.security.adminUser / adminPassword""Admin credentials, required without an existing Secret
api.security.viewerUser / viewerPassword""Optional read-only user
api.extraEnv[]Extra environment variables for the API
api.resourcesrequests 250m/1Gi, limit 2GiResources of the API container
ui.enabledfalseDeploy the Allure UI
ui.image.tag7.0.3UI image tag
ui.urlPrefix""Path prefix the UI is served under
ui.publicApiUrl""URL browsers use to reach the API; required without an ingress
service.typeClusterIPService type
service.apiPort / uiPort5050 / 5252Service ports
ingress.enabledfalseCreate an Ingress
ingress.className""Ingress class
ingress.annotations{}Ingress annotations
ingress.api.host / ingress.ui.hostallure-api.example.com / allure.example.comHosts
ingress.tls[]TLS settings
persistence.enabledtrueStore reports in a PersistentVolumeClaim
persistence.existingClaim""Use an existing claim
persistence.storageClass""Storage class; - disables dynamic provisioning
persistence.size5GiSize of the claim
persistence.keepOnUninstalltrueKeep the claim when the release is uninstalled
serviceAccount.createtrueCreate a ServiceAccount
podSecurityContextnon-root UID 1000, RuntimeDefault seccompPod security context
securityContextno privilege escalation, all capabilities droppedContainer security context
nodeSelector, tolerations, affinityemptyScheduling

values.schema.json validates every value, so a typo in a key fails the install instead of being ignored.

Verify the chart

cosign verify ghcr.io/think-cube/charts/allure-docker-service:<version> \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  --certificate-identity-regexp '^https://github\.com/Think-Cube/workflows/\.github/workflows/helm-chart\.yml@refs/tags/v.+$'

Moving from allure-docker-helm-chart

Releases of the earlier allure-docker-helm-chart chart are no longer published. This chart replaces it with release-based resource names, installation into the release namespace and report storage in a claim of your storage class instead of a hostPath volume.

Install this chart as a new release. To keep existing reports, copy the contents of the old volume (/allure/projects on the node) into the new claim, for example with kubectl cp into the running API pod at /app/projects.

Development

Pull requests lint the chart, validate the rendered manifests with kubeconform and install it into a kind cluster with each file in ci/, then run helm test. Pushing a vX.Y.Z tag that matches version in Chart.yaml publishes the chart.

License

This project is licensed under the MIT License.

Deploy allure-docker-service with OpenTenant

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