mirror of https://github.com/fluxcd/flux2.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
3.7 KiB
Markdown
79 lines
3.7 KiB
Markdown
4 years ago
|
## flux bootstrap gitlab
|
||
5 years ago
|
|
||
5 years ago
|
Bootstrap toolkit components in a GitLab repository
|
||
5 years ago
|
|
||
|
### Synopsis
|
||
|
|
||
5 years ago
|
The bootstrap gitlab command creates the GitLab repository if it doesn't exists and
|
||
5 years ago
|
commits the toolkit components manifests to the master branch.
|
||
5 years ago
|
Then it configures the target cluster to synchronize with the repository.
|
||
5 years ago
|
If the toolkit components are present on the cluster,
|
||
|
the bootstrap command will perform an upgrade if needed.
|
||
|
|
||
|
```
|
||
4 years ago
|
flux bootstrap gitlab [flags]
|
||
5 years ago
|
```
|
||
|
|
||
|
### Examples
|
||
|
|
||
|
```
|
||
|
# Create a GitLab API token and export it as an env var
|
||
|
export GITLAB_TOKEN=<my-token>
|
||
|
|
||
4 years ago
|
# Run bootstrap for a private repo using HTTPS token authentication
|
||
4 years ago
|
flux bootstrap gitlab --owner=<group> --repository=<repo name>
|
||
5 years ago
|
|
||
4 years ago
|
# Run bootstrap for a private repo using SSH authentication
|
||
4 years ago
|
flux bootstrap gitlab --owner=<group> --repository=<repo name> --ssh-hostname=gitlab.com
|
||
4 years ago
|
|
||
5 years ago
|
# Run bootstrap for a repository path
|
||
4 years ago
|
flux bootstrap gitlab --owner=<group> --repository=<repo name> --path=dev-cluster
|
||
5 years ago
|
|
||
|
# Run bootstrap for a public repository on a personal account
|
||
4 years ago
|
flux bootstrap gitlab --owner=<user> --repository=<repo name> --private=false --personal=true
|
||
5 years ago
|
|
||
5 years ago
|
# Run bootstrap for a private repo hosted on a GitLab server
|
||
4 years ago
|
flux bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain>
|
||
5 years ago
|
|
||
4 years ago
|
# Run bootstrap for a an existing repository with a branch named main
|
||
4 years ago
|
flux bootstrap gitlab --owner=<organization> --repository=<repo name> --branch=main
|
||
4 years ago
|
|
||
5 years ago
|
```
|
||
|
|
||
|
### Options
|
||
|
|
||
|
```
|
||
4 years ago
|
-h, --help help for gitlab
|
||
|
--hostname string GitLab hostname (default "gitlab.com")
|
||
|
--interval duration sync interval (default 1m0s)
|
||
|
--owner string GitLab user or group name
|
||
|
--path string repository path, when specified the cluster sync will be scoped to this path
|
||
|
--personal is personal repository
|
||
|
--private is private repository (default true)
|
||
|
--repository string GitLab repository name
|
||
4 years ago
|
--ssh-hostname string GitLab SSH hostname, when specified a deploy key will be added to the repository
|
||
5 years ago
|
```
|
||
|
|
||
|
### Options inherited from parent commands
|
||
|
|
||
|
```
|
||
4 years ago
|
--arch arch cluster architecture, available options are: (amd64, arm, arm64) (default amd64)
|
||
4 years ago
|
--branch string default branch (for GitHub this must match the default branch setting for the organization) (default "main")
|
||
5 years ago
|
--components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller])
|
||
|
--image-pull-secret string Kubernetes secret name used for pulling the toolkit images from a private registry
|
||
|
--kubeconfig string path to the kubeconfig file (default "~/.kube/config")
|
||
4 years ago
|
--log-level logLevel log level, available options are: (debug, info, error) (default info)
|
||
4 years ago
|
-n, --namespace string the namespace scope for this operation (default "flux-system")
|
||
4 years ago
|
--network-policy deny ingress access to the toolkit controllers from other namespaces using network policies (default true)
|
||
4 years ago
|
--registry string container registry where the toolkit images are published (default "ghcr.io/fluxcd")
|
||
5 years ago
|
--timeout duration timeout for this operation (default 5m0s)
|
||
|
--verbose print generated objects
|
||
|
-v, --version string toolkit version (default "latest")
|
||
4 years ago
|
--watch-all-namespaces watch for custom resources in all namespaces, if set to false it will only watch the namespace where the toolkit is installed (default true)
|
||
5 years ago
|
```
|
||
|
|
||
|
### SEE ALSO
|
||
|
|
||
4 years ago
|
* [flux bootstrap](flux_bootstrap.md) - Bootstrap toolkit components
|
||
5 years ago
|
|