Helm chartv0.1.11App sha-e80a7f7Verified publisher

The companion plugin can be used to upload files to Transloadit for all kinds of processing, such as transcoding video, resizing images, zipping/unzipping, and much more.

About this chart

Companion Helm Chart

A Helm chart for Companion - The companion plugin can be used to upload files to Transloadit for all kinds of processing, such as transcoding video, resizing images, zipping/unzipping, and much more.

Overview

Companion is a server integration for Uppy file uploader that handles the server-to-server communication between your server and file storage providers such as Google Drive, Dropbox, Instagram, Facebook, OneDrive and remote URLs. Companion is not a target to upload files to, but rather a proxy that handles OAuth and downloads files from third parties on your behalf, then uploads them to the final destination.

Key features:

  • OAuth Integration: Handles OAuth flows for various cloud storage providers
  • File Processing: Integrates with Transloadit for file processing capabilities
  • Secure Uploads: Provides secure server-to-server file transfers
  • Multiple Providers: Supports Dropbox, Google Drive, Instagram, Facebook, Box, OneDrive, Zoom, and more

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • Valid OAuth credentials for the cloud storage providers you want to use

Installation

Add Helm Repository

helm repo add factly https://factly.github.io/helm-charts
helm repo update

Install Chart

# Install with default values
helm install companion factly/companion

# Install with custom values
helm install companion factly/companion -f values.yaml

# Install in specific namespace
helm install companion factly/companion --namespace companion --create-namespace

Uninstallation

helm uninstall companion

Configuration

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

Global Parameters

ParameterDescriptionDefault
nameOverrideString to partially override companion.fullnamecompanion
fullnameOverrideString to fully override companion.fullnamecompanion
namespaceOverrideOverride the deployment namespace""
imagePullSecretsGlobal Docker registry secret names as an array[]

Image Parameters

ParameterDescriptionDefault
image.repositoryCompanion image repositorytransloadit/companion
image.pullPolicyImage pull policyIfNotPresent
image.tagCompanion image tag (overrides the image tag whose default is the chart appVersion)""

Deployment Parameters

ParameterDescriptionDefault
replicaCountNumber of Companion replicas1
autoscaling.enabledEnable horizontal pod autoscalerfalse
autoscaling.minReplicasMinimum number of replicas2
autoscaling.maxReplicasMaximum number of replicas5
autoscaling.targetCPUUtilizationPercentageTarget CPU utilization percentage80
autoscaling.targetMemoryUtilizationPercentageTarget memory utilization percentage80

Environment Variables

ParameterDescriptionDefault
envArray of environment variables for Companion configurationSee values.yaml

Required Environment Variables

Environment VariableDescriptionDefault
COMPANION_SECRETLong set of random characters for server session"CHANGE_ME"
COMPANION_DOMAINYour server domain"YOUR SERVER DOMAIN"
COMPANION_DATADIRFile path for temporary file storage"/"
COMPANION_PROTOCOLServer protocol (http/https)"http"
COMPANION_PORTPort on which to start the server"3020"
COMPANION_SELF_ENDPOINTShould be same as your domain + path"THIS SHOULD BE SAME AS YOUR DOMAIN + PATH"

Optional Provider Configuration

The chart supports configuration for various cloud storage providers through environment variables:

  • AWS S3: COMPANION_AWS_KEY, COMPANION_AWS_SECRET, COMPANION_AWS_BUCKET, COMPANION_AWS_REGION

Service Parameters

ParameterDescriptionDefault
service.typeKubernetes service typeNodePort
service.portService port3020
service.portNameService port namehttp
service.annotationsService annotations{}
service.labelsService labels{}

ServiceAccount Parameters

ParameterDescriptionDefault
serviceAccount.createSpecifies whether a service account should be createdfalse
serviceAccount.annotationsAnnotations to add to the service account{}
serviceAccount.labelsLabels to add to the service account{}
serviceAccount.nameThe name of the service account to use"companion"

Ingress Parameters

ParameterDescriptionDefault
ingress.enabledEnable ingress controller resourcefalse
ingress.annotationsIngress annotationsSee values.yaml
ingress.hostsIngress hostnames["change-to-your-domain.com", "www.change-to-your-domain.com"]
ingress.pathsIngress paths["/"]
ingress.extraPathsExtra ingress paths[]
ingress.tlsIngress TLS configurationSee values.yaml

