.nh .TH "glab" "1" "Nov 2024" "Auto generated by spf13/cobra" "" .SH NAME .PP glab-cluster-agent-bootstrap - Bootstrap a GitLab Agent for Kubernetes in a project. .SH SYNOPSIS .PP \fBglab cluster agent bootstrap agent-name [flags]\fP .SH DESCRIPTION .PP Bootstrap a GitLab Agent for Kubernetes (agentk) in a project. .PP The first argument must be the name of the agent. .PP It requires the kubectl and flux commands to be accessible via $PATH. .PP This command consists of multiple idempotent steps: .RS .IP " 1." 5 Register the agent with the project. .IP " 2." 5 Configure the agent. .IP " 3." 5 Configure an environment with dashboard for the agent. .IP " 4." 5 Create a token for the agent. .RS .IP \(bu 2 If the agent has reached the maximum amount of tokens, the one that has not been used the longest is revoked and a new one is created. .IP \(bu 2 If the agent has not reached the maximum amount of tokens, a new one is created. .RE .IP " 5." 5 Push the Kubernetes Secret that contains the token to the cluster. .IP " 6." 5 Create Flux HelmRepository and HelmRelease resource. .IP " 7." 5 Commit and Push the created Flux Helm resources to the manifest path. .IP " 8." 5 Trigger Flux reconciliation of GitLab Agent HelmRelease. .RE .SH OPTIONS .PP \fB--create-environment\fP[=true] Create an Environment for the GitLab Agent. .PP \fB--environment-flux-resource-path\fP="helm.toolkit.fluxcd.io/v2beta1/namespaces//helmreleases/" Flux Resource Path of the Environment for the GitLab Agent. .PP \fB--environment-name\fP="/" Name of the Environment for the GitLab Agent. .PP \fB--environment-namespace\fP="" Kubernetes namespace of the Environment for the GitLab Agent. .PP \fB--flux-source-name\fP="flux-system" Flux source name. .PP \fB--flux-source-namespace\fP="flux-system" Flux source namespace. .PP \fB--flux-source-type\fP="git" Source type of the flux-system, e.g. git, oci, helm, ... .PP \fB--gitlab-agent-token-secret-name\fP="gitlab-agent-token" Name of the Secret where the token for the GitLab Agent is stored. The helm-release-target-namespace is implied for the namespace of the Secret. .PP \fB--helm-release-filepath\fP="gitlab-agent-helm-release.yaml" Filepath within the GitLab Agent project to commit the Flux HelmRelease to. .PP \fB--helm-release-name\fP="gitlab-agent" Name of the Flux HelmRelease manifest. .PP \fB--helm-release-namespace\fP="flux-system" Namespace of the Flux HelmRelease manifest. .PP \fB--helm-release-target-namespace\fP="gitlab-agent" Namespace of the GitLab Agent deployment. .PP \fB--helm-release-values\fP=[] Local path to values.yaml files .PP \fB--helm-release-values-from\fP=[] Kubernetes object reference that contains the values.yaml data key in the format '/\&', where kind must be one of: (Secret,ConfigMap) .PP \fB--helm-repository-filepath\fP="gitlab-helm-repository.yaml" Filepath within the GitLab Agent project to commit the Flux HelmRepository to. .PP \fB--helm-repository-name\fP="gitlab" Name of the Flux HelmRepository manifest. .PP \fB--helm-repository-namespace\fP="flux-system" Namespace of the Flux HelmRepository manifest. .PP \fB-b\fP, \fB--manifest-branch\fP="" Branch to commit the Flux Manifests to. (default to the project default branch) .PP \fB-p\fP, \fB--manifest-path\fP="" Location of directory in Git repository for storing the GitLab Agent for Kubernetes Helm resources. .PP \fB--no-reconcile\fP[=false] Do not trigger Flux reconciliation for GitLab Agent for Kubernetes Flux resource. .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB--help\fP[=false] Show help for this command. .PP \fB-R\fP, \fB--repo\fP="" Select another repository. Can use either \fBOWNER/REPO\fR or \fBGROUP/NAMESPACE/REPO\fR format. Also accepts full URL or Git URL. .SH EXAMPLE .EX # Bootstrap "my-agent" to root of Git project in CWD and trigger reconciliation glab cluster agent bootstrap my-agent # Bootstrap "my-agent" to "manifests/" of Git project in CWD and trigger reconciliation # This is especially useful when "flux bootstrap gitlab --path manifests/" was used. # Make sure that the "--path" from the "flux bootstrap gitlab" command matches # the "--manifest-path" of the "glab cluster agent bootstrap" command. glab cluster agent bootstrap my-agent --manifest-path manifests/ # Bootstrap "my-agent" to "manifests/" of Git project in CWD and do not manually trigger a reconilication glab cluster agent bootstrap my-agent --manifest-path manifests/ --no-reconcile # Bootstrap "my-agent" without configuring an environment glab cluster agent bootstrap my-agent --create-environment=false # Bootstrap "my-agent" and configure an environment with custom name and Kubernetes namespace glab cluster agent bootstrap my-agent --environment-name production --environment-namespace default # Bootstrap "my-agent" and pass additional GitLab Helm Chart values from a local file glab cluster agent bootstrap my-agent --helm-release-values values.yaml # Bootstrap "my-agent" and pass additional GitLab Helm Chart values from a Kubernetes ConfigMap glab cluster agent bootstrap my-agent --helm-release-values-from ConfigMap/agent-config .EE .SH SEE ALSO .PP \fBglab-cluster-agent(1)\fP