mirror of
https://github.com/fluxcd/flux2.git
synced 2025-10-29 15:28:04 +08:00
Rename gotk binary to flux
Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
22
.github/workflows/bootstrap.yaml
vendored
22
.github/workflows/bootstrap.yaml
vendored
@ -28,43 +28,43 @@ jobs:
|
|||||||
id: vars
|
id: vars
|
||||||
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||||
- name: Build
|
- name: Build
|
||||||
run: sudo go build -o ./bin/gotk ./cmd/gotk
|
run: sudo go build -o ./bin/flux ./cmd/flux
|
||||||
- name: bootstrap init
|
- name: bootstrap init
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk bootstrap github --manifests ./manifests/install/ \
|
./bin/flux bootstrap github --manifests ./manifests/install/ \
|
||||||
--owner=fluxcd-testing \
|
--owner=fluxcd-testing \
|
||||||
--repository=gotk-test-${{ steps.vars.outputs.sha_short }} \
|
--repository=flux-test-${{ steps.vars.outputs.sha_short }} \
|
||||||
--branch=main \
|
--branch=main \
|
||||||
--path=test-cluster
|
--path=test-cluster
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITPROVIDER_BOT_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITPROVIDER_BOT_TOKEN }}
|
||||||
- name: bootstrap no-op
|
- name: bootstrap no-op
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk bootstrap github --manifests ./manifests/install/ \
|
./bin/flux bootstrap github --manifests ./manifests/install/ \
|
||||||
--owner=fluxcd-testing \
|
--owner=fluxcd-testing \
|
||||||
--repository=gotk-test-${{ steps.vars.outputs.sha_short }} \
|
--repository=flux-test-${{ steps.vars.outputs.sha_short }} \
|
||||||
--branch=main \
|
--branch=main \
|
||||||
--path=test-cluster
|
--path=test-cluster
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITPROVIDER_BOT_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITPROVIDER_BOT_TOKEN }}
|
||||||
- name: uninstall
|
- name: uninstall
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk suspend kustomization flux-system
|
./bin/flux suspend kustomization flux-system
|
||||||
./bin/gotk uninstall --resources --crds -s
|
./bin/flux uninstall --resources --crds -s
|
||||||
- name: bootstrap reinstall
|
- name: bootstrap reinstall
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk bootstrap github --manifests ./manifests/install/ \
|
./bin/flux bootstrap github --manifests ./manifests/install/ \
|
||||||
--owner=fluxcd-testing \
|
--owner=fluxcd-testing \
|
||||||
--repository=gotk-test-${{ steps.vars.outputs.sha_short }} \
|
--repository=flux-test-${{ steps.vars.outputs.sha_short }} \
|
||||||
--branch=main \
|
--branch=main \
|
||||||
--path=test-cluster
|
--path=test-cluster
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITPROVIDER_BOT_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITPROVIDER_BOT_TOKEN }}
|
||||||
- name: delete repository
|
- name: delete repository
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk bootstrap github --manifests ./manifests/install/ \
|
./bin/flux bootstrap github --manifests ./manifests/install/ \
|
||||||
--owner=fluxcd-testing \
|
--owner=fluxcd-testing \
|
||||||
--repository=gotk-test-${{ steps.vars.outputs.sha_short }} \
|
--repository=flux-test-${{ steps.vars.outputs.sha_short }} \
|
||||||
--branch=main \
|
--branch=main \
|
||||||
--path=test-cluster \
|
--path=test-cluster \
|
||||||
--delete
|
--delete
|
||||||
|
|||||||
2
.github/workflows/docs.yaml
vendored
2
.github/workflows/docs.yaml
vendored
@ -56,7 +56,7 @@ jobs:
|
|||||||
|
|
||||||
{
|
{
|
||||||
# install script
|
# install script
|
||||||
cp install/gotk.sh docs/install.sh
|
cp install/flux.sh docs/install.sh
|
||||||
}
|
}
|
||||||
- name: Deploy docs
|
- name: Deploy docs
|
||||||
uses: mhausenblas/mkdocs-deploy-gh-pages@master
|
uses: mhausenblas/mkdocs-deploy-gh-pages@master
|
||||||
|
|||||||
114
.github/workflows/e2e.yaml
vendored
114
.github/workflows/e2e.yaml
vendored
@ -37,34 +37,34 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- name: Build
|
- name: Build
|
||||||
run: sudo go build -o ./bin/gotk ./cmd/gotk
|
run: sudo go build -o ./bin/flux ./cmd/flux
|
||||||
- name: gotk check --pre
|
- name: flux check --pre
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk check --pre
|
./bin/flux check --pre
|
||||||
- name: gotk install --manifests
|
- name: flux install --manifests
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk install --manifests ./manifests/install/
|
./bin/flux install --manifests ./manifests/install/
|
||||||
- name: gotk create source git
|
- name: flux create source git
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk create source git podinfo \
|
./bin/flux create source git podinfo \
|
||||||
--url https://github.com/stefanprodan/podinfo \
|
--url https://github.com/stefanprodan/podinfo \
|
||||||
--tag-semver=">=3.2.3"
|
--tag-semver=">=3.2.3"
|
||||||
- name: gotk create source git export apply
|
- name: flux create source git export apply
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk create source git podinfo-export \
|
./bin/flux create source git podinfo-export \
|
||||||
--url https://github.com/stefanprodan/podinfo \
|
--url https://github.com/stefanprodan/podinfo \
|
||||||
--tag-semver=">=3.2.3" \
|
--tag-semver=">=3.2.3" \
|
||||||
--export | kubectl apply -f -
|
--export | kubectl apply -f -
|
||||||
./bin/gotk delete source git podinfo-export --silent
|
./bin/flux delete source git podinfo-export --silent
|
||||||
- name: gotk get sources git
|
- name: flux get sources git
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk get sources git
|
./bin/flux get sources git
|
||||||
- name: gotk get sources git --all-namespaces
|
- name: flux get sources git --all-namespaces
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk get sources git --all-namespaces
|
./bin/flux get sources git --all-namespaces
|
||||||
- name: gotk create kustomization
|
- name: flux create kustomization
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk create kustomization podinfo \
|
./bin/flux create kustomization podinfo \
|
||||||
--source=podinfo \
|
--source=podinfo \
|
||||||
--path="./deploy/overlays/dev" \
|
--path="./deploy/overlays/dev" \
|
||||||
--prune=true \
|
--prune=true \
|
||||||
@ -73,75 +73,75 @@ jobs:
|
|||||||
--health-check="Deployment/frontend.dev" \
|
--health-check="Deployment/frontend.dev" \
|
||||||
--health-check="Deployment/backend.dev" \
|
--health-check="Deployment/backend.dev" \
|
||||||
--health-check-timeout=3m
|
--health-check-timeout=3m
|
||||||
- name: gotk reconcile kustomization --with-source
|
- name: flux reconcile kustomization --with-source
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk reconcile kustomization podinfo --with-source
|
./bin/flux reconcile kustomization podinfo --with-source
|
||||||
- name: gotk get kustomizations
|
- name: flux get kustomizations
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk get kustomizations
|
./bin/flux get kustomizations
|
||||||
- name: gotk get kustomizations --all-namespaces
|
- name: flux get kustomizations --all-namespaces
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk get kustomizations --all-namespaces
|
./bin/flux get kustomizations --all-namespaces
|
||||||
- name: gotk suspend kustomization
|
- name: flux suspend kustomization
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk suspend kustomization podinfo
|
./bin/flux suspend kustomization podinfo
|
||||||
- name: gotk resume kustomization
|
- name: flux resume kustomization
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk resume kustomization podinfo
|
./bin/flux resume kustomization podinfo
|
||||||
- name: gotk export
|
- name: flux export
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk export source git --all
|
./bin/flux export source git --all
|
||||||
./bin/gotk export kustomization --all
|
./bin/flux export kustomization --all
|
||||||
- name: gotk delete kustomization
|
- name: flux delete kustomization
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk delete kustomization podinfo --silent
|
./bin/flux delete kustomization podinfo --silent
|
||||||
- name: gotk create source helm
|
- name: flux create source helm
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk create source helm podinfo \
|
./bin/flux create source helm podinfo \
|
||||||
--url https://stefanprodan.github.io/podinfo
|
--url https://stefanprodan.github.io/podinfo
|
||||||
- name: gotk create helmrelease --source=HelmRepository/podinfo
|
- name: flux create helmrelease --source=HelmRepository/podinfo
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk create hr podinfo-helm \
|
./bin/flux create hr podinfo-helm \
|
||||||
--target-namespace=default \
|
--target-namespace=default \
|
||||||
--source=HelmRepository/podinfo \
|
--source=HelmRepository/podinfo \
|
||||||
--chart=podinfo \
|
--chart=podinfo \
|
||||||
--chart-version=">4.0.0 <5.0.0"
|
--chart-version=">4.0.0 <5.0.0"
|
||||||
- name: gotk create helmrelease --source=GitRepository/podinfo
|
- name: flux create helmrelease --source=GitRepository/podinfo
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk create hr podinfo-git \
|
./bin/flux create hr podinfo-git \
|
||||||
--target-namespace=default \
|
--target-namespace=default \
|
||||||
--source=GitRepository/podinfo \
|
--source=GitRepository/podinfo \
|
||||||
--chart=./charts/podinfo
|
--chart=./charts/podinfo
|
||||||
- name: gotk reconcile helmrelease --with-source
|
- name: flux reconcile helmrelease --with-source
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk reconcile helmrelease podinfo-git --with-source
|
./bin/flux reconcile helmrelease podinfo-git --with-source
|
||||||
- name: gotk get helmreleases
|
- name: flux get helmreleases
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk get helmreleases
|
./bin/flux get helmreleases
|
||||||
- name: gotk get helmreleases --all-namespaces
|
- name: flux get helmreleases --all-namespaces
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk get helmreleases --all-namespaces
|
./bin/flux get helmreleases --all-namespaces
|
||||||
- name: gotk export helmrelease
|
- name: flux export helmrelease
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk export hr --all
|
./bin/flux export hr --all
|
||||||
- name: gotk delete helmrelease podinfo-helm
|
- name: flux delete helmrelease podinfo-helm
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk delete hr podinfo-helm --silent
|
./bin/flux delete hr podinfo-helm --silent
|
||||||
- name: gotk delete helmrelease podinfo-git
|
- name: flux delete helmrelease podinfo-git
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk delete hr podinfo-git --silent
|
./bin/flux delete hr podinfo-git --silent
|
||||||
- name: gotk delete source helm
|
- name: flux delete source helm
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk delete source helm podinfo --silent
|
./bin/flux delete source helm podinfo --silent
|
||||||
- name: gotk delete source git
|
- name: flux delete source git
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk delete source git podinfo --silent
|
./bin/flux delete source git podinfo --silent
|
||||||
- name: gotk check
|
- name: flux check
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk check
|
./bin/flux check
|
||||||
- name: gotk uninstall
|
- name: flux uninstall
|
||||||
run: |
|
run: |
|
||||||
./bin/gotk uninstall --crds --silent
|
./bin/flux uninstall --crds --silent
|
||||||
- name: Debug failure
|
- name: Debug failure
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
builds:
|
builds:
|
||||||
- <<: &build_defaults
|
- <<: &build_defaults
|
||||||
binary: gotk
|
binary: flux
|
||||||
main: ./cmd/gotk
|
main: ./cmd/flux
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X main.VERSION={{ .Version }}
|
- -s -w -X main.VERSION={{ .Version }}
|
||||||
env:
|
env:
|
||||||
@ -37,16 +37,16 @@ archives:
|
|||||||
files:
|
files:
|
||||||
- none*
|
- none*
|
||||||
brews:
|
brews:
|
||||||
- name: gotk
|
- name: flux
|
||||||
tap:
|
tap:
|
||||||
owner: fluxcd
|
owner: fluxcd
|
||||||
name: homebrew-tap
|
name: homebrew-tap
|
||||||
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
|
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
|
||||||
folder: Formula
|
folder: Formula
|
||||||
homepage: "https://toolkit.fluxcd.io/"
|
homepage: "https://toolkit.fluxcd.io/"
|
||||||
description: "GitOps Toolkit CLI"
|
description: "Flux CLI"
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: kubectl
|
- name: kubectl
|
||||||
type: optional
|
type: optional
|
||||||
test: |
|
test: |
|
||||||
system "#{bin}/gotk --version"
|
system "#{bin}/flux --version"
|
||||||
|
|||||||
10
Makefile
10
Makefile
@ -1,4 +1,4 @@
|
|||||||
VERSION?=$(shell grep 'VERSION' cmd/gotk/main.go | awk '{ print $$4 }' | tr -d '"')
|
VERSION?=$(shell grep 'VERSION' cmd/flux/main.go | awk '{ print $$4 }' | tr -d '"')
|
||||||
|
|
||||||
all: test build
|
all: test build
|
||||||
|
|
||||||
@ -15,14 +15,14 @@ test: tidy fmt vet docs
|
|||||||
go test ./... -coverprofile cover.out
|
go test ./... -coverprofile cover.out
|
||||||
|
|
||||||
build:
|
build:
|
||||||
CGO_ENABLED=0 go build -o ./bin/gotk ./cmd/gotk
|
CGO_ENABLED=0 go build -o ./bin/flux ./cmd/flux
|
||||||
|
|
||||||
install:
|
install:
|
||||||
go install cmd/gotk
|
go install cmd/flux
|
||||||
|
|
||||||
.PHONY: docs
|
.PHONY: docs
|
||||||
docs:
|
docs:
|
||||||
mkdir -p ./docs/cmd && go run ./cmd/gotk/ docgen
|
mkdir -p ./docs/cmd && go run ./cmd/flux/ docgen
|
||||||
|
|
||||||
install-dev:
|
install-dev:
|
||||||
CGO_ENABLED=0 go build -o /usr/local/bin ./cmd/gotk
|
CGO_ENABLED=0 go build -o /usr/local/bin ./cmd/flux
|
||||||
|
|||||||
10
README.md
10
README.md
@ -20,13 +20,13 @@ Flux v2 is constructed with the [GitOps Toolkit](#gitops-toolkit), a
|
|||||||
set of composable APIs and specialized tools for building Continuous
|
set of composable APIs and specialized tools for building Continuous
|
||||||
Delivery on top of Kubernetes.
|
Delivery on top of Kubernetes.
|
||||||
|
|
||||||
## `gotk` installation
|
## `flux` installation
|
||||||
|
|
||||||
With Homebrew:
|
With Homebrew:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
brew tap fluxcd/tap
|
brew tap fluxcd/tap
|
||||||
brew install gotk
|
brew install flux
|
||||||
```
|
```
|
||||||
|
|
||||||
With Bash:
|
With Bash:
|
||||||
@ -35,7 +35,7 @@ With Bash:
|
|||||||
curl -s https://toolkit.fluxcd.io/install.sh | sudo bash
|
curl -s https://toolkit.fluxcd.io/install.sh | sudo bash
|
||||||
|
|
||||||
# enable completions in ~/.bash_profile
|
# enable completions in ~/.bash_profile
|
||||||
. <(gotk completion bash)
|
. <(flux completion bash)
|
||||||
```
|
```
|
||||||
|
|
||||||
Binaries for macOS, Windows and Linux AMD64/ARM are available to download on the
|
Binaries for macOS, Windows and Linux AMD64/ARM are available to download on the
|
||||||
@ -44,7 +44,7 @@ Binaries for macOS, Windows and Linux AMD64/ARM are available to download on the
|
|||||||
Verify that your cluster satisfies the prerequisites with:
|
Verify that your cluster satisfies the prerequisites with:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
gotk check --pre
|
flux check --pre
|
||||||
```
|
```
|
||||||
|
|
||||||
## Get started
|
## Get started
|
||||||
@ -72,7 +72,7 @@ guides](https://toolkit.fluxcd.io/dev-guides/).
|
|||||||
|
|
||||||
### Components
|
### Components
|
||||||
|
|
||||||
- [Toolkit CLI](https://toolkit.fluxcd.io/cmd/gotk/)
|
- [Toolkit CLI](https://toolkit.fluxcd.io/cmd/flux/)
|
||||||
- [Source Controller](https://toolkit.fluxcd.io/components/source/controller/)
|
- [Source Controller](https://toolkit.fluxcd.io/components/source/controller/)
|
||||||
- [GitRepository CRD](https://toolkit.fluxcd.io/components/source/gitrepositories/)
|
- [GitRepository CRD](https://toolkit.fluxcd.io/components/source/gitrepositories/)
|
||||||
- [HelmRepository CRD](https://toolkit.fluxcd.io/components/source/helmrepositories/)
|
- [HelmRepository CRD](https://toolkit.fluxcd.io/components/source/helmrepositories/)
|
||||||
|
|||||||
@ -43,22 +43,22 @@ the bootstrap command will perform an upgrade if needed.`,
|
|||||||
export GITHUB_TOKEN=<my-token>
|
export GITHUB_TOKEN=<my-token>
|
||||||
|
|
||||||
# Run bootstrap for a private repo owned by a GitHub organization
|
# Run bootstrap for a private repo owned by a GitHub organization
|
||||||
gotk bootstrap github --owner=<organization> --repository=<repo name>
|
flux bootstrap github --owner=<organization> --repository=<repo name>
|
||||||
|
|
||||||
# Run bootstrap for a private repo and assign organization teams to it
|
# Run bootstrap for a private repo and assign organization teams to it
|
||||||
gotk bootstrap github --owner=<organization> --repository=<repo name> --team=<team1 slug> --team=<team2 slug>
|
flux bootstrap github --owner=<organization> --repository=<repo name> --team=<team1 slug> --team=<team2 slug>
|
||||||
|
|
||||||
# Run bootstrap for a repository path
|
# Run bootstrap for a repository path
|
||||||
gotk bootstrap github --owner=<organization> --repository=<repo name> --path=dev-cluster
|
flux bootstrap github --owner=<organization> --repository=<repo name> --path=dev-cluster
|
||||||
|
|
||||||
# Run bootstrap for a public repository on a personal account
|
# Run bootstrap for a public repository on a personal account
|
||||||
gotk bootstrap github --owner=<user> --repository=<repo name> --private=false --personal=true
|
flux bootstrap github --owner=<user> --repository=<repo name> --private=false --personal=true
|
||||||
|
|
||||||
# Run bootstrap for a private repo hosted on GitHub Enterprise
|
# Run bootstrap for a private repo hosted on GitHub Enterprise
|
||||||
gotk bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain>
|
flux bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain>
|
||||||
|
|
||||||
# Run bootstrap for a an existing repository with a branch named main
|
# Run bootstrap for a an existing repository with a branch named main
|
||||||
gotk bootstrap github --owner=<organization> --repository=<repo name> --branch=main
|
flux bootstrap github --owner=<organization> --repository=<repo name> --branch=main
|
||||||
`,
|
`,
|
||||||
RunE: bootstrapGitHubCmdRun,
|
RunE: bootstrapGitHubCmdRun,
|
||||||
}
|
}
|
||||||
@ -105,7 +105,7 @@ func bootstrapGitHubCmdRun(cmd *cobra.Command, args []string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
repository, err := git.NewRepository(ghRepository, ghOwner, ghHostname, ghToken, "gotk", ghOwner+"@users.noreply.github.com")
|
repository, err := git.NewRepository(ghRepository, ghOwner, ghHostname, ghToken, "flux", ghOwner+"@users.noreply.github.com")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -214,9 +214,9 @@ func bootstrapGitHubCmdRun(cmd *cobra.Command, args []string) error {
|
|||||||
return fmt.Errorf("generating deploy key failed: %w", err)
|
return fmt.Errorf("generating deploy key failed: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
keyName := "gotk"
|
keyName := "flux"
|
||||||
if ghPath != "" {
|
if ghPath != "" {
|
||||||
keyName = fmt.Sprintf("gotk-%s", ghPath)
|
keyName = fmt.Sprintf("flux-%s", ghPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
if changed, err := provider.AddDeployKey(ctx, repository, key, keyName); err != nil {
|
if changed, err := provider.AddDeployKey(ctx, repository, key, keyName); err != nil {
|
||||||
@ -45,22 +45,22 @@ the bootstrap command will perform an upgrade if needed.`,
|
|||||||
export GITLAB_TOKEN=<my-token>
|
export GITLAB_TOKEN=<my-token>
|
||||||
|
|
||||||
# Run bootstrap for a private repo using HTTPS token authentication
|
# Run bootstrap for a private repo using HTTPS token authentication
|
||||||
gotk bootstrap gitlab --owner=<group> --repository=<repo name>
|
flux bootstrap gitlab --owner=<group> --repository=<repo name>
|
||||||
|
|
||||||
# Run bootstrap for a private repo using SSH authentication
|
# Run bootstrap for a private repo using SSH authentication
|
||||||
gotk bootstrap gitlab --owner=<group> --repository=<repo name> --ssh-hostname=gitlab.com
|
flux bootstrap gitlab --owner=<group> --repository=<repo name> --ssh-hostname=gitlab.com
|
||||||
|
|
||||||
# Run bootstrap for a repository path
|
# Run bootstrap for a repository path
|
||||||
gotk bootstrap gitlab --owner=<group> --repository=<repo name> --path=dev-cluster
|
flux bootstrap gitlab --owner=<group> --repository=<repo name> --path=dev-cluster
|
||||||
|
|
||||||
# Run bootstrap for a public repository on a personal account
|
# Run bootstrap for a public repository on a personal account
|
||||||
gotk bootstrap gitlab --owner=<user> --repository=<repo name> --private=false --personal=true
|
flux bootstrap gitlab --owner=<user> --repository=<repo name> --private=false --personal=true
|
||||||
|
|
||||||
# Run bootstrap for a private repo hosted on a GitLab server
|
# Run bootstrap for a private repo hosted on a GitLab server
|
||||||
gotk bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain>
|
flux bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain>
|
||||||
|
|
||||||
# Run bootstrap for a an existing repository with a branch named main
|
# Run bootstrap for a an existing repository with a branch named main
|
||||||
gotk bootstrap gitlab --owner=<organization> --repository=<repo name> --branch=main
|
flux bootstrap gitlab --owner=<organization> --repository=<repo name> --branch=main
|
||||||
`,
|
`,
|
||||||
RunE: bootstrapGitLabCmdRun,
|
RunE: bootstrapGitLabCmdRun,
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ func bootstrapGitLabCmdRun(cmd *cobra.Command, args []string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
repository, err := git.NewRepository(glRepository, glOwner, glHostname, glToken, "gotk", glOwner+"@users.noreply.gitlab.com")
|
repository, err := git.NewRepository(glRepository, glOwner, glHostname, glToken, "flux", glOwner+"@users.noreply.gitlab.com")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -195,9 +195,9 @@ func bootstrapGitLabCmdRun(cmd *cobra.Command, args []string) error {
|
|||||||
return fmt.Errorf("generating deploy key failed: %w", err)
|
return fmt.Errorf("generating deploy key failed: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
keyName := "gotk"
|
keyName := "flux"
|
||||||
if glPath != "" {
|
if glPath != "" {
|
||||||
keyName = fmt.Sprintf("gotk-%s", glPath)
|
keyName = fmt.Sprintf("flux-%s", glPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
if changed, err := provider.AddDeployKey(ctx, repository, key, keyName); err != nil {
|
if changed, err := provider.AddDeployKey(ctx, repository, key, keyName); err != nil {
|
||||||
@ -37,10 +37,10 @@ var checkCmd = &cobra.Command{
|
|||||||
Long: `The check command will perform a series of checks to validate that
|
Long: `The check command will perform a series of checks to validate that
|
||||||
the local environment is configured correctly and if the installed components are healthy.`,
|
the local environment is configured correctly and if the installed components are healthy.`,
|
||||||
Example: ` # Run pre-installation checks
|
Example: ` # Run pre-installation checks
|
||||||
gotk check --pre
|
flux check --pre
|
||||||
|
|
||||||
# Run installation checks
|
# Run installation checks
|
||||||
gotk check
|
flux check
|
||||||
`,
|
`,
|
||||||
RunE: runCheckCmd,
|
RunE: runCheckCmd,
|
||||||
}
|
}
|
||||||
@ -27,12 +27,12 @@ var completionBashCmd = &cobra.Command{
|
|||||||
Short: "Generates bash completion scripts",
|
Short: "Generates bash completion scripts",
|
||||||
Example: `To load completion run
|
Example: `To load completion run
|
||||||
|
|
||||||
. <(gotk completion bash)
|
. <(flux completion bash)
|
||||||
|
|
||||||
To configure your bash shell to load completions for each session add to your bashrc
|
To configure your bash shell to load completions for each session add to your bashrc
|
||||||
|
|
||||||
# ~/.bashrc or ~/.profile
|
# ~/.bashrc or ~/.profile
|
||||||
command -v gotk >/dev/null && . <(gotk completion bash)
|
command -v flux >/dev/null && . <(flux completion bash)
|
||||||
`,
|
`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
rootCmd.GenBashCompletion(os.Stdout)
|
rootCmd.GenBashCompletion(os.Stdout)
|
||||||
@ -27,11 +27,11 @@ var completionFishCmd = &cobra.Command{
|
|||||||
Short: "Generates fish completion scripts",
|
Short: "Generates fish completion scripts",
|
||||||
Example: `To load completion run
|
Example: `To load completion run
|
||||||
|
|
||||||
. <(gotk completion fish)
|
. <(flux completion fish)
|
||||||
|
|
||||||
To configure your fish shell to load completions for each session write this script to your completions dir:
|
To configure your fish shell to load completions for each session write this script to your completions dir:
|
||||||
|
|
||||||
gotk completion fish > ~/.config/fish/completions/gotk
|
flux completion fish > ~/.config/fish/completions/flux
|
||||||
|
|
||||||
See http://fishshell.com/docs/current/index.html#completion-own for more details
|
See http://fishshell.com/docs/current/index.html#completion-own for more details
|
||||||
`,
|
`,
|
||||||
@ -27,19 +27,19 @@ var completionPowerShellCmd = &cobra.Command{
|
|||||||
Short: "Generates powershell completion scripts",
|
Short: "Generates powershell completion scripts",
|
||||||
Example: `To load completion run
|
Example: `To load completion run
|
||||||
|
|
||||||
. <(gotk completion powershell)
|
. <(flux completion powershell)
|
||||||
|
|
||||||
To configure your powershell shell to load completions for each session add to your powershell profile
|
To configure your powershell shell to load completions for each session add to your powershell profile
|
||||||
|
|
||||||
Windows:
|
Windows:
|
||||||
|
|
||||||
cd "$env:USERPROFILE\Documents\WindowsPowerShell\Modules"
|
cd "$env:USERPROFILE\Documents\WindowsPowerShell\Modules"
|
||||||
gotk completion >> gotk-completion.ps1
|
flux completion >> flux-completion.ps1
|
||||||
|
|
||||||
Linux:
|
Linux:
|
||||||
|
|
||||||
cd "${XDG_CONFIG_HOME:-"$HOME/.config/"}/powershell/modules"
|
cd "${XDG_CONFIG_HOME:-"$HOME/.config/"}/powershell/modules"
|
||||||
gotk completion >> gotk-completions.ps1
|
flux completion >> flux-completions.ps1
|
||||||
`,
|
`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
rootCmd.GenPowerShellCompletion(os.Stdout)
|
rootCmd.GenPowerShellCompletion(os.Stdout)
|
||||||
@ -27,20 +27,20 @@ var completionZshCmd = &cobra.Command{
|
|||||||
Short: "Generates zsh completion scripts",
|
Short: "Generates zsh completion scripts",
|
||||||
Example: `To load completion run
|
Example: `To load completion run
|
||||||
|
|
||||||
. <(gotk completion zsh) && compdef _gotk gotk
|
. <(flux completion zsh) && compdef _flux flux
|
||||||
|
|
||||||
To configure your zsh shell to load completions for each session add to your zshrc
|
To configure your zsh shell to load completions for each session add to your zshrc
|
||||||
|
|
||||||
# ~/.zshrc or ~/.profile
|
# ~/.zshrc or ~/.profile
|
||||||
command -v gotk >/dev/null && . <(gotk completion zsh) && compdef _gotk gotk
|
command -v flux >/dev/null && . <(flux completion zsh) && compdef _flux flux
|
||||||
|
|
||||||
or write a cached file in one of the completion directories in your ${fpath}:
|
or write a cached file in one of the completion directories in your ${fpath}:
|
||||||
|
|
||||||
echo "${fpath// /\n}" | grep -i completion
|
echo "${fpath// /\n}" | grep -i completion
|
||||||
gotk completions zsh > _gotk
|
flux completions zsh > _flux
|
||||||
|
|
||||||
mv _gotk ~/.oh-my-zsh/completions # oh-my-zsh
|
mv _flux ~/.oh-my-zsh/completions # oh-my-zsh
|
||||||
mv _gotk ~/.zprezto/modules/completion/external/src/ # zprezto
|
mv _flux ~/.zprezto/modules/completion/external/src/ # zprezto
|
||||||
`,
|
`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
rootCmd.GenZshCompletion(os.Stdout)
|
rootCmd.GenZshCompletion(os.Stdout)
|
||||||
@ -39,7 +39,7 @@ var createAlertCmd = &cobra.Command{
|
|||||||
Short: "Create or update a Alert resource",
|
Short: "Create or update a Alert resource",
|
||||||
Long: "The create alert command generates a Alert resource.",
|
Long: "The create alert command generates a Alert resource.",
|
||||||
Example: ` # Create an Alert for kustomization events
|
Example: ` # Create an Alert for kustomization events
|
||||||
gotk create alert \
|
flux create alert \
|
||||||
--event-severity info \
|
--event-severity info \
|
||||||
--event-source Kustomization/flux-system \
|
--event-source Kustomization/flux-system \
|
||||||
--provider-ref slack \
|
--provider-ref slack \
|
||||||
@ -38,14 +38,14 @@ var createAlertProviderCmd = &cobra.Command{
|
|||||||
Short: "Create or update a Provider resource",
|
Short: "Create or update a Provider resource",
|
||||||
Long: "The create alert-provider command generates a Provider resource.",
|
Long: "The create alert-provider command generates a Provider resource.",
|
||||||
Example: ` # Create a Provider for a Slack channel
|
Example: ` # Create a Provider for a Slack channel
|
||||||
gotk create alert-provider slack \
|
flux create alert-provider slack \
|
||||||
--type slack \
|
--type slack \
|
||||||
--channel general \
|
--channel general \
|
||||||
--address https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
|
--address https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
|
||||||
--secret-ref webhook-url
|
--secret-ref webhook-url
|
||||||
|
|
||||||
# Create a Provider for a Github repository
|
# Create a Provider for a Github repository
|
||||||
gotk create alert-provider github-podinfo \
|
flux create alert-provider github-podinfo \
|
||||||
--type github \
|
--type github \
|
||||||
--address https://github.com/stefanprodan/podinfo \
|
--address https://github.com/stefanprodan/podinfo \
|
||||||
--secret-ref github-token
|
--secret-ref github-token
|
||||||
@ -43,44 +43,44 @@ var createHelmReleaseCmd = &cobra.Command{
|
|||||||
Short: "Create or update a HelmRelease resource",
|
Short: "Create or update a HelmRelease resource",
|
||||||
Long: "The helmrelease create command generates a HelmRelease resource for a given HelmRepository source.",
|
Long: "The helmrelease create command generates a HelmRelease resource for a given HelmRepository source.",
|
||||||
Example: ` # Create a HelmRelease with a chart from a HelmRepository source
|
Example: ` # Create a HelmRelease with a chart from a HelmRepository source
|
||||||
gotk create hr podinfo \
|
flux create hr podinfo \
|
||||||
--interval=10m \
|
--interval=10m \
|
||||||
--source=HelmRepository/podinfo \
|
--source=HelmRepository/podinfo \
|
||||||
--chart=podinfo \
|
--chart=podinfo \
|
||||||
--chart-version=">4.0.0"
|
--chart-version=">4.0.0"
|
||||||
|
|
||||||
# Create a HelmRelease with a chart from a GitRepository source
|
# Create a HelmRelease with a chart from a GitRepository source
|
||||||
gotk create hr podinfo \
|
flux create hr podinfo \
|
||||||
--interval=10m \
|
--interval=10m \
|
||||||
--source=GitRepository/podinfo \
|
--source=GitRepository/podinfo \
|
||||||
--chart=./charts/podinfo
|
--chart=./charts/podinfo
|
||||||
|
|
||||||
# Create a HelmRelease with a chart from a Bucket source
|
# Create a HelmRelease with a chart from a Bucket source
|
||||||
gotk create hr podinfo \
|
flux create hr podinfo \
|
||||||
--interval=10m \
|
--interval=10m \
|
||||||
--source=Bucket/podinfo \
|
--source=Bucket/podinfo \
|
||||||
--chart=./charts/podinfo
|
--chart=./charts/podinfo
|
||||||
|
|
||||||
# Create a HelmRelease with values from a local YAML file
|
# Create a HelmRelease with values from a local YAML file
|
||||||
gotk create hr podinfo \
|
flux create hr podinfo \
|
||||||
--source=HelmRepository/podinfo \
|
--source=HelmRepository/podinfo \
|
||||||
--chart=podinfo \
|
--chart=podinfo \
|
||||||
--values=./my-values.yaml
|
--values=./my-values.yaml
|
||||||
|
|
||||||
# Create a HelmRelease with a custom release name
|
# Create a HelmRelease with a custom release name
|
||||||
gotk create hr podinfo \
|
flux create hr podinfo \
|
||||||
--release-name=podinfo-dev
|
--release-name=podinfo-dev
|
||||||
--source=HelmRepository/podinfo \
|
--source=HelmRepository/podinfo \
|
||||||
--chart=podinfo \
|
--chart=podinfo \
|
||||||
|
|
||||||
# Create a HelmRelease targeting another namespace than the resource
|
# Create a HelmRelease targeting another namespace than the resource
|
||||||
gotk create hr podinfo \
|
flux create hr podinfo \
|
||||||
--target-namespace=default \
|
--target-namespace=default \
|
||||||
--source=HelmRepository/podinfo \
|
--source=HelmRepository/podinfo \
|
||||||
--chart=podinfo
|
--chart=podinfo
|
||||||
|
|
||||||
# Create a HelmRelease definition on disk without applying it on the cluster
|
# Create a HelmRelease definition on disk without applying it on the cluster
|
||||||
gotk create hr podinfo \
|
flux create hr podinfo \
|
||||||
--source=HelmRepository/podinfo \
|
--source=HelmRepository/podinfo \
|
||||||
--chart=podinfo \
|
--chart=podinfo \
|
||||||
--values=./values.yaml \
|
--values=./values.yaml \
|
||||||
@ -43,7 +43,7 @@ var createKsCmd = &cobra.Command{
|
|||||||
Short: "Create or update a Kustomization resource",
|
Short: "Create or update a Kustomization resource",
|
||||||
Long: "The kustomization source create command generates a Kustomize resource for a given source.",
|
Long: "The kustomization source create command generates a Kustomize resource for a given source.",
|
||||||
Example: ` # Create a Kustomization resource from a source at a given path
|
Example: ` # Create a Kustomization resource from a source at a given path
|
||||||
gotk create kustomization contour \
|
flux create kustomization contour \
|
||||||
--source=contour \
|
--source=contour \
|
||||||
--path="./examples/contour/" \
|
--path="./examples/contour/" \
|
||||||
--prune=true \
|
--prune=true \
|
||||||
@ -54,7 +54,7 @@ var createKsCmd = &cobra.Command{
|
|||||||
--health-check-timeout=3m
|
--health-check-timeout=3m
|
||||||
|
|
||||||
# Create a Kustomization resource that depends on the previous one
|
# Create a Kustomization resource that depends on the previous one
|
||||||
gotk create kustomization webapp \
|
flux create kustomization webapp \
|
||||||
--depends-on=contour \
|
--depends-on=contour \
|
||||||
--source=webapp \
|
--source=webapp \
|
||||||
--path="./deploy/overlays/dev" \
|
--path="./deploy/overlays/dev" \
|
||||||
@ -63,7 +63,7 @@ var createKsCmd = &cobra.Command{
|
|||||||
--validation=client
|
--validation=client
|
||||||
|
|
||||||
# Create a Kustomization resource that references a Bucket
|
# Create a Kustomization resource that references a Bucket
|
||||||
gotk create kustomization secrets \
|
flux create kustomization secrets \
|
||||||
--source=Bucket/secrets \
|
--source=Bucket/secrets \
|
||||||
--prune=true \
|
--prune=true \
|
||||||
--interval=5m
|
--interval=5m
|
||||||
@ -38,7 +38,7 @@ var createReceiverCmd = &cobra.Command{
|
|||||||
Short: "Create or update a Receiver resource",
|
Short: "Create or update a Receiver resource",
|
||||||
Long: "The create receiver command generates a Receiver resource.",
|
Long: "The create receiver command generates a Receiver resource.",
|
||||||
Example: ` # Create a Receiver
|
Example: ` # Create a Receiver
|
||||||
gotk create receiver github-receiver \
|
flux create receiver github-receiver \
|
||||||
--type github \
|
--type github \
|
||||||
--event ping \
|
--event ping \
|
||||||
--event push \
|
--event push \
|
||||||
@ -42,7 +42,7 @@ var createSourceBucketCmd = &cobra.Command{
|
|||||||
The create source bucket command generates a Bucket resource and waits for it to be downloaded.
|
The create source bucket command generates a Bucket resource and waits for it to be downloaded.
|
||||||
For Buckets with static authentication, the credentials are stored in a Kubernetes secret.`,
|
For Buckets with static authentication, the credentials are stored in a Kubernetes secret.`,
|
||||||
Example: ` # Create a source from a Buckets using static authentication
|
Example: ` # Create a source from a Buckets using static authentication
|
||||||
gotk create source bucket podinfo \
|
flux create source bucket podinfo \
|
||||||
--bucket-name=podinfo \
|
--bucket-name=podinfo \
|
||||||
--endpoint=minio.minio.svc.cluster.local:9000 \
|
--endpoint=minio.minio.svc.cluster.local:9000 \
|
||||||
--insecure=true \
|
--insecure=true \
|
||||||
@ -51,7 +51,7 @@ For Buckets with static authentication, the credentials are stored in a Kubernet
|
|||||||
--interval=10m
|
--interval=10m
|
||||||
|
|
||||||
# Create a source from an Amazon S3 Bucket using IAM authentication
|
# Create a source from an Amazon S3 Bucket using IAM authentication
|
||||||
gotk create source bucket podinfo \
|
flux create source bucket podinfo \
|
||||||
--bucket-name=podinfo \
|
--bucket-name=podinfo \
|
||||||
--provider=aws \
|
--provider=aws \
|
||||||
--endpoint=s3.amazonaws.com \
|
--endpoint=s3.amazonaws.com \
|
||||||
@ -50,35 +50,35 @@ The create source git command generates a GitRepository resource and waits for i
|
|||||||
For Git over SSH, host and SSH keys are automatically generated and stored in a Kubernetes secret.
|
For Git over SSH, host and SSH keys are automatically generated and stored in a Kubernetes secret.
|
||||||
For private Git repositories, the basic authentication credentials are stored in a Kubernetes secret.`,
|
For private Git repositories, the basic authentication credentials are stored in a Kubernetes secret.`,
|
||||||
Example: ` # Create a source from a public Git repository master branch
|
Example: ` # Create a source from a public Git repository master branch
|
||||||
gotk create source git podinfo \
|
flux create source git podinfo \
|
||||||
--url=https://github.com/stefanprodan/podinfo \
|
--url=https://github.com/stefanprodan/podinfo \
|
||||||
--branch=master
|
--branch=master
|
||||||
|
|
||||||
# Create a source from a Git repository pinned to specific git tag
|
# Create a source from a Git repository pinned to specific git tag
|
||||||
gotk create source git podinfo \
|
flux create source git podinfo \
|
||||||
--url=https://github.com/stefanprodan/podinfo \
|
--url=https://github.com/stefanprodan/podinfo \
|
||||||
--tag="3.2.3"
|
--tag="3.2.3"
|
||||||
|
|
||||||
# Create a source from a public Git repository tag that matches a semver range
|
# Create a source from a public Git repository tag that matches a semver range
|
||||||
gotk create source git podinfo \
|
flux create source git podinfo \
|
||||||
--url=https://github.com/stefanprodan/podinfo \
|
--url=https://github.com/stefanprodan/podinfo \
|
||||||
--tag-semver=">=3.2.0 <3.3.0"
|
--tag-semver=">=3.2.0 <3.3.0"
|
||||||
|
|
||||||
# Create a source from a Git repository using SSH authentication
|
# Create a source from a Git repository using SSH authentication
|
||||||
gotk create source git podinfo \
|
flux create source git podinfo \
|
||||||
--url=ssh://git@github.com/stefanprodan/podinfo \
|
--url=ssh://git@github.com/stefanprodan/podinfo \
|
||||||
--branch=master
|
--branch=master
|
||||||
|
|
||||||
# Create a source from a Git repository using SSH authentication and an
|
# Create a source from a Git repository using SSH authentication and an
|
||||||
# ECDSA P-521 curve public key
|
# ECDSA P-521 curve public key
|
||||||
gotk create source git podinfo \
|
flux create source git podinfo \
|
||||||
--url=ssh://git@github.com/stefanprodan/podinfo \
|
--url=ssh://git@github.com/stefanprodan/podinfo \
|
||||||
--branch=master \
|
--branch=master \
|
||||||
--ssh-key-algorithm=ecdsa \
|
--ssh-key-algorithm=ecdsa \
|
||||||
--ssh-ecdsa-curve=p521
|
--ssh-ecdsa-curve=p521
|
||||||
|
|
||||||
# Create a source from a Git repository using basic authentication
|
# Create a source from a Git repository using basic authentication
|
||||||
gotk create source git podinfo \
|
flux create source git podinfo \
|
||||||
--url=https://github.com/stefanprodan/podinfo \
|
--url=https://github.com/stefanprodan/podinfo \
|
||||||
--username=username \
|
--username=username \
|
||||||
--password=password
|
--password=password
|
||||||
@ -42,18 +42,18 @@ var createSourceHelmCmd = &cobra.Command{
|
|||||||
The create source helm command generates a HelmRepository resource and waits for it to fetch the index.
|
The create source helm command generates a HelmRepository resource and waits for it to fetch the index.
|
||||||
For private Helm repositories, the basic authentication credentials are stored in a Kubernetes secret.`,
|
For private Helm repositories, the basic authentication credentials are stored in a Kubernetes secret.`,
|
||||||
Example: ` # Create a source from a public Helm repository
|
Example: ` # Create a source from a public Helm repository
|
||||||
gotk create source helm podinfo \
|
flux create source helm podinfo \
|
||||||
--url=https://stefanprodan.github.io/podinfo \
|
--url=https://stefanprodan.github.io/podinfo \
|
||||||
--interval=10m
|
--interval=10m
|
||||||
|
|
||||||
# Create a source from a Helm repository using basic authentication
|
# Create a source from a Helm repository using basic authentication
|
||||||
gotk create source helm podinfo \
|
flux create source helm podinfo \
|
||||||
--url=https://stefanprodan.github.io/podinfo \
|
--url=https://stefanprodan.github.io/podinfo \
|
||||||
--username=username \
|
--username=username \
|
||||||
--password=password
|
--password=password
|
||||||
|
|
||||||
# Create a source from a Helm repository using TLS authentication
|
# Create a source from a Helm repository using TLS authentication
|
||||||
gotk create source helm podinfo \
|
flux create source helm podinfo \
|
||||||
--url=https://stefanprodan.github.io/podinfo \
|
--url=https://stefanprodan.github.io/podinfo \
|
||||||
--cert-file=./cert.crt \
|
--cert-file=./cert.crt \
|
||||||
--key-file=./key.crt \
|
--key-file=./key.crt \
|
||||||
@ -41,12 +41,12 @@ var createTenantCmd = &cobra.Command{
|
|||||||
The create tenant command generates namespaces and role bindings to limit the
|
The create tenant command generates namespaces and role bindings to limit the
|
||||||
reconcilers scope to the tenant namespaces.`,
|
reconcilers scope to the tenant namespaces.`,
|
||||||
Example: ` # Create a tenant with access to a namespace
|
Example: ` # Create a tenant with access to a namespace
|
||||||
gotk create tenant dev-team \
|
flux create tenant dev-team \
|
||||||
--with-namespace=frontend \
|
--with-namespace=frontend \
|
||||||
--label=environment=dev
|
--label=environment=dev
|
||||||
|
|
||||||
# Generate tenant namespaces and role bindings in YAML format
|
# Generate tenant namespaces and role bindings in YAML format
|
||||||
gotk create tenant dev-team \
|
flux create tenant dev-team \
|
||||||
--with-namespace=frontend \
|
--with-namespace=frontend \
|
||||||
--with-namespace=backend \
|
--with-namespace=backend \
|
||||||
--export > dev-team.yaml
|
--export > dev-team.yaml
|
||||||
@ -33,7 +33,7 @@ var deleteAlertCmd = &cobra.Command{
|
|||||||
Short: "Delete a Alert resource",
|
Short: "Delete a Alert resource",
|
||||||
Long: "The delete alert command removes the given Alert from the cluster.",
|
Long: "The delete alert command removes the given Alert from the cluster.",
|
||||||
Example: ` # Delete an Alert and the Kubernetes resources created by it
|
Example: ` # Delete an Alert and the Kubernetes resources created by it
|
||||||
gotk delete alert main
|
flux delete alert main
|
||||||
`,
|
`,
|
||||||
RunE: deleteAlertCmdRun,
|
RunE: deleteAlertCmdRun,
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ var deleteAlertProviderCmd = &cobra.Command{
|
|||||||
Short: "Delete a Provider resource",
|
Short: "Delete a Provider resource",
|
||||||
Long: "The delete alert-provider command removes the given Provider from the cluster.",
|
Long: "The delete alert-provider command removes the given Provider from the cluster.",
|
||||||
Example: ` # Delete a Provider and the Kubernetes resources created by it
|
Example: ` # Delete a Provider and the Kubernetes resources created by it
|
||||||
gotk delete alert-provider slack
|
flux delete alert-provider slack
|
||||||
`,
|
`,
|
||||||
RunE: deleteAlertProviderCmdRun,
|
RunE: deleteAlertProviderCmdRun,
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ var deleteHelmReleaseCmd = &cobra.Command{
|
|||||||
Short: "Delete a HelmRelease resource",
|
Short: "Delete a HelmRelease resource",
|
||||||
Long: "The delete helmrelease command removes the given HelmRelease from the cluster.",
|
Long: "The delete helmrelease command removes the given HelmRelease from the cluster.",
|
||||||
Example: ` # Delete a Helm release and the Kubernetes resources created by it
|
Example: ` # Delete a Helm release and the Kubernetes resources created by it
|
||||||
gotk delete hr podinfo
|
flux delete hr podinfo
|
||||||
`,
|
`,
|
||||||
RunE: deleteHelmReleaseCmdRun,
|
RunE: deleteHelmReleaseCmdRun,
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ var deleteKsCmd = &cobra.Command{
|
|||||||
Short: "Delete a Kustomization resource",
|
Short: "Delete a Kustomization resource",
|
||||||
Long: "The delete kustomization command deletes the given Kustomization from the cluster.",
|
Long: "The delete kustomization command deletes the given Kustomization from the cluster.",
|
||||||
Example: ` # Delete a kustomization and the Kubernetes resources created by it
|
Example: ` # Delete a kustomization and the Kubernetes resources created by it
|
||||||
gotk delete kustomization podinfo
|
flux delete kustomization podinfo
|
||||||
`,
|
`,
|
||||||
RunE: deleteKsCmdRun,
|
RunE: deleteKsCmdRun,
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ var deleteReceiverCmd = &cobra.Command{
|
|||||||
Short: "Delete a Receiver resource",
|
Short: "Delete a Receiver resource",
|
||||||
Long: "The delete receiver command removes the given Receiver from the cluster.",
|
Long: "The delete receiver command removes the given Receiver from the cluster.",
|
||||||
Example: ` # Delete an Receiver and the Kubernetes resources created by it
|
Example: ` # Delete an Receiver and the Kubernetes resources created by it
|
||||||
gotk delete receiver main
|
flux delete receiver main
|
||||||
`,
|
`,
|
||||||
RunE: deleteReceiverCmdRun,
|
RunE: deleteReceiverCmdRun,
|
||||||
}
|
}
|
||||||
@ -32,7 +32,7 @@ var deleteSourceBucketCmd = &cobra.Command{
|
|||||||
Short: "Delete a Bucket source",
|
Short: "Delete a Bucket source",
|
||||||
Long: "The delete source bucket command deletes the given Bucket from the cluster.",
|
Long: "The delete source bucket command deletes the given Bucket from the cluster.",
|
||||||
Example: ` # Delete a Bucket source
|
Example: ` # Delete a Bucket source
|
||||||
gotk delete source bucket podinfo
|
flux delete source bucket podinfo
|
||||||
`,
|
`,
|
||||||
RunE: deleteSourceBucketCmdRun,
|
RunE: deleteSourceBucketCmdRun,
|
||||||
}
|
}
|
||||||
@ -32,7 +32,7 @@ var deleteSourceGitCmd = &cobra.Command{
|
|||||||
Short: "Delete a GitRepository source",
|
Short: "Delete a GitRepository source",
|
||||||
Long: "The delete source git command deletes the given GitRepository from the cluster.",
|
Long: "The delete source git command deletes the given GitRepository from the cluster.",
|
||||||
Example: ` # Delete a Git repository
|
Example: ` # Delete a Git repository
|
||||||
gotk delete source git podinfo
|
flux delete source git podinfo
|
||||||
`,
|
`,
|
||||||
RunE: deleteSourceGitCmdRun,
|
RunE: deleteSourceGitCmdRun,
|
||||||
}
|
}
|
||||||
@ -32,7 +32,7 @@ var deleteSourceHelmCmd = &cobra.Command{
|
|||||||
Short: "Delete a HelmRepository source",
|
Short: "Delete a HelmRepository source",
|
||||||
Long: "The delete source helm command deletes the given HelmRepository from the cluster.",
|
Long: "The delete source helm command deletes the given HelmRepository from the cluster.",
|
||||||
Example: ` # Delete a Helm repository
|
Example: ` # Delete a Helm repository
|
||||||
gotk delete source helm podinfo
|
flux delete source helm podinfo
|
||||||
`,
|
`,
|
||||||
RunE: deleteSourceHelmCmdRun,
|
RunE: deleteSourceHelmCmdRun,
|
||||||
}
|
}
|
||||||
@ -35,10 +35,10 @@ var exportAlertCmd = &cobra.Command{
|
|||||||
Short: "Export Alert resources in YAML format",
|
Short: "Export Alert resources in YAML format",
|
||||||
Long: "The export alert command exports one or all Alert resources in YAML format.",
|
Long: "The export alert command exports one or all Alert resources in YAML format.",
|
||||||
Example: ` # Export all Alert resources
|
Example: ` # Export all Alert resources
|
||||||
gotk export alert --all > alerts.yaml
|
flux export alert --all > alerts.yaml
|
||||||
|
|
||||||
# Export a Alert
|
# Export a Alert
|
||||||
gotk export alert main > main.yaml
|
flux export alert main > main.yaml
|
||||||
`,
|
`,
|
||||||
RunE: exportAlertCmdRun,
|
RunE: exportAlertCmdRun,
|
||||||
}
|
}
|
||||||
@ -35,10 +35,10 @@ var exportAlertProviderCmd = &cobra.Command{
|
|||||||
Short: "Export Provider resources in YAML format",
|
Short: "Export Provider resources in YAML format",
|
||||||
Long: "The export alert-provider command exports one or all Provider resources in YAML format.",
|
Long: "The export alert-provider command exports one or all Provider resources in YAML format.",
|
||||||
Example: ` # Export all Provider resources
|
Example: ` # Export all Provider resources
|
||||||
gotk export alert-provider --all > alert-providers.yaml
|
flux export alert-provider --all > alert-providers.yaml
|
||||||
|
|
||||||
# Export a Provider
|
# Export a Provider
|
||||||
gotk export alert-provider slack > slack.yaml
|
flux export alert-provider slack > slack.yaml
|
||||||
`,
|
`,
|
||||||
RunE: exportAlertProviderCmdRun,
|
RunE: exportAlertProviderCmdRun,
|
||||||
}
|
}
|
||||||
@ -36,10 +36,10 @@ var exportHelmReleaseCmd = &cobra.Command{
|
|||||||
Short: "Export HelmRelease resources in YAML format",
|
Short: "Export HelmRelease resources in YAML format",
|
||||||
Long: "The export helmrelease command exports one or all HelmRelease resources in YAML format.",
|
Long: "The export helmrelease command exports one or all HelmRelease resources in YAML format.",
|
||||||
Example: ` # Export all HelmRelease resources
|
Example: ` # Export all HelmRelease resources
|
||||||
gotk export helmrelease --all > kustomizations.yaml
|
flux export helmrelease --all > kustomizations.yaml
|
||||||
|
|
||||||
# Export a HelmRelease
|
# Export a HelmRelease
|
||||||
gotk export hr my-app > app-release.yaml
|
flux export hr my-app > app-release.yaml
|
||||||
`,
|
`,
|
||||||
RunE: exportHelmReleaseCmdRun,
|
RunE: exportHelmReleaseCmdRun,
|
||||||
}
|
}
|
||||||
@ -36,10 +36,10 @@ var exportKsCmd = &cobra.Command{
|
|||||||
Short: "Export Kustomization resources in YAML format",
|
Short: "Export Kustomization resources in YAML format",
|
||||||
Long: "The export kustomization command exports one or all Kustomization resources in YAML format.",
|
Long: "The export kustomization command exports one or all Kustomization resources in YAML format.",
|
||||||
Example: ` # Export all Kustomization resources
|
Example: ` # Export all Kustomization resources
|
||||||
gotk export kustomization --all > kustomizations.yaml
|
flux export kustomization --all > kustomizations.yaml
|
||||||
|
|
||||||
# Export a Kustomization
|
# Export a Kustomization
|
||||||
gotk export kustomization my-app > kustomization.yaml
|
flux export kustomization my-app > kustomization.yaml
|
||||||
`,
|
`,
|
||||||
RunE: exportKsCmdRun,
|
RunE: exportKsCmdRun,
|
||||||
}
|
}
|
||||||
@ -35,10 +35,10 @@ var exportReceiverCmd = &cobra.Command{
|
|||||||
Short: "Export Receiver resources in YAML format",
|
Short: "Export Receiver resources in YAML format",
|
||||||
Long: "The export receiver command exports one or all Receiver resources in YAML format.",
|
Long: "The export receiver command exports one or all Receiver resources in YAML format.",
|
||||||
Example: ` # Export all Receiver resources
|
Example: ` # Export all Receiver resources
|
||||||
gotk export receiver --all > receivers.yaml
|
flux export receiver --all > receivers.yaml
|
||||||
|
|
||||||
# Export a Receiver
|
# Export a Receiver
|
||||||
gotk export receiver main > main.yaml
|
flux export receiver main > main.yaml
|
||||||
`,
|
`,
|
||||||
RunE: exportReceiverCmdRun,
|
RunE: exportReceiverCmdRun,
|
||||||
}
|
}
|
||||||
@ -36,10 +36,10 @@ var exportSourceBucketCmd = &cobra.Command{
|
|||||||
Short: "Export Bucket sources in YAML format",
|
Short: "Export Bucket sources in YAML format",
|
||||||
Long: "The export source git command exports on or all Bucket sources in YAML format.",
|
Long: "The export source git command exports on or all Bucket sources in YAML format.",
|
||||||
Example: ` # Export all Bucket sources
|
Example: ` # Export all Bucket sources
|
||||||
gotk export source bucket --all > sources.yaml
|
flux export source bucket --all > sources.yaml
|
||||||
|
|
||||||
# Export a Bucket source including the static credentials
|
# Export a Bucket source including the static credentials
|
||||||
gotk export source bucket my-bucket --with-credentials > source.yaml
|
flux export source bucket my-bucket --with-credentials > source.yaml
|
||||||
`,
|
`,
|
||||||
RunE: exportSourceBucketCmdRun,
|
RunE: exportSourceBucketCmdRun,
|
||||||
}
|
}
|
||||||
@ -36,10 +36,10 @@ var exportSourceGitCmd = &cobra.Command{
|
|||||||
Short: "Export GitRepository sources in YAML format",
|
Short: "Export GitRepository sources in YAML format",
|
||||||
Long: "The export source git command exports on or all GitRepository sources in YAML format.",
|
Long: "The export source git command exports on or all GitRepository sources in YAML format.",
|
||||||
Example: ` # Export all GitRepository sources
|
Example: ` # Export all GitRepository sources
|
||||||
gotk export source git --all > sources.yaml
|
flux export source git --all > sources.yaml
|
||||||
|
|
||||||
# Export a GitRepository source including the SSH key pair or basic auth credentials
|
# Export a GitRepository source including the SSH key pair or basic auth credentials
|
||||||
gotk export source git my-private-repo --with-credentials > source.yaml
|
flux export source git my-private-repo --with-credentials > source.yaml
|
||||||
`,
|
`,
|
||||||
RunE: exportSourceGitCmdRun,
|
RunE: exportSourceGitCmdRun,
|
||||||
}
|
}
|
||||||
@ -36,10 +36,10 @@ var exportSourceHelmCmd = &cobra.Command{
|
|||||||
Short: "Export HelmRepository sources in YAML format",
|
Short: "Export HelmRepository sources in YAML format",
|
||||||
Long: "The export source git command exports on or all HelmRepository sources in YAML format.",
|
Long: "The export source git command exports on or all HelmRepository sources in YAML format.",
|
||||||
Example: ` # Export all HelmRepository sources
|
Example: ` # Export all HelmRepository sources
|
||||||
gotk export source helm --all > sources.yaml
|
flux export source helm --all > sources.yaml
|
||||||
|
|
||||||
# Export a HelmRepository source including the basic auth credentials
|
# Export a HelmRepository source including the basic auth credentials
|
||||||
gotk export source helm my-private-repo --with-credentials > source.yaml
|
flux export source helm my-private-repo --with-credentials > source.yaml
|
||||||
`,
|
`,
|
||||||
RunE: exportSourceHelmCmdRun,
|
RunE: exportSourceHelmCmdRun,
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ var getAlertCmd = &cobra.Command{
|
|||||||
Short: "Get Alert statuses",
|
Short: "Get Alert statuses",
|
||||||
Long: "The get alert command prints the statuses of the resources.",
|
Long: "The get alert command prints the statuses of the resources.",
|
||||||
Example: ` # List all Alerts and their status
|
Example: ` # List all Alerts and their status
|
||||||
gotk get alerts
|
flux get alerts
|
||||||
`,
|
`,
|
||||||
RunE: getAlertCmdRun,
|
RunE: getAlertCmdRun,
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ var getAlertProviderCmd = &cobra.Command{
|
|||||||
Short: "Get Provider statuses",
|
Short: "Get Provider statuses",
|
||||||
Long: "The get alert-provider command prints the statuses of the resources.",
|
Long: "The get alert-provider command prints the statuses of the resources.",
|
||||||
Example: ` # List all Providers and their status
|
Example: ` # List all Providers and their status
|
||||||
gotk get alert-providers
|
flux get alert-providers
|
||||||
`,
|
`,
|
||||||
RunE: getAlertProviderCmdRun,
|
RunE: getAlertProviderCmdRun,
|
||||||
}
|
}
|
||||||
@ -38,7 +38,7 @@ var getHelmReleaseCmd = &cobra.Command{
|
|||||||
Short: "Get HelmRelease statuses",
|
Short: "Get HelmRelease statuses",
|
||||||
Long: "The get helmreleases command prints the statuses of the resources.",
|
Long: "The get helmreleases command prints the statuses of the resources.",
|
||||||
Example: ` # List all Helm releases and their status
|
Example: ` # List all Helm releases and their status
|
||||||
gotk get helmreleases
|
flux get helmreleases
|
||||||
`,
|
`,
|
||||||
RunE: getHelmReleaseCmdRun,
|
RunE: getHelmReleaseCmdRun,
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ var getKsCmd = &cobra.Command{
|
|||||||
Short: "Get Kustomization statuses",
|
Short: "Get Kustomization statuses",
|
||||||
Long: "The get kustomizations command prints the statuses of the resources.",
|
Long: "The get kustomizations command prints the statuses of the resources.",
|
||||||
Example: ` # List all kustomizations and their status
|
Example: ` # List all kustomizations and their status
|
||||||
gotk get kustomizations
|
flux get kustomizations
|
||||||
`,
|
`,
|
||||||
RunE: getKsCmdRun,
|
RunE: getKsCmdRun,
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ var getReceiverCmd = &cobra.Command{
|
|||||||
Short: "Get Receiver statuses",
|
Short: "Get Receiver statuses",
|
||||||
Long: "The get receiver command prints the statuses of the resources.",
|
Long: "The get receiver command prints the statuses of the resources.",
|
||||||
Example: ` # List all Receiver and their status
|
Example: ` # List all Receiver and their status
|
||||||
gotk get receivers
|
flux get receivers
|
||||||
`,
|
`,
|
||||||
RunE: getReceiverCmdRun,
|
RunE: getReceiverCmdRun,
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ var getSourceBucketCmd = &cobra.Command{
|
|||||||
Short: "Get Bucket source statuses",
|
Short: "Get Bucket source statuses",
|
||||||
Long: "The get sources bucket command prints the status of the Bucket sources.",
|
Long: "The get sources bucket command prints the status of the Bucket sources.",
|
||||||
Example: ` # List all Buckets and their status
|
Example: ` # List all Buckets and their status
|
||||||
gotk get sources bucket
|
flux get sources bucket
|
||||||
`,
|
`,
|
||||||
RunE: getSourceBucketCmdRun,
|
RunE: getSourceBucketCmdRun,
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ var getSourceGitCmd = &cobra.Command{
|
|||||||
Short: "Get GitRepository source statuses",
|
Short: "Get GitRepository source statuses",
|
||||||
Long: "The get sources git command prints the status of the GitRepository sources.",
|
Long: "The get sources git command prints the status of the GitRepository sources.",
|
||||||
Example: ` # List all Git repositories and their status
|
Example: ` # List all Git repositories and their status
|
||||||
gotk get sources git
|
flux get sources git
|
||||||
`,
|
`,
|
||||||
RunE: getSourceGitCmdRun,
|
RunE: getSourceGitCmdRun,
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ var getSourceHelmCmd = &cobra.Command{
|
|||||||
Short: "Get HelmRepository source statuses",
|
Short: "Get HelmRepository source statuses",
|
||||||
Long: "The get sources helm command prints the status of the HelmRepository sources.",
|
Long: "The get sources helm command prints the status of the HelmRepository sources.",
|
||||||
Example: ` # List all Helm repositories and their status
|
Example: ` # List all Helm repositories and their status
|
||||||
gotk get sources helm
|
flux get sources helm
|
||||||
`,
|
`,
|
||||||
RunE: getSourceHelmCmdRun,
|
RunE: getSourceHelmCmdRun,
|
||||||
}
|
}
|
||||||
@ -37,16 +37,16 @@ var installCmd = &cobra.Command{
|
|||||||
Long: `The install command deploys the toolkit components in the specified namespace.
|
Long: `The install command deploys the toolkit components in the specified namespace.
|
||||||
If a previous version is installed, then an in-place upgrade will be performed.`,
|
If a previous version is installed, then an in-place upgrade will be performed.`,
|
||||||
Example: ` # Install the latest version in the flux-system namespace
|
Example: ` # Install the latest version in the flux-system namespace
|
||||||
gotk install --version=latest --namespace=flux-system
|
flux install --version=latest --namespace=flux-system
|
||||||
|
|
||||||
# Dry-run install for a specific version and a series of components
|
# Dry-run install for a specific version and a series of components
|
||||||
gotk install --dry-run --version=v0.0.7 --components="source-controller,kustomize-controller"
|
flux install --dry-run --version=v0.0.7 --components="source-controller,kustomize-controller"
|
||||||
|
|
||||||
# Dry-run install with manifests preview
|
# Dry-run install with manifests preview
|
||||||
gotk install --dry-run --verbose
|
flux install --dry-run --verbose
|
||||||
|
|
||||||
# Write install manifests to file
|
# Write install manifests to file
|
||||||
gotk install --export > flux-system.yaml
|
flux install --export > flux-system.yaml
|
||||||
`,
|
`,
|
||||||
RunE: installCmdRun,
|
RunE: installCmdRun,
|
||||||
}
|
}
|
||||||
@ -26,42 +26,42 @@ import (
|
|||||||
"github.com/spf13/cobra/doc"
|
"github.com/spf13/cobra/doc"
|
||||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
||||||
|
|
||||||
gotklog "github.com/fluxcd/toolkit/pkg/log"
|
fluxlog "github.com/fluxcd/toolkit/pkg/log"
|
||||||
"github.com/fluxcd/toolkit/pkg/manifestgen/install"
|
"github.com/fluxcd/toolkit/pkg/manifestgen/install"
|
||||||
)
|
)
|
||||||
|
|
||||||
var VERSION = "0.0.0-dev.0"
|
var VERSION = "0.0.0-dev.0"
|
||||||
|
|
||||||
var rootCmd = &cobra.Command{
|
var rootCmd = &cobra.Command{
|
||||||
Use: "gotk",
|
Use: "flux",
|
||||||
Version: VERSION,
|
Version: VERSION,
|
||||||
SilenceUsage: true,
|
SilenceUsage: true,
|
||||||
SilenceErrors: true,
|
SilenceErrors: true,
|
||||||
Short: "Command line utility for assembling Kubernetes CD pipelines",
|
Short: "Command line utility for assembling Kubernetes CD pipelines",
|
||||||
Long: `Command line utility for assembling Kubernetes CD pipelines the GitOps way.`,
|
Long: `Command line utility for assembling Kubernetes CD pipelines the GitOps way.`,
|
||||||
Example: ` # Check prerequisites
|
Example: ` # Check prerequisites
|
||||||
gotk check --pre
|
flux check --pre
|
||||||
|
|
||||||
# Install the latest version of the toolkit
|
# Install the latest version of the toolkit
|
||||||
gotk install --version=master
|
flux install --version=master
|
||||||
|
|
||||||
# Create a source from a public Git repository
|
# Create a source from a public Git repository
|
||||||
gotk create source git webapp-latest \
|
flux create source git webapp-latest \
|
||||||
--url=https://github.com/stefanprodan/podinfo \
|
--url=https://github.com/stefanprodan/podinfo \
|
||||||
--branch=master \
|
--branch=master \
|
||||||
--interval=3m
|
--interval=3m
|
||||||
|
|
||||||
# List GitRepository sources and their status
|
# List GitRepository sources and their status
|
||||||
gotk get sources git
|
flux get sources git
|
||||||
|
|
||||||
# Trigger a GitRepository source reconciliation
|
# Trigger a GitRepository source reconciliation
|
||||||
gotk reconcile source git flux-system
|
flux reconcile source git flux-system
|
||||||
|
|
||||||
# Export GitRepository sources in YAML format
|
# Export GitRepository sources in YAML format
|
||||||
gotk export source git --all > sources.yaml
|
flux export source git --all > sources.yaml
|
||||||
|
|
||||||
# Create a Kustomization for deploying a series of microservices
|
# Create a Kustomization for deploying a series of microservices
|
||||||
gotk create kustomization webapp-dev \
|
flux create kustomization webapp-dev \
|
||||||
--source=webapp-latest \
|
--source=webapp-latest \
|
||||||
--path="./deploy/webapp/" \
|
--path="./deploy/webapp/" \
|
||||||
--prune=true \
|
--prune=true \
|
||||||
@ -72,25 +72,25 @@ var rootCmd = &cobra.Command{
|
|||||||
--health-check-timeout=2m
|
--health-check-timeout=2m
|
||||||
|
|
||||||
# Trigger a git sync of the Kustomization's source and apply changes
|
# Trigger a git sync of the Kustomization's source and apply changes
|
||||||
gotk reconcile kustomization webapp-dev --with-source
|
flux reconcile kustomization webapp-dev --with-source
|
||||||
|
|
||||||
# Suspend a Kustomization reconciliation
|
# Suspend a Kustomization reconciliation
|
||||||
gotk suspend kustomization webapp-dev
|
flux suspend kustomization webapp-dev
|
||||||
|
|
||||||
# Export Kustomizations in YAML format
|
# Export Kustomizations in YAML format
|
||||||
gotk export kustomization --all > kustomizations.yaml
|
flux export kustomization --all > kustomizations.yaml
|
||||||
|
|
||||||
# Resume a Kustomization reconciliation
|
# Resume a Kustomization reconciliation
|
||||||
gotk resume kustomization webapp-dev
|
flux resume kustomization webapp-dev
|
||||||
|
|
||||||
# Delete a Kustomization
|
# Delete a Kustomization
|
||||||
gotk delete kustomization webapp-dev
|
flux delete kustomization webapp-dev
|
||||||
|
|
||||||
# Delete a GitRepository source
|
# Delete a GitRepository source
|
||||||
gotk delete source git webapp-latest
|
flux delete source git webapp-latest
|
||||||
|
|
||||||
# Uninstall the toolkit and delete CRDs
|
# Uninstall the toolkit and delete CRDs
|
||||||
gotk uninstall --crds
|
flux uninstall --crds
|
||||||
`,
|
`,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ var (
|
|||||||
timeout time.Duration
|
timeout time.Duration
|
||||||
verbose bool
|
verbose bool
|
||||||
pollInterval = 2 * time.Second
|
pollInterval = 2 * time.Second
|
||||||
logger gotklog.Logger = printLogger{}
|
logger fluxlog.Logger = printLogger{}
|
||||||
defaults = install.MakeDefaultOptions()
|
defaults = install.MakeDefaultOptions()
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ var reconcileAlertCmd = &cobra.Command{
|
|||||||
Short: "Reconcile an Alert",
|
Short: "Reconcile an Alert",
|
||||||
Long: `The reconcile alert command triggers a reconciliation of an Alert resource and waits for it to finish.`,
|
Long: `The reconcile alert command triggers a reconciliation of an Alert resource and waits for it to finish.`,
|
||||||
Example: ` # Trigger a reconciliation for an existing alert
|
Example: ` # Trigger a reconciliation for an existing alert
|
||||||
gotk reconcile alert main
|
flux reconcile alert main
|
||||||
`,
|
`,
|
||||||
RunE: reconcileAlertCmdRun,
|
RunE: reconcileAlertCmdRun,
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ var reconcileAlertProviderCmd = &cobra.Command{
|
|||||||
Short: "Reconcile a Provider",
|
Short: "Reconcile a Provider",
|
||||||
Long: `The reconcile alert-provider command triggers a reconciliation of a Provider resource and waits for it to finish.`,
|
Long: `The reconcile alert-provider command triggers a reconciliation of a Provider resource and waits for it to finish.`,
|
||||||
Example: ` # Trigger a reconciliation for an existing provider
|
Example: ` # Trigger a reconciliation for an existing provider
|
||||||
gotk reconcile alert-provider slack
|
flux reconcile alert-provider slack
|
||||||
`,
|
`,
|
||||||
RunE: reconcileAlertProviderCmdRun,
|
RunE: reconcileAlertProviderCmdRun,
|
||||||
}
|
}
|
||||||
@ -42,10 +42,10 @@ var reconcileHrCmd = &cobra.Command{
|
|||||||
Long: `
|
Long: `
|
||||||
The reconcile kustomization command triggers a reconciliation of a HelmRelease resource and waits for it to finish.`,
|
The reconcile kustomization command triggers a reconciliation of a HelmRelease resource and waits for it to finish.`,
|
||||||
Example: ` # Trigger a HelmRelease apply outside of the reconciliation interval
|
Example: ` # Trigger a HelmRelease apply outside of the reconciliation interval
|
||||||
gotk reconcile hr podinfo
|
flux reconcile hr podinfo
|
||||||
|
|
||||||
# Trigger a reconciliation of the HelmRelease's source and apply changes
|
# Trigger a reconciliation of the HelmRelease's source and apply changes
|
||||||
gotk reconcile hr podinfo --with-source
|
flux reconcile hr podinfo --with-source
|
||||||
`,
|
`,
|
||||||
RunE: reconcileHrCmdRun,
|
RunE: reconcileHrCmdRun,
|
||||||
}
|
}
|
||||||
@ -42,10 +42,10 @@ var reconcileKsCmd = &cobra.Command{
|
|||||||
Long: `
|
Long: `
|
||||||
The reconcile kustomization command triggers a reconciliation of a Kustomization resource and waits for it to finish.`,
|
The reconcile kustomization command triggers a reconciliation of a Kustomization resource and waits for it to finish.`,
|
||||||
Example: ` # Trigger a Kustomization apply outside of the reconciliation interval
|
Example: ` # Trigger a Kustomization apply outside of the reconciliation interval
|
||||||
gotk reconcile kustomization podinfo
|
flux reconcile kustomization podinfo
|
||||||
|
|
||||||
# Trigger a sync of the Kustomization's source and apply changes
|
# Trigger a sync of the Kustomization's source and apply changes
|
||||||
gotk reconcile kustomization podinfo --with-source
|
flux reconcile kustomization podinfo --with-source
|
||||||
`,
|
`,
|
||||||
RunE: reconcileKsCmdRun,
|
RunE: reconcileKsCmdRun,
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ var reconcileReceiverCmd = &cobra.Command{
|
|||||||
Short: "Reconcile a Receiver",
|
Short: "Reconcile a Receiver",
|
||||||
Long: `The reconcile receiver command triggers a reconciliation of a Receiver resource and waits for it to finish.`,
|
Long: `The reconcile receiver command triggers a reconciliation of a Receiver resource and waits for it to finish.`,
|
||||||
Example: ` # Trigger a reconciliation for an existing receiver
|
Example: ` # Trigger a reconciliation for an existing receiver
|
||||||
gotk reconcile receiver main
|
flux reconcile receiver main
|
||||||
`,
|
`,
|
||||||
RunE: reconcileReceiverCmdRun,
|
RunE: reconcileReceiverCmdRun,
|
||||||
}
|
}
|
||||||
@ -38,7 +38,7 @@ var reconcileSourceBucketCmd = &cobra.Command{
|
|||||||
Short: "Reconcile a Bucket source",
|
Short: "Reconcile a Bucket source",
|
||||||
Long: `The reconcile source command triggers a reconciliation of a Bucket resource and waits for it to finish.`,
|
Long: `The reconcile source command triggers a reconciliation of a Bucket resource and waits for it to finish.`,
|
||||||
Example: ` # Trigger a reconciliation for an existing source
|
Example: ` # Trigger a reconciliation for an existing source
|
||||||
gotk reconcile source bucket podinfo
|
flux reconcile source bucket podinfo
|
||||||
`,
|
`,
|
||||||
RunE: reconcileSourceBucketCmdRun,
|
RunE: reconcileSourceBucketCmdRun,
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ var reconcileSourceGitCmd = &cobra.Command{
|
|||||||
Short: "Reconcile a GitRepository source",
|
Short: "Reconcile a GitRepository source",
|
||||||
Long: `The reconcile source command triggers a reconciliation of a GitRepository resource and waits for it to finish.`,
|
Long: `The reconcile source command triggers a reconciliation of a GitRepository resource and waits for it to finish.`,
|
||||||
Example: ` # Trigger a git pull for an existing source
|
Example: ` # Trigger a git pull for an existing source
|
||||||
gotk reconcile source git podinfo
|
flux reconcile source git podinfo
|
||||||
`,
|
`,
|
||||||
RunE: reconcileSourceGitCmdRun,
|
RunE: reconcileSourceGitCmdRun,
|
||||||
}
|
}
|
||||||
@ -38,7 +38,7 @@ var reconcileSourceHelmCmd = &cobra.Command{
|
|||||||
Short: "Reconcile a HelmRepository source",
|
Short: "Reconcile a HelmRepository source",
|
||||||
Long: `The reconcile source command triggers a reconciliation of a HelmRepository resource and waits for it to finish.`,
|
Long: `The reconcile source command triggers a reconciliation of a HelmRepository resource and waits for it to finish.`,
|
||||||
Example: ` # Trigger a reconciliation for an existing source
|
Example: ` # Trigger a reconciliation for an existing source
|
||||||
gotk reconcile source helm podinfo
|
flux reconcile source helm podinfo
|
||||||
`,
|
`,
|
||||||
RunE: reconcileSourceHelmCmdRun,
|
RunE: reconcileSourceHelmCmdRun,
|
||||||
}
|
}
|
||||||
@ -38,7 +38,7 @@ var resumeAlertCmd = &cobra.Command{
|
|||||||
Long: `The resume command marks a previously suspended Alert resource for reconciliation and waits for it to
|
Long: `The resume command marks a previously suspended Alert resource for reconciliation and waits for it to
|
||||||
finish the apply.`,
|
finish the apply.`,
|
||||||
Example: ` # Resume reconciliation for an existing Alert
|
Example: ` # Resume reconciliation for an existing Alert
|
||||||
gotk resume alert main
|
flux resume alert main
|
||||||
`,
|
`,
|
||||||
RunE: resumeAlertCmdRun,
|
RunE: resumeAlertCmdRun,
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ var resumeHrCmd = &cobra.Command{
|
|||||||
Long: `The resume command marks a previously suspended HelmRelease resource for reconciliation and waits for it to
|
Long: `The resume command marks a previously suspended HelmRelease resource for reconciliation and waits for it to
|
||||||
finish the apply.`,
|
finish the apply.`,
|
||||||
Example: ` # Resume reconciliation for an existing Helm release
|
Example: ` # Resume reconciliation for an existing Helm release
|
||||||
gotk resume hr podinfo
|
flux resume hr podinfo
|
||||||
`,
|
`,
|
||||||
RunE: resumeHrCmdRun,
|
RunE: resumeHrCmdRun,
|
||||||
}
|
}
|
||||||
@ -38,7 +38,7 @@ var resumeKsCmd = &cobra.Command{
|
|||||||
Long: `The resume command marks a previously suspended Kustomization resource for reconciliation and waits for it to
|
Long: `The resume command marks a previously suspended Kustomization resource for reconciliation and waits for it to
|
||||||
finish the apply.`,
|
finish the apply.`,
|
||||||
Example: ` # Resume reconciliation for an existing Kustomization
|
Example: ` # Resume reconciliation for an existing Kustomization
|
||||||
gotk resume ks podinfo
|
flux resume ks podinfo
|
||||||
`,
|
`,
|
||||||
RunE: resumeKsCmdRun,
|
RunE: resumeKsCmdRun,
|
||||||
}
|
}
|
||||||
@ -38,7 +38,7 @@ var resumeReceiverCmd = &cobra.Command{
|
|||||||
Long: `The resume command marks a previously suspended Receiver resource for reconciliation and waits for it to
|
Long: `The resume command marks a previously suspended Receiver resource for reconciliation and waits for it to
|
||||||
finish the apply.`,
|
finish the apply.`,
|
||||||
Example: ` # Resume reconciliation for an existing Receiver
|
Example: ` # Resume reconciliation for an existing Receiver
|
||||||
gotk resume receiver main
|
flux resume receiver main
|
||||||
`,
|
`,
|
||||||
RunE: resumeReceiverCmdRun,
|
RunE: resumeReceiverCmdRun,
|
||||||
}
|
}
|
||||||
@ -32,7 +32,7 @@ var suspendAlertCmd = &cobra.Command{
|
|||||||
Short: "Suspend reconciliation of Alert",
|
Short: "Suspend reconciliation of Alert",
|
||||||
Long: "The suspend command disables the reconciliation of a Alert resource.",
|
Long: "The suspend command disables the reconciliation of a Alert resource.",
|
||||||
Example: ` # Suspend reconciliation for an existing Alert
|
Example: ` # Suspend reconciliation for an existing Alert
|
||||||
gotk suspend alert main
|
flux suspend alert main
|
||||||
`,
|
`,
|
||||||
RunE: suspendAlertCmdRun,
|
RunE: suspendAlertCmdRun,
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ var suspendHrCmd = &cobra.Command{
|
|||||||
Short: "Suspend reconciliation of HelmRelease",
|
Short: "Suspend reconciliation of HelmRelease",
|
||||||
Long: "The suspend command disables the reconciliation of a HelmRelease resource.",
|
Long: "The suspend command disables the reconciliation of a HelmRelease resource.",
|
||||||
Example: ` # Suspend reconciliation for an existing Helm release
|
Example: ` # Suspend reconciliation for an existing Helm release
|
||||||
gotk suspend hr podinfo
|
flux suspend hr podinfo
|
||||||
`,
|
`,
|
||||||
RunE: suspendHrCmdRun,
|
RunE: suspendHrCmdRun,
|
||||||
}
|
}
|
||||||
@ -32,7 +32,7 @@ var suspendKsCmd = &cobra.Command{
|
|||||||
Short: "Suspend reconciliation of Kustomization",
|
Short: "Suspend reconciliation of Kustomization",
|
||||||
Long: "The suspend command disables the reconciliation of a Kustomization resource.",
|
Long: "The suspend command disables the reconciliation of a Kustomization resource.",
|
||||||
Example: ` # Suspend reconciliation for an existing Kustomization
|
Example: ` # Suspend reconciliation for an existing Kustomization
|
||||||
gotk suspend ks podinfo
|
flux suspend ks podinfo
|
||||||
`,
|
`,
|
||||||
RunE: suspendKsCmdRun,
|
RunE: suspendKsCmdRun,
|
||||||
}
|
}
|
||||||
@ -32,7 +32,7 @@ var suspendReceiverCmd = &cobra.Command{
|
|||||||
Short: "Suspend reconciliation of Receiver",
|
Short: "Suspend reconciliation of Receiver",
|
||||||
Long: "The suspend command disables the reconciliation of a Receiver resource.",
|
Long: "The suspend command disables the reconciliation of a Receiver resource.",
|
||||||
Example: ` # Suspend reconciliation for an existing Receiver
|
Example: ` # Suspend reconciliation for an existing Receiver
|
||||||
gotk suspend receiver main
|
flux suspend receiver main
|
||||||
`,
|
`,
|
||||||
RunE: suspendReceiverCmdRun,
|
RunE: suspendReceiverCmdRun,
|
||||||
}
|
}
|
||||||
@ -37,10 +37,10 @@ var uninstallCmd = &cobra.Command{
|
|||||||
Short: "Uninstall the toolkit components",
|
Short: "Uninstall the toolkit components",
|
||||||
Long: "The uninstall command removes the namespace, cluster roles, cluster role bindings and CRDs from the cluster.",
|
Long: "The uninstall command removes the namespace, cluster roles, cluster role bindings and CRDs from the cluster.",
|
||||||
Example: ` # Dry-run uninstall of all components
|
Example: ` # Dry-run uninstall of all components
|
||||||
gotk uninstall --dry-run --namespace=flux-system
|
flux uninstall --dry-run --namespace=flux-system
|
||||||
|
|
||||||
# Uninstall all components and delete custom resource definitions
|
# Uninstall all components and delete custom resource definitions
|
||||||
gotk uninstall --resources --crds --namespace=flux-system
|
flux uninstall --resources --crds --namespace=flux-system
|
||||||
`,
|
`,
|
||||||
RunE: uninstallCmdRun,
|
RunE: uninstallCmdRun,
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk
|
## flux
|
||||||
|
|
||||||
Command line utility for assembling Kubernetes CD pipelines
|
Command line utility for assembling Kubernetes CD pipelines
|
||||||
|
|
||||||
@ -10,28 +10,28 @@ Command line utility for assembling Kubernetes CD pipelines the GitOps way.
|
|||||||
|
|
||||||
```
|
```
|
||||||
# Check prerequisites
|
# Check prerequisites
|
||||||
gotk check --pre
|
flux check --pre
|
||||||
|
|
||||||
# Install the latest version of the toolkit
|
# Install the latest version of the toolkit
|
||||||
gotk install --version=master
|
flux install --version=master
|
||||||
|
|
||||||
# Create a source from a public Git repository
|
# Create a source from a public Git repository
|
||||||
gotk create source git webapp-latest \
|
flux create source git webapp-latest \
|
||||||
--url=https://github.com/stefanprodan/podinfo \
|
--url=https://github.com/stefanprodan/podinfo \
|
||||||
--branch=master \
|
--branch=master \
|
||||||
--interval=3m
|
--interval=3m
|
||||||
|
|
||||||
# List GitRepository sources and their status
|
# List GitRepository sources and their status
|
||||||
gotk get sources git
|
flux get sources git
|
||||||
|
|
||||||
# Trigger a GitRepository source reconciliation
|
# Trigger a GitRepository source reconciliation
|
||||||
gotk reconcile source git flux-system
|
flux reconcile source git flux-system
|
||||||
|
|
||||||
# Export GitRepository sources in YAML format
|
# Export GitRepository sources in YAML format
|
||||||
gotk export source git --all > sources.yaml
|
flux export source git --all > sources.yaml
|
||||||
|
|
||||||
# Create a Kustomization for deploying a series of microservices
|
# Create a Kustomization for deploying a series of microservices
|
||||||
gotk create kustomization webapp-dev \
|
flux create kustomization webapp-dev \
|
||||||
--source=webapp-latest \
|
--source=webapp-latest \
|
||||||
--path="./deploy/webapp/" \
|
--path="./deploy/webapp/" \
|
||||||
--prune=true \
|
--prune=true \
|
||||||
@ -42,32 +42,32 @@ Command line utility for assembling Kubernetes CD pipelines the GitOps way.
|
|||||||
--health-check-timeout=2m
|
--health-check-timeout=2m
|
||||||
|
|
||||||
# Trigger a git sync of the Kustomization's source and apply changes
|
# Trigger a git sync of the Kustomization's source and apply changes
|
||||||
gotk reconcile kustomization webapp-dev --with-source
|
flux reconcile kustomization webapp-dev --with-source
|
||||||
|
|
||||||
# Suspend a Kustomization reconciliation
|
# Suspend a Kustomization reconciliation
|
||||||
gotk suspend kustomization webapp-dev
|
flux suspend kustomization webapp-dev
|
||||||
|
|
||||||
# Export Kustomizations in YAML format
|
# Export Kustomizations in YAML format
|
||||||
gotk export kustomization --all > kustomizations.yaml
|
flux export kustomization --all > kustomizations.yaml
|
||||||
|
|
||||||
# Resume a Kustomization reconciliation
|
# Resume a Kustomization reconciliation
|
||||||
gotk resume kustomization webapp-dev
|
flux resume kustomization webapp-dev
|
||||||
|
|
||||||
# Delete a Kustomization
|
# Delete a Kustomization
|
||||||
gotk delete kustomization webapp-dev
|
flux delete kustomization webapp-dev
|
||||||
|
|
||||||
# Delete a GitRepository source
|
# Delete a GitRepository source
|
||||||
gotk delete source git webapp-latest
|
flux delete source git webapp-latest
|
||||||
|
|
||||||
# Uninstall the toolkit and delete CRDs
|
# Uninstall the toolkit and delete CRDs
|
||||||
gotk uninstall --crds
|
flux uninstall --crds
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
```
|
```
|
||||||
-h, --help help for gotk
|
-h, --help help for flux
|
||||||
--kubeconfig string path to the kubeconfig file (default "~/.kube/config")
|
--kubeconfig string path to the kubeconfig file (default "~/.kube/config")
|
||||||
-n, --namespace string the namespace scope for this operation (default "flux-system")
|
-n, --namespace string the namespace scope for this operation (default "flux-system")
|
||||||
--timeout duration timeout for this operation (default 5m0s)
|
--timeout duration timeout for this operation (default 5m0s)
|
||||||
@ -76,16 +76,16 @@ Command line utility for assembling Kubernetes CD pipelines the GitOps way.
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk bootstrap](gotk_bootstrap.md) - Bootstrap toolkit components
|
* [flux bootstrap](flux_bootstrap.md) - Bootstrap toolkit components
|
||||||
* [gotk check](gotk_check.md) - Check requirements and installation
|
* [flux check](flux_check.md) - Check requirements and installation
|
||||||
* [gotk completion](gotk_completion.md) - Generates completion scripts for various shells
|
* [flux completion](flux_completion.md) - Generates completion scripts for various shells
|
||||||
* [gotk create](gotk_create.md) - Create or update sources and resources
|
* [flux create](flux_create.md) - Create or update sources and resources
|
||||||
* [gotk delete](gotk_delete.md) - Delete sources and resources
|
* [flux delete](flux_delete.md) - Delete sources and resources
|
||||||
* [gotk export](gotk_export.md) - Export resources in YAML format
|
* [flux export](flux_export.md) - Export resources in YAML format
|
||||||
* [gotk get](gotk_get.md) - Get sources and resources
|
* [flux get](flux_get.md) - Get sources and resources
|
||||||
* [gotk install](gotk_install.md) - Install the toolkit components
|
* [flux install](flux_install.md) - Install the toolkit components
|
||||||
* [gotk reconcile](gotk_reconcile.md) - Reconcile sources and resources
|
* [flux reconcile](flux_reconcile.md) - Reconcile sources and resources
|
||||||
* [gotk resume](gotk_resume.md) - Resume suspended resources
|
* [flux resume](flux_resume.md) - Resume suspended resources
|
||||||
* [gotk suspend](gotk_suspend.md) - Suspend resources
|
* [flux suspend](flux_suspend.md) - Suspend resources
|
||||||
* [gotk uninstall](gotk_uninstall.md) - Uninstall the toolkit components
|
* [flux uninstall](flux_uninstall.md) - Uninstall the toolkit components
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk bootstrap
|
## flux bootstrap
|
||||||
|
|
||||||
Bootstrap toolkit components
|
Bootstrap toolkit components
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ The bootstrap sub-commands bootstrap the toolkit components on the targeted Git
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines
|
* [flux](flux.md) - Command line utility for assembling Kubernetes CD pipelines
|
||||||
* [gotk bootstrap github](gotk_bootstrap_github.md) - Bootstrap toolkit components in a GitHub repository
|
* [flux bootstrap github](flux_bootstrap_github.md) - Bootstrap toolkit components in a GitHub repository
|
||||||
* [gotk bootstrap gitlab](gotk_bootstrap_gitlab.md) - Bootstrap toolkit components in a GitLab repository
|
* [flux bootstrap gitlab](flux_bootstrap_gitlab.md) - Bootstrap toolkit components in a GitLab repository
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk bootstrap github
|
## flux bootstrap github
|
||||||
|
|
||||||
Bootstrap toolkit components in a GitHub repository
|
Bootstrap toolkit components in a GitHub repository
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ If the toolkit components are present on the cluster,
|
|||||||
the bootstrap command will perform an upgrade if needed.
|
the bootstrap command will perform an upgrade if needed.
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk bootstrap github [flags]
|
flux bootstrap github [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@ -21,22 +21,22 @@ gotk bootstrap github [flags]
|
|||||||
export GITHUB_TOKEN=<my-token>
|
export GITHUB_TOKEN=<my-token>
|
||||||
|
|
||||||
# Run bootstrap for a private repo owned by a GitHub organization
|
# Run bootstrap for a private repo owned by a GitHub organization
|
||||||
gotk bootstrap github --owner=<organization> --repository=<repo name>
|
flux bootstrap github --owner=<organization> --repository=<repo name>
|
||||||
|
|
||||||
# Run bootstrap for a private repo and assign organization teams to it
|
# Run bootstrap for a private repo and assign organization teams to it
|
||||||
gotk bootstrap github --owner=<organization> --repository=<repo name> --team=<team1 slug> --team=<team2 slug>
|
flux bootstrap github --owner=<organization> --repository=<repo name> --team=<team1 slug> --team=<team2 slug>
|
||||||
|
|
||||||
# Run bootstrap for a repository path
|
# Run bootstrap for a repository path
|
||||||
gotk bootstrap github --owner=<organization> --repository=<repo name> --path=dev-cluster
|
flux bootstrap github --owner=<organization> --repository=<repo name> --path=dev-cluster
|
||||||
|
|
||||||
# Run bootstrap for a public repository on a personal account
|
# Run bootstrap for a public repository on a personal account
|
||||||
gotk bootstrap github --owner=<user> --repository=<repo name> --private=false --personal=true
|
flux bootstrap github --owner=<user> --repository=<repo name> --private=false --personal=true
|
||||||
|
|
||||||
# Run bootstrap for a private repo hosted on GitHub Enterprise
|
# Run bootstrap for a private repo hosted on GitHub Enterprise
|
||||||
gotk bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain>
|
flux bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain>
|
||||||
|
|
||||||
# Run bootstrap for a an existing repository with a branch named main
|
# Run bootstrap for a an existing repository with a branch named main
|
||||||
gotk bootstrap github --owner=<organization> --repository=<repo name> --branch=main
|
flux bootstrap github --owner=<organization> --repository=<repo name> --branch=main
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -74,5 +74,5 @@ gotk bootstrap github [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk bootstrap](gotk_bootstrap.md) - Bootstrap toolkit components
|
* [flux bootstrap](flux_bootstrap.md) - Bootstrap toolkit components
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk bootstrap gitlab
|
## flux bootstrap gitlab
|
||||||
|
|
||||||
Bootstrap toolkit components in a GitLab repository
|
Bootstrap toolkit components in a GitLab repository
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ If the toolkit components are present on the cluster,
|
|||||||
the bootstrap command will perform an upgrade if needed.
|
the bootstrap command will perform an upgrade if needed.
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk bootstrap gitlab [flags]
|
flux bootstrap gitlab [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@ -21,22 +21,22 @@ gotk bootstrap gitlab [flags]
|
|||||||
export GITLAB_TOKEN=<my-token>
|
export GITLAB_TOKEN=<my-token>
|
||||||
|
|
||||||
# Run bootstrap for a private repo using HTTPS token authentication
|
# Run bootstrap for a private repo using HTTPS token authentication
|
||||||
gotk bootstrap gitlab --owner=<group> --repository=<repo name>
|
flux bootstrap gitlab --owner=<group> --repository=<repo name>
|
||||||
|
|
||||||
# Run bootstrap for a private repo using SSH authentication
|
# Run bootstrap for a private repo using SSH authentication
|
||||||
gotk bootstrap gitlab --owner=<group> --repository=<repo name> --ssh-hostname=gitlab.com
|
flux bootstrap gitlab --owner=<group> --repository=<repo name> --ssh-hostname=gitlab.com
|
||||||
|
|
||||||
# Run bootstrap for a repository path
|
# Run bootstrap for a repository path
|
||||||
gotk bootstrap gitlab --owner=<group> --repository=<repo name> --path=dev-cluster
|
flux bootstrap gitlab --owner=<group> --repository=<repo name> --path=dev-cluster
|
||||||
|
|
||||||
# Run bootstrap for a public repository on a personal account
|
# Run bootstrap for a public repository on a personal account
|
||||||
gotk bootstrap gitlab --owner=<user> --repository=<repo name> --private=false --personal=true
|
flux bootstrap gitlab --owner=<user> --repository=<repo name> --private=false --personal=true
|
||||||
|
|
||||||
# Run bootstrap for a private repo hosted on a GitLab server
|
# Run bootstrap for a private repo hosted on a GitLab server
|
||||||
gotk bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain>
|
flux bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain>
|
||||||
|
|
||||||
# Run bootstrap for a an existing repository with a branch named main
|
# Run bootstrap for a an existing repository with a branch named main
|
||||||
gotk bootstrap gitlab --owner=<organization> --repository=<repo name> --branch=main
|
flux bootstrap gitlab --owner=<organization> --repository=<repo name> --branch=main
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -74,5 +74,5 @@ gotk bootstrap gitlab [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk bootstrap](gotk_bootstrap.md) - Bootstrap toolkit components
|
* [flux bootstrap](flux_bootstrap.md) - Bootstrap toolkit components
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk check
|
## flux check
|
||||||
|
|
||||||
Check requirements and installation
|
Check requirements and installation
|
||||||
|
|
||||||
@ -8,17 +8,17 @@ The check command will perform a series of checks to validate that
|
|||||||
the local environment is configured correctly and if the installed components are healthy.
|
the local environment is configured correctly and if the installed components are healthy.
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk check [flags]
|
flux check [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```
|
```
|
||||||
# Run pre-installation checks
|
# Run pre-installation checks
|
||||||
gotk check --pre
|
flux check --pre
|
||||||
|
|
||||||
# Run installation checks
|
# Run installation checks
|
||||||
gotk check
|
flux check
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -41,5 +41,5 @@ gotk check [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines
|
* [flux](flux.md) - Command line utility for assembling Kubernetes CD pipelines
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk completion
|
## flux completion
|
||||||
|
|
||||||
Generates completion scripts for various shells
|
Generates completion scripts for various shells
|
||||||
|
|
||||||
@ -23,9 +23,9 @@ The completion sub-command generates completion scripts for various shells
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines
|
* [flux](flux.md) - Command line utility for assembling Kubernetes CD pipelines
|
||||||
* [gotk completion bash](gotk_completion_bash.md) - Generates bash completion scripts
|
* [flux completion bash](flux_completion_bash.md) - Generates bash completion scripts
|
||||||
* [gotk completion fish](gotk_completion_fish.md) - Generates fish completion scripts
|
* [flux completion fish](flux_completion_fish.md) - Generates fish completion scripts
|
||||||
* [gotk completion powershell](gotk_completion_powershell.md) - Generates powershell completion scripts
|
* [flux completion powershell](flux_completion_powershell.md) - Generates powershell completion scripts
|
||||||
* [gotk completion zsh](gotk_completion_zsh.md) - Generates zsh completion scripts
|
* [flux completion zsh](flux_completion_zsh.md) - Generates zsh completion scripts
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk completion bash
|
## flux completion bash
|
||||||
|
|
||||||
Generates bash completion scripts
|
Generates bash completion scripts
|
||||||
|
|
||||||
@ -7,7 +7,7 @@ Generates bash completion scripts
|
|||||||
Generates bash completion scripts
|
Generates bash completion scripts
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk completion bash [flags]
|
flux completion bash [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@ -15,12 +15,12 @@ gotk completion bash [flags]
|
|||||||
```
|
```
|
||||||
To load completion run
|
To load completion run
|
||||||
|
|
||||||
. <(gotk completion bash)
|
. <(flux completion bash)
|
||||||
|
|
||||||
To configure your bash shell to load completions for each session add to your bashrc
|
To configure your bash shell to load completions for each session add to your bashrc
|
||||||
|
|
||||||
# ~/.bashrc or ~/.profile
|
# ~/.bashrc or ~/.profile
|
||||||
command -v gotk >/dev/null && . <(gotk completion bash)
|
command -v flux >/dev/null && . <(flux completion bash)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -41,5 +41,5 @@ command -v gotk >/dev/null && . <(gotk completion bash)
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk completion](gotk_completion.md) - Generates completion scripts for various shells
|
* [flux completion](flux_completion.md) - Generates completion scripts for various shells
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk completion fish
|
## flux completion fish
|
||||||
|
|
||||||
Generates fish completion scripts
|
Generates fish completion scripts
|
||||||
|
|
||||||
@ -7,7 +7,7 @@ Generates fish completion scripts
|
|||||||
Generates fish completion scripts
|
Generates fish completion scripts
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk completion fish [flags]
|
flux completion fish [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@ -15,11 +15,11 @@ gotk completion fish [flags]
|
|||||||
```
|
```
|
||||||
To load completion run
|
To load completion run
|
||||||
|
|
||||||
. <(gotk completion fish)
|
. <(flux completion fish)
|
||||||
|
|
||||||
To configure your fish shell to load completions for each session write this script to your completions dir:
|
To configure your fish shell to load completions for each session write this script to your completions dir:
|
||||||
|
|
||||||
gotk completion fish > ~/.config/fish/completions/gotk
|
flux completion fish > ~/.config/fish/completions/flux
|
||||||
|
|
||||||
See http://fishshell.com/docs/current/index.html#completion-own for more details
|
See http://fishshell.com/docs/current/index.html#completion-own for more details
|
||||||
|
|
||||||
@ -42,5 +42,5 @@ See http://fishshell.com/docs/current/index.html#completion-own for more details
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk completion](gotk_completion.md) - Generates completion scripts for various shells
|
* [flux completion](flux_completion.md) - Generates completion scripts for various shells
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk completion powershell
|
## flux completion powershell
|
||||||
|
|
||||||
Generates powershell completion scripts
|
Generates powershell completion scripts
|
||||||
|
|
||||||
@ -7,7 +7,7 @@ Generates powershell completion scripts
|
|||||||
Generates powershell completion scripts
|
Generates powershell completion scripts
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk completion powershell [flags]
|
flux completion powershell [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@ -15,19 +15,19 @@ gotk completion powershell [flags]
|
|||||||
```
|
```
|
||||||
To load completion run
|
To load completion run
|
||||||
|
|
||||||
. <(gotk completion powershell)
|
. <(flux completion powershell)
|
||||||
|
|
||||||
To configure your powershell shell to load completions for each session add to your powershell profile
|
To configure your powershell shell to load completions for each session add to your powershell profile
|
||||||
|
|
||||||
Windows:
|
Windows:
|
||||||
|
|
||||||
cd "$env:USERPROFILE\Documents\WindowsPowerShell\Modules"
|
cd "$env:USERPROFILE\Documents\WindowsPowerShell\Modules"
|
||||||
gotk completion >> gotk-completion.ps1
|
flux completion >> flux-completion.ps1
|
||||||
|
|
||||||
Linux:
|
Linux:
|
||||||
|
|
||||||
cd "${XDG_CONFIG_HOME:-"$HOME/.config/"}/powershell/modules"
|
cd "${XDG_CONFIG_HOME:-"$HOME/.config/"}/powershell/modules"
|
||||||
gotk completion >> gotk-completions.ps1
|
flux completion >> flux-completions.ps1
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -48,5 +48,5 @@ gotk completion >> gotk-completions.ps1
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk completion](gotk_completion.md) - Generates completion scripts for various shells
|
* [flux completion](flux_completion.md) - Generates completion scripts for various shells
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk completion zsh
|
## flux completion zsh
|
||||||
|
|
||||||
Generates zsh completion scripts
|
Generates zsh completion scripts
|
||||||
|
|
||||||
@ -7,7 +7,7 @@ Generates zsh completion scripts
|
|||||||
Generates zsh completion scripts
|
Generates zsh completion scripts
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk completion zsh [flags]
|
flux completion zsh [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@ -15,20 +15,20 @@ gotk completion zsh [flags]
|
|||||||
```
|
```
|
||||||
To load completion run
|
To load completion run
|
||||||
|
|
||||||
. <(gotk completion zsh) && compdef _gotk gotk
|
. <(flux completion zsh) && compdef _flux flux
|
||||||
|
|
||||||
To configure your zsh shell to load completions for each session add to your zshrc
|
To configure your zsh shell to load completions for each session add to your zshrc
|
||||||
|
|
||||||
# ~/.zshrc or ~/.profile
|
# ~/.zshrc or ~/.profile
|
||||||
command -v gotk >/dev/null && . <(gotk completion zsh) && compdef _gotk gotk
|
command -v flux >/dev/null && . <(flux completion zsh) && compdef _flux flux
|
||||||
|
|
||||||
or write a cached file in one of the completion directories in your ${fpath}:
|
or write a cached file in one of the completion directories in your ${fpath}:
|
||||||
|
|
||||||
echo "${fpath// /\n}" | grep -i completion
|
echo "${fpath// /\n}" | grep -i completion
|
||||||
gotk completions zsh > _gotk
|
flux completions zsh > _flux
|
||||||
|
|
||||||
mv _gotk ~/.oh-my-zsh/completions # oh-my-zsh
|
mv _flux ~/.oh-my-zsh/completions # oh-my-zsh
|
||||||
mv _gotk ~/.zprezto/modules/completion/external/src/ # zprezto
|
mv _flux ~/.zprezto/modules/completion/external/src/ # zprezto
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -49,5 +49,5 @@ mv _gotk ~/.zprezto/modules/completion/external/src/ # zprezto
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk completion](gotk_completion.md) - Generates completion scripts for various shells
|
* [flux completion](flux_completion.md) - Generates completion scripts for various shells
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk create
|
## flux create
|
||||||
|
|
||||||
Create or update sources and resources
|
Create or update sources and resources
|
||||||
|
|
||||||
@ -26,11 +26,11 @@ The create sub-commands generate sources and resources.
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines
|
* [flux](flux.md) - Command line utility for assembling Kubernetes CD pipelines
|
||||||
* [gotk create alert](gotk_create_alert.md) - Create or update a Alert resource
|
* [flux create alert](flux_create_alert.md) - Create or update a Alert resource
|
||||||
* [gotk create alert-provider](gotk_create_alert-provider.md) - Create or update a Provider resource
|
* [flux create alert-provider](flux_create_alert-provider.md) - Create or update a Provider resource
|
||||||
* [gotk create helmrelease](gotk_create_helmrelease.md) - Create or update a HelmRelease resource
|
* [flux create helmrelease](flux_create_helmrelease.md) - Create or update a HelmRelease resource
|
||||||
* [gotk create kustomization](gotk_create_kustomization.md) - Create or update a Kustomization resource
|
* [flux create kustomization](flux_create_kustomization.md) - Create or update a Kustomization resource
|
||||||
* [gotk create receiver](gotk_create_receiver.md) - Create or update a Receiver resource
|
* [flux create receiver](flux_create_receiver.md) - Create or update a Receiver resource
|
||||||
* [gotk create source](gotk_create_source.md) - Create or update sources
|
* [flux create source](flux_create_source.md) - Create or update sources
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk create alert-provider
|
## flux create alert-provider
|
||||||
|
|
||||||
Create or update a Provider resource
|
Create or update a Provider resource
|
||||||
|
|
||||||
@ -7,21 +7,21 @@ Create or update a Provider resource
|
|||||||
The create alert-provider command generates a Provider resource.
|
The create alert-provider command generates a Provider resource.
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk create alert-provider [name] [flags]
|
flux create alert-provider [name] [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```
|
```
|
||||||
# Create a Provider for a Slack channel
|
# Create a Provider for a Slack channel
|
||||||
gotk create alert-provider slack \
|
flux create alert-provider slack \
|
||||||
--type slack \
|
--type slack \
|
||||||
--channel general \
|
--channel general \
|
||||||
--address https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
|
--address https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
|
||||||
--secret-ref webhook-url
|
--secret-ref webhook-url
|
||||||
|
|
||||||
# Create a Provider for a Github repository
|
# Create a Provider for a Github repository
|
||||||
gotk create alert-provider github-podinfo \
|
flux create alert-provider github-podinfo \
|
||||||
--type github \
|
--type github \
|
||||||
--address https://github.com/stefanprodan/podinfo \
|
--address https://github.com/stefanprodan/podinfo \
|
||||||
--secret-ref github-token
|
--secret-ref github-token
|
||||||
@ -53,5 +53,5 @@ gotk create alert-provider [name] [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk create](gotk_create.md) - Create or update sources and resources
|
* [flux create](flux_create.md) - Create or update sources and resources
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk create alert
|
## flux create alert
|
||||||
|
|
||||||
Create or update a Alert resource
|
Create or update a Alert resource
|
||||||
|
|
||||||
@ -7,14 +7,14 @@ Create or update a Alert resource
|
|||||||
The create alert command generates a Alert resource.
|
The create alert command generates a Alert resource.
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk create alert [name] [flags]
|
flux create alert [name] [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```
|
```
|
||||||
# Create an Alert for kustomization events
|
# Create an Alert for kustomization events
|
||||||
gotk create alert \
|
flux create alert \
|
||||||
--event-severity info \
|
--event-severity info \
|
||||||
--event-source Kustomization/flux-system \
|
--event-source Kustomization/flux-system \
|
||||||
--provider-ref slack \
|
--provider-ref slack \
|
||||||
@ -45,5 +45,5 @@ gotk create alert [name] [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk create](gotk_create.md) - Create or update sources and resources
|
* [flux create](flux_create.md) - Create or update sources and resources
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk create helmrelease
|
## flux create helmrelease
|
||||||
|
|
||||||
Create or update a HelmRelease resource
|
Create or update a HelmRelease resource
|
||||||
|
|
||||||
@ -7,51 +7,51 @@ Create or update a HelmRelease resource
|
|||||||
The helmrelease create command generates a HelmRelease resource for a given HelmRepository source.
|
The helmrelease create command generates a HelmRelease resource for a given HelmRepository source.
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk create helmrelease [name] [flags]
|
flux create helmrelease [name] [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```
|
```
|
||||||
# Create a HelmRelease with a chart from a HelmRepository source
|
# Create a HelmRelease with a chart from a HelmRepository source
|
||||||
gotk create hr podinfo \
|
flux create hr podinfo \
|
||||||
--interval=10m \
|
--interval=10m \
|
||||||
--source=HelmRepository/podinfo \
|
--source=HelmRepository/podinfo \
|
||||||
--chart=podinfo \
|
--chart=podinfo \
|
||||||
--chart-version=">4.0.0"
|
--chart-version=">4.0.0"
|
||||||
|
|
||||||
# Create a HelmRelease with a chart from a GitRepository source
|
# Create a HelmRelease with a chart from a GitRepository source
|
||||||
gotk create hr podinfo \
|
flux create hr podinfo \
|
||||||
--interval=10m \
|
--interval=10m \
|
||||||
--source=GitRepository/podinfo \
|
--source=GitRepository/podinfo \
|
||||||
--chart=./charts/podinfo
|
--chart=./charts/podinfo
|
||||||
|
|
||||||
# Create a HelmRelease with a chart from a Bucket source
|
# Create a HelmRelease with a chart from a Bucket source
|
||||||
gotk create hr podinfo \
|
flux create hr podinfo \
|
||||||
--interval=10m \
|
--interval=10m \
|
||||||
--source=Bucket/podinfo \
|
--source=Bucket/podinfo \
|
||||||
--chart=./charts/podinfo
|
--chart=./charts/podinfo
|
||||||
|
|
||||||
# Create a HelmRelease with values from a local YAML file
|
# Create a HelmRelease with values from a local YAML file
|
||||||
gotk create hr podinfo \
|
flux create hr podinfo \
|
||||||
--source=HelmRepository/podinfo \
|
--source=HelmRepository/podinfo \
|
||||||
--chart=podinfo \
|
--chart=podinfo \
|
||||||
--values=./my-values.yaml
|
--values=./my-values.yaml
|
||||||
|
|
||||||
# Create a HelmRelease with a custom release name
|
# Create a HelmRelease with a custom release name
|
||||||
gotk create hr podinfo \
|
flux create hr podinfo \
|
||||||
--release-name=podinfo-dev
|
--release-name=podinfo-dev
|
||||||
--source=HelmRepository/podinfo \
|
--source=HelmRepository/podinfo \
|
||||||
--chart=podinfo \
|
--chart=podinfo \
|
||||||
|
|
||||||
# Create a HelmRelease targeting another namespace than the resource
|
# Create a HelmRelease targeting another namespace than the resource
|
||||||
gotk create hr podinfo \
|
flux create hr podinfo \
|
||||||
--target-namespace=default \
|
--target-namespace=default \
|
||||||
--source=HelmRepository/podinfo \
|
--source=HelmRepository/podinfo \
|
||||||
--chart=podinfo
|
--chart=podinfo
|
||||||
|
|
||||||
# Create a HelmRelease definition on disk without applying it on the cluster
|
# Create a HelmRelease definition on disk without applying it on the cluster
|
||||||
gotk create hr podinfo \
|
flux create hr podinfo \
|
||||||
--source=HelmRepository/podinfo \
|
--source=HelmRepository/podinfo \
|
||||||
--chart=podinfo \
|
--chart=podinfo \
|
||||||
--values=./values.yaml \
|
--values=./values.yaml \
|
||||||
@ -86,5 +86,5 @@ gotk create helmrelease [name] [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk create](gotk_create.md) - Create or update sources and resources
|
* [flux create](flux_create.md) - Create or update sources and resources
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk create kustomization
|
## flux create kustomization
|
||||||
|
|
||||||
Create or update a Kustomization resource
|
Create or update a Kustomization resource
|
||||||
|
|
||||||
@ -7,14 +7,14 @@ Create or update a Kustomization resource
|
|||||||
The kustomization source create command generates a Kustomize resource for a given source.
|
The kustomization source create command generates a Kustomize resource for a given source.
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk create kustomization [name] [flags]
|
flux create kustomization [name] [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```
|
```
|
||||||
# Create a Kustomization resource from a source at a given path
|
# Create a Kustomization resource from a source at a given path
|
||||||
gotk create kustomization contour \
|
flux create kustomization contour \
|
||||||
--source=contour \
|
--source=contour \
|
||||||
--path="./examples/contour/" \
|
--path="./examples/contour/" \
|
||||||
--prune=true \
|
--prune=true \
|
||||||
@ -25,7 +25,7 @@ gotk create kustomization [name] [flags]
|
|||||||
--health-check-timeout=3m
|
--health-check-timeout=3m
|
||||||
|
|
||||||
# Create a Kustomization resource that depends on the previous one
|
# Create a Kustomization resource that depends on the previous one
|
||||||
gotk create kustomization webapp \
|
flux create kustomization webapp \
|
||||||
--depends-on=contour \
|
--depends-on=contour \
|
||||||
--source=webapp \
|
--source=webapp \
|
||||||
--path="./deploy/overlays/dev" \
|
--path="./deploy/overlays/dev" \
|
||||||
@ -34,7 +34,7 @@ gotk create kustomization [name] [flags]
|
|||||||
--validation=client
|
--validation=client
|
||||||
|
|
||||||
# Create a Kustomization resource that references a Bucket
|
# Create a Kustomization resource that references a Bucket
|
||||||
gotk create kustomization secrets \
|
flux create kustomization secrets \
|
||||||
--source=Bucket/secrets \
|
--source=Bucket/secrets \
|
||||||
--prune=true \
|
--prune=true \
|
||||||
--interval=5m
|
--interval=5m
|
||||||
@ -72,5 +72,5 @@ gotk create kustomization [name] [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk create](gotk_create.md) - Create or update sources and resources
|
* [flux create](flux_create.md) - Create or update sources and resources
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk create receiver
|
## flux create receiver
|
||||||
|
|
||||||
Create or update a Receiver resource
|
Create or update a Receiver resource
|
||||||
|
|
||||||
@ -7,14 +7,14 @@ Create or update a Receiver resource
|
|||||||
The create receiver command generates a Receiver resource.
|
The create receiver command generates a Receiver resource.
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk create receiver [name] [flags]
|
flux create receiver [name] [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```
|
```
|
||||||
# Create a Receiver
|
# Create a Receiver
|
||||||
gotk create receiver github-receiver \
|
flux create receiver github-receiver \
|
||||||
--type github \
|
--type github \
|
||||||
--event ping \
|
--event ping \
|
||||||
--event push \
|
--event push \
|
||||||
@ -48,5 +48,5 @@ gotk create receiver [name] [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk create](gotk_create.md) - Create or update sources and resources
|
* [flux create](flux_create.md) - Create or update sources and resources
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk create source
|
## flux create source
|
||||||
|
|
||||||
Create or update sources
|
Create or update sources
|
||||||
|
|
||||||
@ -26,8 +26,8 @@ The create source sub-commands generate sources.
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk create](gotk_create.md) - Create or update sources and resources
|
* [flux create](flux_create.md) - Create or update sources and resources
|
||||||
* [gotk create source bucket](gotk_create_source_bucket.md) - Create or update a Bucket source
|
* [flux create source bucket](flux_create_source_bucket.md) - Create or update a Bucket source
|
||||||
* [gotk create source git](gotk_create_source_git.md) - Create or update a GitRepository source
|
* [flux create source git](flux_create_source_git.md) - Create or update a GitRepository source
|
||||||
* [gotk create source helm](gotk_create_source_helm.md) - Create or update a HelmRepository source
|
* [flux create source helm](flux_create_source_helm.md) - Create or update a HelmRepository source
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk create source bucket
|
## flux create source bucket
|
||||||
|
|
||||||
Create or update a Bucket source
|
Create or update a Bucket source
|
||||||
|
|
||||||
@ -9,14 +9,14 @@ The create source bucket command generates a Bucket resource and waits for it to
|
|||||||
For Buckets with static authentication, the credentials are stored in a Kubernetes secret.
|
For Buckets with static authentication, the credentials are stored in a Kubernetes secret.
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk create source bucket [name] [flags]
|
flux create source bucket [name] [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```
|
```
|
||||||
# Create a source from a Buckets using static authentication
|
# Create a source from a Buckets using static authentication
|
||||||
gotk create source bucket podinfo \
|
flux create source bucket podinfo \
|
||||||
--bucket-name=podinfo \
|
--bucket-name=podinfo \
|
||||||
--endpoint=minio.minio.svc.cluster.local:9000 \
|
--endpoint=minio.minio.svc.cluster.local:9000 \
|
||||||
--insecure=true \
|
--insecure=true \
|
||||||
@ -25,7 +25,7 @@ gotk create source bucket [name] [flags]
|
|||||||
--interval=10m
|
--interval=10m
|
||||||
|
|
||||||
# Create a source from an Amazon S3 Bucket using IAM authentication
|
# Create a source from an Amazon S3 Bucket using IAM authentication
|
||||||
gotk create source bucket podinfo \
|
flux create source bucket podinfo \
|
||||||
--bucket-name=podinfo \
|
--bucket-name=podinfo \
|
||||||
--provider=aws \
|
--provider=aws \
|
||||||
--endpoint=s3.amazonaws.com \
|
--endpoint=s3.amazonaws.com \
|
||||||
@ -62,5 +62,5 @@ gotk create source bucket [name] [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk create source](gotk_create_source.md) - Create or update sources
|
* [flux create source](flux_create_source.md) - Create or update sources
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk create source git
|
## flux create source git
|
||||||
|
|
||||||
Create or update a GitRepository source
|
Create or update a GitRepository source
|
||||||
|
|
||||||
@ -10,42 +10,42 @@ For Git over SSH, host and SSH keys are automatically generated and stored in a
|
|||||||
For private Git repositories, the basic authentication credentials are stored in a Kubernetes secret.
|
For private Git repositories, the basic authentication credentials are stored in a Kubernetes secret.
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk create source git [name] [flags]
|
flux create source git [name] [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```
|
```
|
||||||
# Create a source from a public Git repository master branch
|
# Create a source from a public Git repository master branch
|
||||||
gotk create source git podinfo \
|
flux create source git podinfo \
|
||||||
--url=https://github.com/stefanprodan/podinfo \
|
--url=https://github.com/stefanprodan/podinfo \
|
||||||
--branch=master
|
--branch=master
|
||||||
|
|
||||||
# Create a source from a Git repository pinned to specific git tag
|
# Create a source from a Git repository pinned to specific git tag
|
||||||
gotk create source git podinfo \
|
flux create source git podinfo \
|
||||||
--url=https://github.com/stefanprodan/podinfo \
|
--url=https://github.com/stefanprodan/podinfo \
|
||||||
--tag="3.2.3"
|
--tag="3.2.3"
|
||||||
|
|
||||||
# Create a source from a public Git repository tag that matches a semver range
|
# Create a source from a public Git repository tag that matches a semver range
|
||||||
gotk create source git podinfo \
|
flux create source git podinfo \
|
||||||
--url=https://github.com/stefanprodan/podinfo \
|
--url=https://github.com/stefanprodan/podinfo \
|
||||||
--tag-semver=">=3.2.0 <3.3.0"
|
--tag-semver=">=3.2.0 <3.3.0"
|
||||||
|
|
||||||
# Create a source from a Git repository using SSH authentication
|
# Create a source from a Git repository using SSH authentication
|
||||||
gotk create source git podinfo \
|
flux create source git podinfo \
|
||||||
--url=ssh://git@github.com/stefanprodan/podinfo \
|
--url=ssh://git@github.com/stefanprodan/podinfo \
|
||||||
--branch=master
|
--branch=master
|
||||||
|
|
||||||
# Create a source from a Git repository using SSH authentication and an
|
# Create a source from a Git repository using SSH authentication and an
|
||||||
# ECDSA P-521 curve public key
|
# ECDSA P-521 curve public key
|
||||||
gotk create source git podinfo \
|
flux create source git podinfo \
|
||||||
--url=ssh://git@github.com/stefanprodan/podinfo \
|
--url=ssh://git@github.com/stefanprodan/podinfo \
|
||||||
--branch=master \
|
--branch=master \
|
||||||
--ssh-key-algorithm=ecdsa \
|
--ssh-key-algorithm=ecdsa \
|
||||||
--ssh-ecdsa-curve=p521
|
--ssh-ecdsa-curve=p521
|
||||||
|
|
||||||
# Create a source from a Git repository using basic authentication
|
# Create a source from a Git repository using basic authentication
|
||||||
gotk create source git podinfo \
|
flux create source git podinfo \
|
||||||
--url=https://github.com/stefanprodan/podinfo \
|
--url=https://github.com/stefanprodan/podinfo \
|
||||||
--username=username \
|
--username=username \
|
||||||
--password=password
|
--password=password
|
||||||
@ -82,5 +82,5 @@ gotk create source git [name] [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk create source](gotk_create_source.md) - Create or update sources
|
* [flux create source](flux_create_source.md) - Create or update sources
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
## gotk create source helm
|
## flux create source helm
|
||||||
|
|
||||||
Create or update a HelmRepository source
|
Create or update a HelmRepository source
|
||||||
|
|
||||||
@ -9,25 +9,25 @@ The create source helm command generates a HelmRepository resource and waits for
|
|||||||
For private Helm repositories, the basic authentication credentials are stored in a Kubernetes secret.
|
For private Helm repositories, the basic authentication credentials are stored in a Kubernetes secret.
|
||||||
|
|
||||||
```
|
```
|
||||||
gotk create source helm [name] [flags]
|
flux create source helm [name] [flags]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```
|
```
|
||||||
# Create a source from a public Helm repository
|
# Create a source from a public Helm repository
|
||||||
gotk create source helm podinfo \
|
flux create source helm podinfo \
|
||||||
--url=https://stefanprodan.github.io/podinfo \
|
--url=https://stefanprodan.github.io/podinfo \
|
||||||
--interval=10m
|
--interval=10m
|
||||||
|
|
||||||
# Create a source from a Helm repository using basic authentication
|
# Create a source from a Helm repository using basic authentication
|
||||||
gotk create source helm podinfo \
|
flux create source helm podinfo \
|
||||||
--url=https://stefanprodan.github.io/podinfo \
|
--url=https://stefanprodan.github.io/podinfo \
|
||||||
--username=username \
|
--username=username \
|
||||||
--password=password
|
--password=password
|
||||||
|
|
||||||
# Create a source from a Helm repository using TLS authentication
|
# Create a source from a Helm repository using TLS authentication
|
||||||
gotk create source helm podinfo \
|
flux create source helm podinfo \
|
||||||
--url=https://stefanprodan.github.io/podinfo \
|
--url=https://stefanprodan.github.io/podinfo \
|
||||||
--cert-file=./cert.crt \
|
--cert-file=./cert.crt \
|
||||||
--key-file=./key.crt \
|
--key-file=./key.crt \
|
||||||
@ -62,5 +62,5 @@ gotk create source helm [name] [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [gotk create source](gotk_create_source.md) - Create or update sources
|
* [flux create source](flux_create_source.md) - Create or update sources
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user