Environment setup
To set up for charts development, command line tools and a Kubernetes cluster are required.
Required developer tools
The minimum tools required for charts development are documented on the Required tools page.
You should use asdf
to install these tools.
This allows us to easily switch between versions, Helm 3.4 and 3.5 for example.
We provide a .tool-versions
file
that specifies these tools with their recommended versions. To install or update them:
-
Clone the charts repository and change directory:
git clone https://gitlab.com/gitlab-org/charts/gitlab.git charts-gitlab cd charts-gitlab/
-
Add each plugin repository. This only has to be done once:
asdf plugin add minikube asdf plugin add kubectl asdf plugin add helm asdf plugin add stern asdf plugin add vale
-
Install or update the tools:
asdf install
Additional developer tools
Developers working on charts also often use the following tools:
Tool name | Benefits | Example use case | Link(s) |
---|---|---|---|
asdf | Easily switch between versions of your favorite runtimes and CLI tools. | Switching between Helm 3.4 and Helm 3.5 binaries. | GitHub |
kubectx & kubens
| Manage and switch between Kubernetes contexts and namespaces. | Setting default namespace per selected cluster context. | GitHub |
k3s | Lightweight Kubernetes installation (<40MB). | Quick and reliable local chart testing. | Homepage |
k9s | Greatly reduced typing of kubectl commands. | Navigate and manage cluster resources quickly in a command line interface. | GitHub |
lens | Highly visual management and navigation of clusters. | Navigate and manage cluster resources quickly in a standalone desktop application. | Homepage |
stern | Easily follow logs from multiple pods. | See logs from a set of GitLab pods together. | GitHub |
dive | Explore container layers. | A tool for exploring a container image, layer contents, and discovering ways to shrink the size of your Docker/OCI image. | GitHub, GitLab Unfiltered |
container-diff | Explore container layers. | A tool for analyzing and comparing container images. | GitHub |
Kubernetes cluster
A cloud or local Kubernetes cluster may be used for development. For simple issues, a local cluster is often enough to test deployments. When dealing with networking, storage, or other complex issues, a cloud Kubernetes cluster allows you to more accurately recreate a production environment.
Local cluster
The following local cluster options are supported:
- minikube - Cluster in virtual machines
- KinD (Kubernetes in Docker) - Cluster in Docker containers
Cloud cluster
The following cloud cluster options are supported:
Installing from repository
Details on installing the chart from the Git repository can be found in the developer deployment documentation.
Developer license
A developer license can be used for chart development to test features that are only functional in a licensed environment.
To use a developer license follow the instructions for Enterprise licenses and connect your instance to the Staging Customers Portal.
global:
extraEnv:
GITLAB_LICENSE_MODE: test
CUSTOMER_PORTAL_URL: https://customers.staging.gitlab.com