glab-cluster-agent-bootstrap - Man Page

Bootstrap a GitLab Agent for Kubernetes in a project.

Synopsis

glab cluster agent bootstrap agent-name [flags]

Description

Bootstrap a GitLab Agent for Kubernetes (agentk) in a project.

The first argument must be the name of the agent.

It requires the kubectl and flux commands to be accessible via $PATH.

This command consists of multiple idempotent steps:

  1. Register the agent with the project.
  2. Create a token for the agent.

    • 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.
    • If the agent has not reached the maximum amount of tokens, a new one is created.
  3. Push the Kubernetes Secret that contains the token to the cluster.
  4. Create Flux HelmRepository and HelmRelease resource.
  5. Commit and Push the created Flux Helm resources to the manifest path.
  6. Trigger Flux reconciliation of GitLab Agent HelmRelease.

Options

--flux-source-name="flux-system" Flux source name.

--flux-source-namespace="flux-system" Flux source namespace.

--flux-source-type="git" Source type of the flux-system, e.g. git, oci, helm, ...

--gitlab-agent-token-secret-name="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.

--helm-release-filepath="gitlab-agent-helm-release.yaml" Filepath within the GitLab Agent project to commit the Flux HelmRelease to.

--helm-release-name="gitlab-agent" Name of the Flux HelmRelease manifest.

--helm-release-namespace="flux-system" Namespace of the Flux HelmRelease manifest.

--helm-release-target-namespace="gitlab-agent" Namespace of the GitLab Agent deployment.

--helm-repository-filepath="gitlab-helm-repository.yaml" Filepath within the GitLab Agent project to commit the Flux HelmRepository to.

--helm-repository-name="gitlab" Name of the Flux HelmRepository manifest.

--helm-repository-namespace="flux-system" Namespace of the Flux HelmRepository manifest.

-b, --manifest-branch="" Branch to commit the Flux Manifests to. (default to the project default branch)

-p, --manifest-path="" Location of directory in Git repository for storing the GitLab Agent for Kubernetes Helm resources.

--no-reconcile[=false] Do not trigger Flux reconciliation for GitLab Agent for Kubernetes Flux resource.

Options Inherited from Parent Commands

--help[=false] Show help for this command.

-R, ā€‰--repo="" Select another repository. Can use either OWNER/REPO or GROUP/NAMESPACE/REPO
format. Also accepts full URL or Git URL.

Example

# 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
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

See Also

glab-cluster-agent(1)

Referenced By

glab-cluster-agent(1).

Oct 2024 Auto generated by spf13/cobra