Runway on Kubernetes Service
This guide walks you through onboarding your service to Runway for deployment on Kubernetes (AWS EKS or GCP GKE).
Before you begin
Section titled “Before you begin”Ensure your service repository meets these requirements:
-
Project access tokens (recommended): Onboard your service repository to
infra-mgmt
to automate Project Access Token management, including token rotation. Follow the onboarding instructions in the repository README. -
Container image pipeline: Your repository must build and push container images to the GitLab Container Registry. For Go applications, we recommend using goreleaser.
-
Semantic versioning: Include the
semantic-release
job from thecommon-ci-tasks
repository. This automates version management and triggers deployments through git tags.
Step 1: Add your service to the workload inventory
Section titled “Step 1: Add your service to the workload inventory”The workload inventory registers your service with Runway and grants deployment permissions.
Gather required information
Section titled “Gather required information”-
Choose a Runway service ID: Select a globally unique identifier for your service.
- Maximum length: 57 characters for EKS, 23 characters for GKE
- If deploying to both EKS and GKE, create two separate service IDs (one per runtime)
-
Find your project ID: In your GitLab repository, click the vertical dots menu (
⋮
) and select “Copy project ID” -
Identify authorized users: List the GitLab usernames (handles) who should have permission to release new versions
Submit your workload entry
Section titled “Submit your workload entry”-
Open the appropriate workload inventory file:
- AWS EKS:
config/runtimes/eks/workloads.yml
- GCP GKE:
config/runtimes/gke/workloads.yml
- AWS EKS:
-
Add your service entry following this format:
- runway_service_id: your-service-idproject_id: 12345678members:- username1- username2 -
Create a merge request and assign it to a Runway team member (see
CODEOWNERS
for the current list) -
Ensure the CI pipeline passes before requesting review
Step 2: Configure your service repository
Section titled “Step 2: Configure your service repository”After your workload inventory entry is merged, configure your service repository with the required Runway files.
Create the Runway directory structure
Section titled “Create the Runway directory structure”Create a .runway
directory in your repository root with a subdirectory matching your Runway service ID:
.runway/└── your-service-id/ ├── default-values.yaml └── eks-service.yaml # or gke-service.yaml
Define default Helm values
Section titled “Define default Helm values”Create .runway/${RUNWAY_SERVICE_ID}/default-values.yaml
to define your service’s Kubernetes resources. This configuration generates a provider-agnostic Helm chart.
apiVersion: runway/v1.0.0-betakind: RunwayKubernetesServicemetadata: name: example-servicespec: services: frontend: # Service component name image: "registry.gitlab.com/gitlab-com/gl-infra/platform/runway/example-service:{{ .AppVersion }}" command: ["/bin/frontend"] container_port: 8080
# Autoscaling configuration scalability: min_instances: 1 max_instances: 20 cpu_utilization: 70
# Prometheus metrics configuration observability: scrape_targets: - "localhost:8082"
# Resource requirements and limits resources: requests: cpu: "100m" memory: "128Mi" ephemeral-storage: "512Mi" limits: cpu: "200m" memory: "256Mi" ephemeral-storage: "1Gi"
# Health check configuration startup_probe: path: "/health?type=startup" timeout_seconds: 1 period_seconds: 10 failure_threshold: 10 liveness_probe: path: "/health?type=liveness" timeout_seconds: 1 period_seconds: 10 failure_threshold: 3
Note: The {{ .AppVersion }}
placeholder is automatically replaced with your service version during the build process.
Configure runtime-specific deployment
Section titled “Configure runtime-specific deployment”Create a deployment configuration file based on your target runtime:
For AWS EKS
Section titled “For AWS EKS”example-service-eks: serviceMixins: - "runway-eks.service-mixin" # Required for EKS deployments
metadata: labels: # Required for infrastructure services gitlab.com/department: eng-infra gitlab.com/department_group: eng-infra-scalability gitlab.com/owner_email_handle: fforster gitlab.com/product_category: scalability
For GCP GKE
Section titled “For GCP GKE”example-service-gke: serviceMixins: - "runway-gke.service-mixin" # Required for GKE deployments
metadata: labels: # Required for infrastructure services gitlab.com/department: eng-infra gitlab.com/department_group: eng-infra-scalability gitlab.com/owner_email_handle: fforster gitlab.com/product_category: scalability
Important: The serviceMixins
field is required to inject runtime-specific resources (such as Gateway
definitions) into your Helm chart.
The metadata labels are mandatory for infrastructure services—see the GitLab Infrastructure Standards for valid values.
Step 3: Configure CI/CD
Section titled “Step 3: Configure CI/CD”Add Runway to your .gitlab-ci.yml
file to enable automated deployments:
include: - project: 'gitlab-com/gl-infra/platform/runway/runwayctl' file: 'ci-tasks/service-project/helm-chart.yml' ref: v3.82.0 # Use the latest version from Runway releases inputs: runway_service_id: example-service-eks # Your Runway service ID runway_version: v3.82.0 # Must match the ref above runtime: eks # or 'gke'
Important:
- Check the Runway releases page for the latest version
- Both
ref
andrunway_version
must use the same version number - Consider setting up Renovate to automatically update Runway versions
How deployments work
Section titled “How deployments work”The CI configuration adds two types of jobs to your pipeline:
- Dry-run jobs (merge request pipelines): Validate your configuration without deploying
- Release jobs (tag pipelines): Deploy your service when a new semantic version tag is created
Your service deploys automatically when:
- A commit triggers a new semantic release (
feat
,fix
, orbreaking change
) - The semantic-release job creates a new version tag
- The tag pipeline runs and executes the release job
Maintenance commits (chore
, docs
, …) don’t trigger deployments by default.
Next steps
Section titled “Next steps”- Monitor your merge request and tag pipelines to verify successful deployment
- Review the GitLab Infrastructure Standards for metadata label requirements
- Set up Renovate for automatic Runway version updates
- Consult the Runway team in the
#g_runway
Slack channel for support
Appendix: Multi-runtime deployments
Section titled “Appendix: Multi-runtime deployments”To deploy your service to both EKS and GKE:
- Create two separate Runway service IDs (e.g.,
myservice-eks
andmyservice-gke
) - Add both IDs to their respective workload inventories
- Create separate configuration directories for each:
.runway/├── myservice-eks/│ ├── default-values.yaml│ └── eks-service.yaml└── myservice-gke/├── default-values.yaml└── gke-service.yaml
- Include
ci-tasks/service-project/helm-chart.yml
twice in your.gitlab-ci.yml
, once for each Runway Service ID