Monitoring Parameters

ParameterDescriptionDefault
metrics.enabledEnable metrics collectionfalse
metrics.serviceMonitor.enabledEnable ServiceMonitor for Prometheusfalse
metrics.serviceMonitor.selectorServiceMonitor selector{release: monitoring}
metrics.serviceMonitor.labelsServiceMonitor labels{}
metrics.serviceMonitor.intervalMetrics scrape interval30s
metrics.serviceMonitor.schemeMetrics scrape schemehttp
metrics.serviceMonitor.scrapeTimeoutMetrics scrape timeout30s

Health Check Parameters

ParameterDescriptionDefault
readinessProbe.initialDelaySecondsInitial delay for readiness probe10
readinessProbe.timeoutSecondsTimeout for readiness probe5
readinessProbe.successThresholdSuccess threshold for readiness probe1
readinessProbe.failureThresholdFailure threshold for readiness probe5
readinessProbe.periodSecondsPeriod for readiness probe10
livenessProbe.initialDelaySecondsInitial delay for liveness probe50
livenessProbe.timeoutSecondsTimeout for liveness probe5
livenessProbe.successThresholdSuccess threshold for liveness probe1
livenessProbe.failureThresholdFailure threshold for liveness probe5
livenessProbe.periodSecondsPeriod for liveness probe10

Resource Parameters

ParameterDescriptionDefault
resourcesCPU/Memory resource requests/limits{}
nodeSelectorNode labels for pod assignment{}
tolerationsTolerations for pod assignment[]
affinityAffinity settings for pod assignment{}
podAnnotationsAnnotations to add to pods{}
securityContextSecurity context for pods{}

Examples

Basic Installation with Custom Domain

# values.yaml
env:
  - name: COMPANION_SECRET
    value: "your-super-secret-key-here"
  - name: COMPANION_DOMAIN
    value: "companion.yourdomain.com"
  - name: COMPANION_PROTOCOL
    value: "https"
  - name: COMPANION_SELF_ENDPOINT
    value: "https://companion.yourdomain.com"

ingress:
  enabled: true
  hosts:
    - companion.yourdomain.com
  tls:
    - secretName: companion-tls
      hosts:
        - companion.yourdomain.com

Installation with Google Drive Support

# values.yaml
env:
  - name: COMPANION_SECRET
    value: "your-super-secret-key-here"
  - name: COMPANION_DOMAIN
    value: "companion.yourdomain.com"
  - name: COMPANION_GOOGLE_KEY
    value: "your-google-oauth-client-id"
  - name: COMPANION_GOOGLE_SECRET
    value: "your-google-oauth-client-secret"

Installation with AWS S3 Support

# values.yaml
env:
  - name: COMPANION_AWS_KEY
    value: "your-aws-access-key"
  - name: COMPANION_AWS_SECRET
    value: "your-aws-secret-key"
  - name: COMPANION_AWS_BUCKET
    value: "your-s3-bucket-name"
  - name: COMPANION_AWS_REGION
    value: "us-east-1"

Security Considerations

  1. Secret Management: Always change the default COMPANION_SECRET value and use a secure random string
  2. OAuth Credentials: Store OAuth credentials securely using Kubernetes secrets rather than plain text in values
  3. Domain Configuration: Ensure COMPANION_DOMAIN and COMPANION_SELF_ENDPOINT match your actual deployment URL
  4. Client Origins: Use COMPANION_CLIENT_ORIGINS to whitelist allowed client domains for security

Troubleshooting

Common Issues

  1. OAuth Redirect Mismatch: Ensure your OAuth app redirect URLs match your Companion domain
  2. CORS Issues: Configure COMPANION_CLIENT_ORIGINS to include your frontend domain
  3. File Upload Failures: Check that COMPANION_DATADIR has sufficient disk space and proper permissions
  4. Provider Authentication: Verify OAuth credentials are correctly configured for each provider

Logs

To view Companion logs:

kubectl logs -f deployment/companion

Links

License

This Helm chart is licensed under the MIT License.

Deploy companion with OpenTenant

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