Rename `tk` binary to `gotk`

To avoid conflicts with the `tk` binary from the Tanka project.
pull/180/head
Hidde Beydals 4 years ago
parent cb23d3ff3c
commit 22624ae4d5

@ -53,7 +53,7 @@ jobs:
{ {
# install script # install script
cp install/tk.sh docs/install.sh cp install/gotk.sh docs/install.sh
} }
- name: Deploy docs - name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master uses: mhausenblas/mkdocs-deploy-gh-pages@master

@ -37,30 +37,30 @@ jobs:
exit 1 exit 1
fi fi
- name: Build - name: Build
run: sudo go build -o ./bin/tk ./cmd/tk run: sudo go build -o ./bin/gotk ./cmd/gotk
- name: tk check --pre - name: gotk check --pre
run: | run: |
./bin/tk check --pre ./bin/gotk check --pre
- name: tk install --version - name: gotk install --version
run: | run: |
./bin/tk install --version=master --namespace=test --verbose --components="source-controller,kustomize-controller" ./bin/gotk install --version=master --namespace=test --verbose --components="source-controller,kustomize-controller"
- name: tk uninstall - name: gotk uninstall
run: | run: |
./bin/tk uninstall --namespace=test --crds --silent ./bin/gotk uninstall --namespace=test --crds --silent
- name: tk install --manifests - name: gotk install --manifests
run: | run: |
./bin/tk install --manifests ./manifests/install/ --version="" ./bin/gotk install --manifests ./manifests/install/ --version=""
- name: tk create source git - name: gotk create source git
run: | run: |
./bin/tk create source git podinfo \ ./bin/gotk 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: tk get sources git - name: gotk get sources git
run: | run: |
./bin/tk get sources git ./bin/gotk get sources git
- name: tk create kustomization - name: gotk create kustomization
run: | run: |
./bin/tk create kustomization podinfo \ ./bin/gotk create kustomization podinfo \
--source=podinfo \ --source=podinfo \
--path="./deploy/overlays/dev" \ --path="./deploy/overlays/dev" \
--prune=true \ --prune=true \
@ -69,54 +69,54 @@ 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: tk sync kustomization --with-source - name: gotk sync kustomization --with-source
run: | run: |
./bin/tk reconcile kustomization podinfo --with-source ./bin/gotk reconcile kustomization podinfo --with-source
- name: tk get kustomizations - name: gotk get kustomizations
run: | run: |
./bin/tk get kustomizations ./bin/gotk get kustomizations
- name: tk suspend kustomization - name: gotk suspend kustomization
run: | run: |
./bin/tk suspend kustomization podinfo ./bin/gotk suspend kustomization podinfo
- name: tk resume kustomization - name: gotk resume kustomization
run: | run: |
./bin/tk resume kustomization podinfo ./bin/gotk resume kustomization podinfo
- name: tk export - name: gotk export
run: | run: |
./bin/tk export source git --all ./bin/gotk export source git --all
./bin/tk export kustomization --all ./bin/gotk export kustomization --all
- name: tk delete kustomization - name: gotk delete kustomization
run: | run: |
./bin/tk delete kustomization podinfo --silent ./bin/gotk delete kustomization podinfo --silent
- name: tk delete source git - name: gotk delete source git
run: | run: |
./bin/tk delete source git podinfo --silent ./bin/gotk delete source git podinfo --silent
- name: tk create source helm - name: gotk create source helm
run: | run: |
./bin/tk create source helm podinfo \ ./bin/gotk create source helm podinfo \
--url https://stefanprodan.github.io/podinfo --url https://stefanprodan.github.io/podinfo
- name: tk create helmrelease - name: gotk create helmrelease
run: | run: |
./bin/tk create hr podinfo \ ./bin/gotk create hr podinfo \
--target-namespace=default \ --target-namespace=default \
--source=podinfo \ --source=podinfo \
--chart-name=podinfo \ --chart-name=podinfo \
--chart-version=">4.0.0 <5.0.0" --chart-version=">4.0.0 <5.0.0"
- name: tk get helmreleases - name: gotk get helmreleases
run: | run: |
./bin/tk get helmreleases ./bin/gotk get helmreleases
- name: tk export helmrelease - name: gotk export helmrelease
run: | run: |
./bin/tk export hr --all ./bin/gotk export hr --all
- name: tk delete helmrelease - name: gotk delete helmrelease
run: | run: |
./bin/tk delete hr podinfo --silent ./bin/gotk delete hr podinfo --silent
- name: tk delete source helm - name: gotk delete source helm
run: | run: |
./bin/tk delete source helm podinfo --silent ./bin/gotk delete source helm podinfo --silent
- name: tk check - name: gotk check
run: | run: |
./bin/tk check ./bin/gotk check
- name: Debug failure - name: Debug failure
if: failure() if: failure()
run: | run: |

@ -1,8 +1,8 @@
builds: builds:
- main: ./cmd/tk - main: ./cmd/gotk
ldflags: ldflags:
- -s -w -X main.VERSION={{ .Version }} - -s -w -X main.VERSION={{ .Version }}
binary: tk binary: gotk
goos: goos:
- darwin - darwin
- linux - linux

@ -1,4 +1,4 @@
VERSION?=$(shell grep 'VERSION' cmd/tk/main.go | awk '{ print $$4 }' | tr -d '"') VERSION?=$(shell grep 'VERSION' cmd/gotk/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/tk ./cmd/tk CGO_ENABLED=0 go build -o ./bin/gotk ./cmd/gotk
install: install:
go install cmd/tk go install cmd/gotk
.PHONY: docs .PHONY: docs
docs: docs:
mkdir -p ./docs/cmd && go run ./cmd/tk/ docgen mkdir -p ./docs/cmd && go run ./cmd/gotk/ docgen
install-dev: install-dev:
CGO_ENABLED=0 go build -o /usr/local/bin ./cmd/tk CGO_ENABLED=0 go build -o /usr/local/bin ./cmd/gotk

@ -7,6 +7,6 @@
Experimental toolkit for assembling CD pipelines the GitOps way. Experimental toolkit for assembling CD pipelines the GitOps way.
![overview](docs/diagrams/tk-feature.png) ![overview](docs/diagrams/gotk-feature.png)
To get started with the toolkit please read the [docs](https://toolkit.fluxcd.io/). To get started with the toolkit please read the [docs](https://toolkit.fluxcd.io/).

@ -71,14 +71,14 @@ func init() {
} }
func generateInstallManifests(targetPath, namespace, tmpDir string) (string, error) { func generateInstallManifests(targetPath, namespace, tmpDir string) (string, error) {
tkDir := path.Join(tmpDir, ".tk") gotkDir := path.Join(tmpDir, ".gotk")
defer os.RemoveAll(tkDir) defer os.RemoveAll(gotkDir)
if err := os.MkdirAll(tkDir, os.ModePerm); err != nil { if err := os.MkdirAll(gotkDir, os.ModePerm); err != nil {
return "", fmt.Errorf("generating manifests failed: %w", err) return "", fmt.Errorf("generating manifests failed: %w", err)
} }
if err := genInstallManifests(bootstrapVersion, namespace, bootstrapComponents, bootstrapRegistry, bootstrapImagePullSecret, tkDir); err != nil { if err := genInstallManifests(bootstrapVersion, namespace, bootstrapComponents, bootstrapRegistry, bootstrapImagePullSecret, gotkDir); err != nil {
return "", fmt.Errorf("generating manifests failed: %w", err) return "", fmt.Errorf("generating manifests failed: %w", err)
} }
@ -88,7 +88,7 @@ func generateInstallManifests(targetPath, namespace, tmpDir string) (string, err
} }
manifest := path.Join(manifestsDir, bootstrapInstallManifest) manifest := path.Join(manifestsDir, bootstrapInstallManifest)
if err := buildKustomization(tkDir, manifest); err != nil { if err := buildKustomization(gotkDir, manifest); err != nil {
return "", fmt.Errorf("build kustomization failed: %w", err) return "", fmt.Errorf("build kustomization failed: %w", err)
} }

@ -42,19 +42,19 @@ 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
tk bootstrap github --owner=<organization> --repository=<repo name> gotk 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
tk bootstrap github --owner=<organization> --repository=<repo name> --team=<team1 slug> --team=<team2 slug> gotk 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
tk bootstrap github --owner=<organization> --repository=<repo name> --path=dev-cluster gotk 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
tk bootstrap github --owner=<user> --repository=<repo name> --private=false --personal=true gotk 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
tk bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain> gotk bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain>
`, `,
RunE: bootstrapGitHubCmdRun, RunE: bootstrapGitHubCmdRun,
} }
@ -93,7 +93,7 @@ func bootstrapGitHubCmdRun(cmd *cobra.Command, args []string) error {
return fmt.Errorf("%s environment variable not found", git.GitHubTokenName) return fmt.Errorf("%s environment variable not found", git.GitHubTokenName)
} }
repository, err := git.NewRepository(ghRepository, ghOwner, ghHostname, ghToken, "tk", ghOwner+"@users.noreply.github.com") repository, err := git.NewRepository(ghRepository, ghOwner, ghHostname, ghToken, "gotk", ghOwner+"@users.noreply.github.com")
if err != nil { if err != nil {
return err return err
} }
@ -194,9 +194,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 := "tk" keyName := "gotk"
if ghPath != "" { if ghPath != "" {
keyName = fmt.Sprintf("tk-%s", ghPath) keyName = fmt.Sprintf("gotk-%s", ghPath)
} }
if changed, err := provider.AddDeployKey(ctx, repository, key, keyName); err != nil { if changed, err := provider.AddDeployKey(ctx, repository, key, keyName); err != nil {

@ -42,16 +42,16 @@ 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 owned by a GitLab group # Run bootstrap for a private repo owned by a GitLab group
tk bootstrap gitlab --owner=<group> --repository=<repo name> gotk bootstrap gitlab --owner=<group> --repository=<repo name>
# Run bootstrap for a repository path # Run bootstrap for a repository path
tk bootstrap gitlab --owner=<group> --repository=<repo name> --path=dev-cluster gotk 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
tk bootstrap gitlab --owner=<user> --repository=<repo name> --private=false --personal=true gotk 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
tk bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain> gotk bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain>
`, `,
RunE: bootstrapGitLabCmdRun, RunE: bootstrapGitLabCmdRun,
} }
@ -86,7 +86,7 @@ func bootstrapGitLabCmdRun(cmd *cobra.Command, args []string) error {
return fmt.Errorf("%s environment variable not found", git.GitLabTokenName) return fmt.Errorf("%s environment variable not found", git.GitLabTokenName)
} }
repository, err := git.NewRepository(glRepository, glOwner, glHostname, glToken, "tk", glOwner+"@users.noreply.gitlab.com") repository, err := git.NewRepository(glRepository, glOwner, glHostname, glToken, "gotk", glOwner+"@users.noreply.gitlab.com")
if err != nil { if err != nil {
return err return err
} }
@ -178,9 +178,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 := "tk" keyName := "gotk"
if glPath != "" { if glPath != "" {
keyName = fmt.Sprintf("tk-%s", glPath) keyName = fmt.Sprintf("gotk-%s", glPath)
} }
if changed, err := provider.AddDeployKey(ctx, repository, key, keyName); err != nil { if changed, err := provider.AddDeployKey(ctx, repository, key, keyName); err != nil {

@ -35,10 +35,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
tk check --pre gotk check --pre
# Run installation checks # Run installation checks
tk check gotk check
`, `,
RunE: runCheckCmd, RunE: runCheckCmd,
} }

@ -27,12 +27,12 @@ var completionCmd = &cobra.Command{
Short: "Generates bash completion scripts", Short: "Generates bash completion scripts",
Example: `To load completion run Example: `To load completion run
. <(tk completion) . <(gotk completion)
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
. <(tk completion) . <(gotk completion)
`, `,
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
rootCmd.GenBashCompletion(os.Stdout) rootCmd.GenBashCompletion(os.Stdout)

@ -42,7 +42,7 @@ 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 from a source Example: ` # Create a HelmRelease from a source
tk create hr podinfo \ gotk create hr podinfo \
--interval=10m \ --interval=10m \
--release-name=podinfo \ --release-name=podinfo \
--target-namespace=default \ --target-namespace=default \
@ -51,7 +51,7 @@ var createHelmReleaseCmd = &cobra.Command{
--chart-version=">4.0.0" --chart-version=">4.0.0"
# Create a HelmRelease with values for a local YAML file # Create a HelmRelease with values for a local YAML file
tk create hr podinfo \ gotk create hr podinfo \
--target-namespace=default \ --target-namespace=default \
--source=podinfo \ --source=podinfo \
--chart-name=podinfo \ --chart-name=podinfo \
@ -59,7 +59,7 @@ var createHelmReleaseCmd = &cobra.Command{
--values=./my-values.yaml --values=./my-values.yaml
# Create a HelmRelease definition on disk without applying it on the cluster # Create a HelmRelease definition on disk without applying it on the cluster
tk create hr podinfo \ gotk create hr podinfo \
--target-namespace=default \ --target-namespace=default \
--source=podinfo \ --source=podinfo \
--chart-name=podinfo \ --chart-name=podinfo \

@ -40,7 +40,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 GitRepository source.", Long: "The kustomization source create command generates a Kustomize resource for a given GitRepository 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
tk create kustomization contour \ gotk create kustomization contour \
--source=contour \ --source=contour \
--path="./examples/contour/" \ --path="./examples/contour/" \
--prune=true \ --prune=true \
@ -51,7 +51,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
tk create kustomization webapp \ gotk create kustomization webapp \
--depends-on=contour \ --depends-on=contour \
--source=webapp \ --source=webapp \
--path="./deploy/overlays/dev" \ --path="./deploy/overlays/dev" \
@ -60,7 +60,7 @@ var createKsCmd = &cobra.Command{
--validation=client --validation=client
# Create a Kustomization resource that runs under a service account # Create a Kustomization resource that runs under a service account
tk create kustomization webapp \ gotk create kustomization webapp \
--source=webapp \ --source=webapp \
--path="./deploy/overlays/staging" \ --path="./deploy/overlays/staging" \
--prune=true \ --prune=true \

@ -46,35 +46,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
tk create source git podinfo \ gotk 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
tk create source git podinfo \ gotk 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
tk create source git podinfo \ gotk 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
tk create source git podinfo \ gotk 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
tk create source git podinfo \ gotk 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
tk create source git podinfo \ gotk create source git podinfo \
--url=https://github.com/stefanprodan/podinfo \ --url=https://github.com/stefanprodan/podinfo \
--username=username \ --username=username \
--password=password --password=password

@ -40,18 +40,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
tk create source helm podinfo \ gotk 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
tk create source helm podinfo \ gotk 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
tk create source helm podinfo \ gotk 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 \

@ -33,7 +33,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
tk delete hr podinfo gotk delete hr podinfo
`, `,
RunE: deleteHelmReleaseCmdRun, RunE: deleteHelmReleaseCmdRun,
} }

@ -32,7 +32,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
tk delete kustomization podinfo gotk delete kustomization podinfo
`, `,
RunE: deleteKsCmdRun, RunE: deleteKsCmdRun,
} }

@ -31,7 +31,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
tk delete source git podinfo gotk delete source git podinfo
`, `,
RunE: deleteSourceGitCmdRun, RunE: deleteSourceGitCmdRun,
} }

@ -31,7 +31,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
tk delete source helm podinfo gotk delete source helm podinfo
`, `,
RunE: deleteSourceHelmCmdRun, RunE: deleteSourceHelmCmdRun,
} }

@ -35,10 +35,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
tk export helmrelease --all > kustomizations.yaml gotk export helmrelease --all > kustomizations.yaml
# Export a HelmRelease # Export a HelmRelease
tk export hr my-app > app-release.yaml gotk export hr my-app > app-release.yaml
`, `,
RunE: exportHelmReleaseCmdRun, RunE: exportHelmReleaseCmdRun,
} }

@ -34,10 +34,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
tk export kustomization --all > kustomizations.yaml gotk export kustomization --all > kustomizations.yaml
# Export a Kustomization # Export a Kustomization
tk export kustomization my-app > kustomization.yaml gotk export kustomization my-app > kustomization.yaml
`, `,
RunE: exportKsCmdRun, RunE: exportKsCmdRun,
} }

@ -34,10 +34,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
tk export source git --all > sources.yaml gotk 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
tk export source git my-private-repo --with-credentials > source.yaml gotk export source git my-private-repo --with-credentials > source.yaml
`, `,
RunE: exportSourceGitCmdRun, RunE: exportSourceGitCmdRun,
} }

@ -34,10 +34,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
tk export source helm --all > sources.yaml gotk export source helm --all > sources.yaml
# Export a HelmRepository source including the basic auth credentials # Export a HelmRepository source including the basic auth credentials
tk export source helm my-private-repo --with-credentials > source.yaml gotk export source helm my-private-repo --with-credentials > source.yaml
`, `,
RunE: exportSourceHelmCmdRun, RunE: exportSourceHelmCmdRun,
} }

@ -32,7 +32,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
tk get helmreleases gotk get helmreleases
`, `,
RunE: getHelmReleaseCmdRun, RunE: getHelmReleaseCmdRun,
} }

@ -31,7 +31,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
tk get kustomizations gotk get kustomizations
`, `,
RunE: getKsCmdRun, RunE: getKsCmdRun,
} }

@ -30,7 +30,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
tk get sources git gotk get sources git
`, `,
RunE: getSourceGitCmdRun, RunE: getSourceGitCmdRun,
} }

@ -30,7 +30,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
tk get sources helm gotk get sources helm
`, `,
RunE: getSourceHelmCmdRun, RunE: getSourceHelmCmdRun,
} }

@ -39,16 +39,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 gitops-systems namespace Example: ` # Install the latest version in the gitops-systems namespace
tk install --version=latest --namespace=gitops-systems gotk install --version=latest --namespace=gitops-systems
# Dry-run install for a specific version and a series of components # Dry-run install for a specific version and a series of components
tk install --dry-run --version=v0.0.7 --components="source-controller,kustomize-controller" gotk install --dry-run --version=v0.0.7 --components="source-controller,kustomize-controller"
# Dry-run install with manifests preview # Dry-run install with manifests preview
tk install --dry-run --verbose gotk install --dry-run --verbose
# Write install manifests to file # Write install manifests to file
tk install --export > gitops-system.yaml gotk install --export > gitops-system.yaml
`, `,
RunE: installCmdRun, RunE: installCmdRun,
} }

@ -26,41 +26,41 @@ 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"
tklog "github.com/fluxcd/toolkit/pkg/log" gotklog "github.com/fluxcd/toolkit/pkg/log"
) )
var VERSION = "0.0.0-dev.0" var VERSION = "0.0.0-dev.0"
var rootCmd = &cobra.Command{ var rootCmd = &cobra.Command{
Use: "tk", Use: "gotk",
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
tk check --pre gotk check --pre
# Install the latest version of the toolkit # Install the latest version of the toolkit
tk install --version=master gotk install --version=master
# Create a source from a public Git repository # Create a source from a public Git repository
tk create source git webapp-latest \ gotk 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
tk get sources git gotk get sources git
# Trigger a GitRepository source reconciliation # Trigger a GitRepository source reconciliation
tk reconcile source git gitops-system gotk reconcile source git gitops-system
# Export GitRepository sources in YAML format # Export GitRepository sources in YAML format
tk export source git --all > sources.yaml gotk export source git --all > sources.yaml
# Create a Kustomization for deploying a series of microservices # Create a Kustomization for deploying a series of microservices
tk create kustomization webapp-dev \ gotk create kustomization webapp-dev \
--source=webapp-latest \ --source=webapp-latest \
--path="./deploy/webapp/" \ --path="./deploy/webapp/" \
--prune=true \ --prune=true \
@ -71,25 +71,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
tk reconcile kustomization webapp-dev --with-source gotk reconcile kustomization webapp-dev --with-source
# Suspend a Kustomization reconciliation # Suspend a Kustomization reconciliation
tk suspend kustomization webapp-dev gotk suspend kustomization webapp-dev
# Export Kustomizations in YAML format # Export Kustomizations in YAML format
tk export kustomization --all > kustomizations.yaml gotk export kustomization --all > kustomizations.yaml
# Resume a Kustomization reconciliation # Resume a Kustomization reconciliation
tk resume kustomization webapp-dev gotk resume kustomization webapp-dev
# Delete a Kustomization # Delete a Kustomization
tk delete kustomization webapp-dev gotk delete kustomization webapp-dev
# Delete a GitRepository source # Delete a GitRepository source
tk delete source git webapp-latest gotk delete source git webapp-latest
# Uninstall the toolkit and delete CRDs # Uninstall the toolkit and delete CRDs
tk uninstall --crds gotk uninstall --crds
`, `,
} }
@ -99,8 +99,8 @@ var (
timeout time.Duration timeout time.Duration
verbose bool verbose bool
utils Utils utils Utils
pollInterval = 2 * time.Second pollInterval = 2 * time.Second
logger tklog.Logger = printLogger{} logger gotklog.Logger = printLogger{}
) )
var ( var (

@ -37,10 +37,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
tk reconcile hr podinfo gotk 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
tk reconcile hr podinfo --with-source gotk reconcile hr podinfo --with-source
`, `,
RunE: reconcileHrCmdRun, RunE: reconcileHrCmdRun,
} }

@ -34,10 +34,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
tk reconcile kustomization podinfo gotk 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
tk reconcile kustomization podinfo --with-source gotk reconcile kustomization podinfo --with-source
`, `,
RunE: reconcileKsCmdRun, RunE: reconcileKsCmdRun,
} }

@ -31,7 +31,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
tk reconcile source git podinfo gotk reconcile source git podinfo
`, `,
RunE: syncSourceGitCmdRun, RunE: syncSourceGitCmdRun,
} }

@ -35,7 +35,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
tk reconcile source helm podinfo gotk reconcile source helm podinfo
`, `,
RunE: syncSourceHelmCmdRun, RunE: syncSourceHelmCmdRun,
} }

@ -36,7 +36,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
tk resume hr podinfo gotk resume hr podinfo
`, `,
RunE: resumeHrCmdRun, RunE: resumeHrCmdRun,
} }

@ -36,7 +36,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
tk resume ks podinfo gotk resume ks podinfo
`, `,
RunE: resumeKsCmdRun, RunE: resumeKsCmdRun,
} }

@ -32,7 +32,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
tk suspend hr podinfo gotk suspend hr podinfo
`, `,
RunE: suspendHrCmdRun, RunE: suspendHrCmdRun,
} }

@ -30,7 +30,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
tk suspend ks podinfo gotk suspend ks podinfo
`, `,
RunE: suspendKsCmdRun, RunE: suspendKsCmdRun,
} }

@ -32,10 +32,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
tk uninstall --dry-run --namespace=gitops-system gotk uninstall --dry-run --namespace=gitops-system
# Uninstall all components and delete custom resource definitions # Uninstall all components and delete custom resource definitions
tk uninstall --resources --crds --namespace=gitops-system gotk uninstall --resources --crds --namespace=gitops-system
`, `,
RunE: uninstallCmdRun, RunE: uninstallCmdRun,
} }

@ -1,4 +1,4 @@
## tk ## gotk
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
tk check --pre gotk check --pre
# Install the latest version of the toolkit # Install the latest version of the toolkit
tk install --version=master gotk install --version=master
# Create a source from a public Git repository # Create a source from a public Git repository
tk create source git webapp-latest \ gotk 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
tk get sources git gotk get sources git
# Trigger a GitRepository source reconciliation # Trigger a GitRepository source reconciliation
tk reconcile source git gitops-system gotk reconcile source git gitops-system
# Export GitRepository sources in YAML format # Export GitRepository sources in YAML format
tk export source git --all > sources.yaml gotk export source git --all > sources.yaml
# Create a Kustomization for deploying a series of microservices # Create a Kustomization for deploying a series of microservices
tk create kustomization webapp-dev \ gotk 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
tk reconcile kustomization webapp-dev --with-source gotk reconcile kustomization webapp-dev --with-source
# Suspend a Kustomization reconciliation # Suspend a Kustomization reconciliation
tk suspend kustomization webapp-dev gotk suspend kustomization webapp-dev
# Export Kustomizations in YAML format # Export Kustomizations in YAML format
tk export kustomization --all > kustomizations.yaml gotk export kustomization --all > kustomizations.yaml
# Resume a Kustomization reconciliation # Resume a Kustomization reconciliation
tk resume kustomization webapp-dev gotk resume kustomization webapp-dev
# Delete a Kustomization # Delete a Kustomization
tk delete kustomization webapp-dev gotk delete kustomization webapp-dev
# Delete a GitRepository source # Delete a GitRepository source
tk delete source git webapp-latest gotk delete source git webapp-latest
# Uninstall the toolkit and delete CRDs # Uninstall the toolkit and delete CRDs
tk uninstall --crds gotk uninstall --crds
``` ```
### Options ### Options
``` ```
-h, --help help for tk -h, --help help for gotk
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
--namespace string the namespace scope for this operation (default "gitops-system") --namespace string the namespace scope for this operation (default "gitops-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
* [tk bootstrap](tk_bootstrap.md) - Bootstrap toolkit components * [gotk bootstrap](gotk_bootstrap.md) - Bootstrap toolkit components
* [tk check](tk_check.md) - Check requirements and installation * [gotk check](gotk_check.md) - Check requirements and installation
* [tk completion](tk_completion.md) - Generates bash completion scripts * [gotk completion](gotk_completion.md) - Generates bash completion scripts
* [tk create](tk_create.md) - Create or update sources and resources * [gotk create](gotk_create.md) - Create or update sources and resources
* [tk delete](tk_delete.md) - Delete sources and resources * [gotk delete](gotk_delete.md) - Delete sources and resources
* [tk export](tk_export.md) - Export resources in YAML format * [gotk export](gotk_export.md) - Export resources in YAML format
* [tk get](tk_get.md) - Get sources and resources * [gotk get](gotk_get.md) - Get sources and resources
* [tk install](tk_install.md) - Install the toolkit components * [gotk install](gotk_install.md) - Install the toolkit components
* [tk reconcile](tk_reconcile.md) - Reconcile sources and resources * [gotk reconcile](gotk_reconcile.md) - Reconcile sources and resources
* [tk resume](tk_resume.md) - Resume suspended resources * [gotk resume](gotk_resume.md) - Resume suspended resources
* [tk suspend](tk_suspend.md) - Suspend resources * [gotk suspend](gotk_suspend.md) - Suspend resources
* [tk uninstall](tk_uninstall.md) - Uninstall the toolkit components * [gotk uninstall](gotk_uninstall.md) - Uninstall the toolkit components

@ -1,4 +1,4 @@
## tk bootstrap ## gotk bootstrap
Bootstrap toolkit components Bootstrap toolkit components
@ -27,7 +27,7 @@ The bootstrap sub-commands bootstrap the toolkit components on the targeted Git
### SEE ALSO ### SEE ALSO
* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines
* [tk bootstrap github](tk_bootstrap_github.md) - Bootstrap toolkit components in a GitHub repository * [gotk bootstrap github](gotk_bootstrap_github.md) - Bootstrap toolkit components in a GitHub repository
* [tk bootstrap gitlab](tk_bootstrap_gitlab.md) - Bootstrap toolkit components in a GitLab repository * [gotk bootstrap gitlab](gotk_bootstrap_gitlab.md) - Bootstrap toolkit components in a GitLab repository

@ -1,4 +1,4 @@
## tk bootstrap github ## gotk 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.
``` ```
tk bootstrap github [flags] gotk bootstrap github [flags]
``` ```
### Examples ### Examples
@ -21,19 +21,19 @@ tk 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
tk bootstrap github --owner=<organization> --repository=<repo name> gotk 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
tk bootstrap github --owner=<organization> --repository=<repo name> --team=<team1 slug> --team=<team2 slug> gotk 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
tk bootstrap github --owner=<organization> --repository=<repo name> --path=dev-cluster gotk 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
tk bootstrap github --owner=<user> --repository=<repo name> --private=false --personal=true gotk 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
tk bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain> gotk bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain>
``` ```
@ -66,5 +66,5 @@ tk bootstrap github [flags]
### SEE ALSO ### SEE ALSO
* [tk bootstrap](tk_bootstrap.md) - Bootstrap toolkit components * [gotk bootstrap](gotk_bootstrap.md) - Bootstrap toolkit components

@ -1,4 +1,4 @@
## tk bootstrap gitlab ## gotk 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.
``` ```
tk bootstrap gitlab [flags] gotk bootstrap gitlab [flags]
``` ```
### Examples ### Examples
@ -21,16 +21,16 @@ tk bootstrap gitlab [flags]
export GITLAB_TOKEN=<my-token> export GITLAB_TOKEN=<my-token>
# Run bootstrap for a private repo owned by a GitLab group # Run bootstrap for a private repo owned by a GitLab group
tk bootstrap gitlab --owner=<group> --repository=<repo name> gotk bootstrap gitlab --owner=<group> --repository=<repo name>
# Run bootstrap for a repository path # Run bootstrap for a repository path
tk bootstrap gitlab --owner=<group> --repository=<repo name> --path=dev-cluster gotk 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
tk bootstrap gitlab --owner=<user> --repository=<repo name> --private=false --personal=true gotk 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
tk bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain> gotk bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain>
``` ```
@ -63,5 +63,5 @@ tk bootstrap gitlab [flags]
### SEE ALSO ### SEE ALSO
* [tk bootstrap](tk_bootstrap.md) - Bootstrap toolkit components * [gotk bootstrap](gotk_bootstrap.md) - Bootstrap toolkit components

@ -1,4 +1,4 @@
## tk check ## gotk 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.
``` ```
tk check [flags] gotk check [flags]
``` ```
### Examples ### Examples
``` ```
# Run pre-installation checks # Run pre-installation checks
tk check --pre gotk check --pre
# Run installation checks # Run installation checks
tk check gotk check
``` ```
@ -41,5 +41,5 @@ tk check [flags]
### SEE ALSO ### SEE ALSO
* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines

@ -1,4 +1,4 @@
## tk completion ## gotk completion
Generates bash completion scripts Generates bash completion scripts
@ -7,7 +7,7 @@ Generates bash completion scripts
Generates bash completion scripts Generates bash completion scripts
``` ```
tk completion [flags] gotk completion [flags]
``` ```
### Examples ### Examples
@ -15,12 +15,12 @@ tk completion [flags]
``` ```
To load completion run To load completion run
. <(tk completion) . <(gotk completion)
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
. <(tk completion) . <(gotk completion)
``` ```
@ -41,5 +41,5 @@ To configure your bash shell to load completions for each session add to your ba
### SEE ALSO ### SEE ALSO
* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines

@ -1,4 +1,4 @@
## tk create ## gotk create
Create or update sources and resources Create or update sources and resources
@ -25,8 +25,8 @@ The create sub-commands generate sources and resources.
### SEE ALSO ### SEE ALSO
* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines
* [tk create helmrelease](tk_create_helmrelease.md) - Create or update a HelmRelease resource * [gotk create helmrelease](gotk_create_helmrelease.md) - Create or update a HelmRelease resource
* [tk create kustomization](tk_create_kustomization.md) - Create or update a Kustomization resource * [gotk create kustomization](gotk_create_kustomization.md) - Create or update a Kustomization resource
* [tk create source](tk_create_source.md) - Create or update sources * [gotk create source](gotk_create_source.md) - Create or update sources

@ -1,4 +1,4 @@
## tk create helmrelease ## gotk create helmrelease
Create or update a HelmRelease resource Create or update a HelmRelease resource
@ -7,14 +7,14 @@ 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.
``` ```
tk create helmrelease [name] [flags] gotk create helmrelease [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Create a HelmRelease from a source # Create a HelmRelease from a source
tk create hr podinfo \ gotk create hr podinfo \
--interval=10m \ --interval=10m \
--release-name=podinfo \ --release-name=podinfo \
--target-namespace=default \ --target-namespace=default \
@ -23,7 +23,7 @@ tk create helmrelease [name] [flags]
--chart-version=">4.0.0" --chart-version=">4.0.0"
# Create a HelmRelease with values for a local YAML file # Create a HelmRelease with values for a local YAML file
tk create hr podinfo \ gotk create hr podinfo \
--target-namespace=default \ --target-namespace=default \
--source=podinfo \ --source=podinfo \
--chart-name=podinfo \ --chart-name=podinfo \
@ -31,7 +31,7 @@ tk create helmrelease [name] [flags]
--values=./my-values.yaml --values=./my-values.yaml
# Create a HelmRelease definition on disk without applying it on the cluster # Create a HelmRelease definition on disk without applying it on the cluster
tk create hr podinfo \ gotk create hr podinfo \
--target-namespace=default \ --target-namespace=default \
--source=podinfo \ --source=podinfo \
--chart-name=podinfo \ --chart-name=podinfo \
@ -67,5 +67,5 @@ tk create helmrelease [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk create](tk_create.md) - Create or update sources and resources * [gotk create](gotk_create.md) - Create or update sources and resources

@ -1,4 +1,4 @@
## tk create kustomization ## gotk 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 GitRepository source. The kustomization source create command generates a Kustomize resource for a given GitRepository source.
``` ```
tk create kustomization [name] [flags] gotk 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
tk create kustomization contour \ gotk create kustomization contour \
--source=contour \ --source=contour \
--path="./examples/contour/" \ --path="./examples/contour/" \
--prune=true \ --prune=true \
@ -25,7 +25,7 @@ tk 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
tk create kustomization webapp \ gotk 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 @@ tk create kustomization [name] [flags]
--validation=client --validation=client
# Create a Kustomization resource that runs under a service account # Create a Kustomization resource that runs under a service account
tk create kustomization webapp \ gotk create kustomization webapp \
--source=webapp \ --source=webapp \
--path="./deploy/overlays/staging" \ --path="./deploy/overlays/staging" \
--prune=true \ --prune=true \
@ -73,5 +73,5 @@ tk create kustomization [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk create](tk_create.md) - Create or update sources and resources * [gotk create](gotk_create.md) - Create or update sources and resources

@ -1,4 +1,4 @@
## tk create source ## gotk create source
Create or update sources Create or update sources
@ -25,7 +25,7 @@ The create source sub-commands generate sources.
### SEE ALSO ### SEE ALSO
* [tk create](tk_create.md) - Create or update sources and resources * [gotk create](gotk_create.md) - Create or update sources and resources
* [tk create source git](tk_create_source_git.md) - Create or update a GitRepository source * [gotk create source git](gotk_create_source_git.md) - Create or update a GitRepository source
* [tk create source helm](tk_create_source_helm.md) - Create or update a HelmRepository source * [gotk create source helm](gotk_create_source_helm.md) - Create or update a HelmRepository source

@ -1,4 +1,4 @@
## tk create source git ## gotk 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.
``` ```
tk create source git [name] [flags] gotk 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
tk create source git podinfo \ gotk 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
tk create source git podinfo \ gotk 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
tk create source git podinfo \ gotk 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
tk create source git podinfo \ gotk 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
tk create source git podinfo \ gotk 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
tk create source git podinfo \ gotk create source git podinfo \
--url=https://github.com/stefanprodan/podinfo \ --url=https://github.com/stefanprodan/podinfo \
--username=username \ --username=username \
--password=password --password=password
@ -80,5 +80,5 @@ tk create source git [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk create source](tk_create_source.md) - Create or update sources * [gotk create source](gotk_create_source.md) - Create or update sources

@ -1,4 +1,4 @@
## tk create source helm ## gotk 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.
``` ```
tk create source helm [name] [flags] gotk create source helm [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Create a source from a public Helm repository # Create a source from a public Helm repository
tk create source helm podinfo \ gotk 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
tk create source helm podinfo \ gotk 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
tk create source helm podinfo \ gotk 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 \
@ -60,5 +60,5 @@ tk create source helm [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk create source](tk_create_source.md) - Create or update sources * [gotk create source](gotk_create_source.md) - Create or update sources

@ -1,4 +1,4 @@
## tk delete ## gotk delete
Delete sources and resources Delete sources and resources
@ -24,8 +24,8 @@ The delete sub-commands delete sources and resources.
### SEE ALSO ### SEE ALSO
* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines
* [tk delete helmrelease](tk_delete_helmrelease.md) - Delete a HelmRelease resource * [gotk delete helmrelease](gotk_delete_helmrelease.md) - Delete a HelmRelease resource
* [tk delete kustomization](tk_delete_kustomization.md) - Delete a Kustomization resource * [gotk delete kustomization](gotk_delete_kustomization.md) - Delete a Kustomization resource
* [tk delete source](tk_delete_source.md) - Delete sources * [gotk delete source](gotk_delete_source.md) - Delete sources

@ -1,4 +1,4 @@
## tk delete helmrelease ## gotk delete helmrelease
Delete a HelmRelease resource Delete a HelmRelease resource
@ -7,14 +7,14 @@ Delete a HelmRelease resource
The delete helmrelease command removes the given HelmRelease from the cluster. The delete helmrelease command removes the given HelmRelease from the cluster.
``` ```
tk delete helmrelease [name] [flags] gotk delete helmrelease [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Delete a Helm release and the Kubernetes resources created by it # Delete a Helm release and the Kubernetes resources created by it
tk delete hr podinfo gotk delete hr podinfo
``` ```
@ -36,5 +36,5 @@ tk delete helmrelease [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk delete](tk_delete.md) - Delete sources and resources * [gotk delete](gotk_delete.md) - Delete sources and resources

@ -1,4 +1,4 @@
## tk delete kustomization ## gotk delete kustomization
Delete a Kustomization resource Delete a Kustomization resource
@ -7,14 +7,14 @@ Delete a Kustomization resource
The delete kustomization command deletes the given Kustomization from the cluster. The delete kustomization command deletes the given Kustomization from the cluster.
``` ```
tk delete kustomization [name] [flags] gotk delete kustomization [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Delete a kustomization and the Kubernetes resources created by it # Delete a kustomization and the Kubernetes resources created by it
tk delete kustomization podinfo gotk delete kustomization podinfo
``` ```
@ -36,5 +36,5 @@ tk delete kustomization [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk delete](tk_delete.md) - Delete sources and resources * [gotk delete](gotk_delete.md) - Delete sources and resources

@ -1,4 +1,4 @@
## tk delete source ## gotk delete source
Delete sources Delete sources
@ -24,7 +24,7 @@ The delete source sub-commands delete sources.
### SEE ALSO ### SEE ALSO
* [tk delete](tk_delete.md) - Delete sources and resources * [gotk delete](gotk_delete.md) - Delete sources and resources
* [tk delete source git](tk_delete_source_git.md) - Delete a GitRepository source * [gotk delete source git](gotk_delete_source_git.md) - Delete a GitRepository source
* [tk delete source helm](tk_delete_source_helm.md) - Delete a HelmRepository source * [gotk delete source helm](gotk_delete_source_helm.md) - Delete a HelmRepository source

@ -1,4 +1,4 @@
## tk delete source git ## gotk delete source git
Delete a GitRepository source Delete a GitRepository source
@ -7,14 +7,14 @@ Delete a GitRepository source
The delete source git command deletes the given GitRepository from the cluster. The delete source git command deletes the given GitRepository from the cluster.
``` ```
tk delete source git [name] [flags] gotk delete source git [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Delete a Git repository # Delete a Git repository
tk delete source git podinfo gotk delete source git podinfo
``` ```
@ -36,5 +36,5 @@ tk delete source git [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk delete source](tk_delete_source.md) - Delete sources * [gotk delete source](gotk_delete_source.md) - Delete sources

@ -1,4 +1,4 @@
## tk delete source helm ## gotk delete source helm
Delete a HelmRepository source Delete a HelmRepository source
@ -7,14 +7,14 @@ Delete a HelmRepository source
The delete source helm command deletes the given HelmRepository from the cluster. The delete source helm command deletes the given HelmRepository from the cluster.
``` ```
tk delete source helm [name] [flags] gotk delete source helm [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Delete a Helm repository # Delete a Helm repository
tk delete source helm podinfo gotk delete source helm podinfo
``` ```
@ -36,5 +36,5 @@ tk delete source helm [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk delete source](tk_delete_source.md) - Delete sources * [gotk delete source](gotk_delete_source.md) - Delete sources

@ -1,4 +1,4 @@
## tk export ## gotk export
Export resources in YAML format Export resources in YAML format
@ -24,8 +24,8 @@ The export sub-commands export resources in YAML format.
### SEE ALSO ### SEE ALSO
* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines
* [tk export helmrelease](tk_export_helmrelease.md) - Export HelmRelease resources in YAML format * [gotk export helmrelease](gotk_export_helmrelease.md) - Export HelmRelease resources in YAML format
* [tk export kustomization](tk_export_kustomization.md) - Export Kustomization resources in YAML format * [gotk export kustomization](gotk_export_kustomization.md) - Export Kustomization resources in YAML format
* [tk export source](tk_export_source.md) - Export sources * [gotk export source](gotk_export_source.md) - Export sources

@ -1,4 +1,4 @@
## tk export helmrelease ## gotk export helmrelease
Export HelmRelease resources in YAML format Export HelmRelease resources in YAML format
@ -7,17 +7,17 @@ Export HelmRelease resources in YAML format
The export helmrelease command exports one or all HelmRelease resources in YAML format. The export helmrelease command exports one or all HelmRelease resources in YAML format.
``` ```
tk export helmrelease [name] [flags] gotk export helmrelease [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Export all HelmRelease resources # Export all HelmRelease resources
tk export helmrelease --all > kustomizations.yaml gotk export helmrelease --all > kustomizations.yaml
# Export a HelmRelease # Export a HelmRelease
tk export hr my-app > app-release.yaml gotk export hr my-app > app-release.yaml
``` ```
@ -39,5 +39,5 @@ tk export helmrelease [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk export](tk_export.md) - Export resources in YAML format * [gotk export](gotk_export.md) - Export resources in YAML format

@ -1,4 +1,4 @@
## tk export kustomization ## gotk export kustomization
Export Kustomization resources in YAML format Export Kustomization resources in YAML format
@ -7,17 +7,17 @@ Export Kustomization resources in YAML format
The export kustomization command exports one or all Kustomization resources in YAML format. The export kustomization command exports one or all Kustomization resources in YAML format.
``` ```
tk export kustomization [name] [flags] gotk export kustomization [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Export all Kustomization resources # Export all Kustomization resources
tk export kustomization --all > kustomizations.yaml gotk export kustomization --all > kustomizations.yaml
# Export a Kustomization # Export a Kustomization
tk export kustomization my-app > kustomization.yaml gotk export kustomization my-app > kustomization.yaml
``` ```
@ -39,5 +39,5 @@ tk export kustomization [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk export](tk_export.md) - Export resources in YAML format * [gotk export](gotk_export.md) - Export resources in YAML format

@ -1,4 +1,4 @@
## tk export source ## gotk export source
Export sources Export sources
@ -25,7 +25,7 @@ The export source sub-commands export sources in YAML format.
### SEE ALSO ### SEE ALSO
* [tk export](tk_export.md) - Export resources in YAML format * [gotk export](gotk_export.md) - Export resources in YAML format
* [tk export source git](tk_export_source_git.md) - Export GitRepository sources in YAML format * [gotk export source git](gotk_export_source_git.md) - Export GitRepository sources in YAML format
* [tk export source helm](tk_export_source_helm.md) - Export HelmRepository sources in YAML format * [gotk export source helm](gotk_export_source_helm.md) - Export HelmRepository sources in YAML format

@ -1,4 +1,4 @@
## tk export source git ## gotk export source git
Export GitRepository sources in YAML format Export GitRepository sources in YAML format
@ -7,17 +7,17 @@ Export GitRepository sources in YAML format
The export source git command exports on or all GitRepository sources in YAML format. The export source git command exports on or all GitRepository sources in YAML format.
``` ```
tk export source git [name] [flags] gotk export source git [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Export all GitRepository sources # Export all GitRepository sources
tk export source git --all > sources.yaml gotk 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
tk export source git my-private-repo --with-credentials > source.yaml gotk export source git my-private-repo --with-credentials > source.yaml
``` ```
@ -40,5 +40,5 @@ tk export source git [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk export source](tk_export_source.md) - Export sources * [gotk export source](gotk_export_source.md) - Export sources

@ -1,4 +1,4 @@
## tk export source helm ## gotk export source helm
Export HelmRepository sources in YAML format Export HelmRepository sources in YAML format
@ -7,17 +7,17 @@ Export HelmRepository sources in YAML format
The export source git command exports on or all HelmRepository sources in YAML format. The export source git command exports on or all HelmRepository sources in YAML format.
``` ```
tk export source helm [name] [flags] gotk export source helm [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Export all HelmRepository sources # Export all HelmRepository sources
tk export source helm --all > sources.yaml gotk export source helm --all > sources.yaml
# Export a HelmRepository source including the basic auth credentials # Export a HelmRepository source including the basic auth credentials
tk export source helm my-private-repo --with-credentials > source.yaml gotk export source helm my-private-repo --with-credentials > source.yaml
``` ```
@ -40,5 +40,5 @@ tk export source helm [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk export source](tk_export_source.md) - Export sources * [gotk export source](gotk_export_source.md) - Export sources

@ -1,4 +1,4 @@
## tk get ## gotk get
Get sources and resources Get sources and resources
@ -23,8 +23,8 @@ The get sub-commands print the statuses of sources and resources.
### SEE ALSO ### SEE ALSO
* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines
* [tk get helmreleases](tk_get_helmreleases.md) - Get HelmRelease statuses * [gotk get helmreleases](gotk_get_helmreleases.md) - Get HelmRelease statuses
* [tk get kustomizations](tk_get_kustomizations.md) - Get Kustomization statuses * [gotk get kustomizations](gotk_get_kustomizations.md) - Get Kustomization statuses
* [tk get sources](tk_get_sources.md) - Get source statuses * [gotk get sources](gotk_get_sources.md) - Get source statuses

@ -1,4 +1,4 @@
## tk get helmreleases ## gotk get helmreleases
Get HelmRelease statuses Get HelmRelease statuses
@ -7,14 +7,14 @@ Get HelmRelease statuses
The get helmreleases command prints the statuses of the resources. The get helmreleases command prints the statuses of the resources.
``` ```
tk get helmreleases [flags] gotk get helmreleases [flags]
``` ```
### Examples ### Examples
``` ```
# List all Helm releases and their status # List all Helm releases and their status
tk get helmreleases gotk get helmreleases
``` ```
@ -35,5 +35,5 @@ tk get helmreleases [flags]
### SEE ALSO ### SEE ALSO
* [tk get](tk_get.md) - Get sources and resources * [gotk get](gotk_get.md) - Get sources and resources

@ -1,4 +1,4 @@
## tk get kustomizations ## gotk get kustomizations
Get Kustomization statuses Get Kustomization statuses
@ -7,14 +7,14 @@ Get Kustomization statuses
The get kustomizations command prints the statuses of the resources. The get kustomizations command prints the statuses of the resources.
``` ```
tk get kustomizations [flags] gotk get kustomizations [flags]
``` ```
### Examples ### Examples
``` ```
# List all kustomizations and their status # List all kustomizations and their status
tk get kustomizations gotk get kustomizations
``` ```
@ -35,5 +35,5 @@ tk get kustomizations [flags]
### SEE ALSO ### SEE ALSO
* [tk get](tk_get.md) - Get sources and resources * [gotk get](gotk_get.md) - Get sources and resources

@ -1,4 +1,4 @@
## tk get sources ## gotk get sources
Get source statuses Get source statuses
@ -23,7 +23,7 @@ The get source sub-commands print the statuses of the sources.
### SEE ALSO ### SEE ALSO
* [tk get](tk_get.md) - Get sources and resources * [gotk get](gotk_get.md) - Get sources and resources
* [tk get sources git](tk_get_sources_git.md) - Get GitRepository source statuses * [gotk get sources git](gotk_get_sources_git.md) - Get GitRepository source statuses
* [tk get sources helm](tk_get_sources_helm.md) - Get HelmRepository source statuses * [gotk get sources helm](gotk_get_sources_helm.md) - Get HelmRepository source statuses

@ -1,4 +1,4 @@
## tk get sources git ## gotk get sources git
Get GitRepository source statuses Get GitRepository source statuses
@ -7,14 +7,14 @@ Get GitRepository source statuses
The get sources git command prints the status of the GitRepository sources. The get sources git command prints the status of the GitRepository sources.
``` ```
tk get sources git [flags] gotk get sources git [flags]
``` ```
### Examples ### Examples
``` ```
# List all Git repositories and their status # List all Git repositories and their status
tk get sources git gotk get sources git
``` ```
@ -35,5 +35,5 @@ tk get sources git [flags]
### SEE ALSO ### SEE ALSO
* [tk get sources](tk_get_sources.md) - Get source statuses * [gotk get sources](gotk_get_sources.md) - Get source statuses

@ -1,4 +1,4 @@
## tk get sources helm ## gotk get sources helm
Get HelmRepository source statuses Get HelmRepository source statuses
@ -7,14 +7,14 @@ Get HelmRepository source statuses
The get sources helm command prints the status of the HelmRepository sources. The get sources helm command prints the status of the HelmRepository sources.
``` ```
tk get sources helm [flags] gotk get sources helm [flags]
``` ```
### Examples ### Examples
``` ```
# List all Helm repositories and their status # List all Helm repositories and their status
tk get sources helm gotk get sources helm
``` ```
@ -35,5 +35,5 @@ tk get sources helm [flags]
### SEE ALSO ### SEE ALSO
* [tk get sources](tk_get_sources.md) - Get source statuses * [gotk get sources](gotk_get_sources.md) - Get source statuses

@ -1,4 +1,4 @@
## tk install ## gotk install
Install the toolkit components Install the toolkit components
@ -8,23 +8,23 @@ 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.
``` ```
tk install [flags] gotk install [flags]
``` ```
### Examples ### Examples
``` ```
# Install the latest version in the gitops-systems namespace # Install the latest version in the gitops-systems namespace
tk install --version=latest --namespace=gitops-systems gotk install --version=latest --namespace=gitops-systems
# Dry-run install for a specific version and a series of components # Dry-run install for a specific version and a series of components
tk install --dry-run --version=v0.0.7 --components="source-controller,kustomize-controller" gotk install --dry-run --version=v0.0.7 --components="source-controller,kustomize-controller"
# Dry-run install with manifests preview # Dry-run install with manifests preview
tk install --dry-run --verbose gotk install --dry-run --verbose
# Write install manifests to file # Write install manifests to file
tk install --export > gitops-system.yaml gotk install --export > gitops-system.yaml
``` ```
@ -52,5 +52,5 @@ tk install [flags]
### SEE ALSO ### SEE ALSO
* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines

@ -1,4 +1,4 @@
## tk reconcile ## gotk reconcile
Reconcile sources and resources Reconcile sources and resources
@ -23,8 +23,8 @@ The reconcile sub-commands trigger a reconciliation of sources and resources.
### SEE ALSO ### SEE ALSO
* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines
* [tk reconcile helmrelease](tk_reconcile_helmrelease.md) - Reconcile a HelmRelease resource * [gotk reconcile helmrelease](gotk_reconcile_helmrelease.md) - Reconcile a HelmRelease resource
* [tk reconcile kustomization](tk_reconcile_kustomization.md) - Reconcile a Kustomization resource * [gotk reconcile kustomization](gotk_reconcile_kustomization.md) - Reconcile a Kustomization resource
* [tk reconcile source](tk_reconcile_source.md) - Reconcile sources * [gotk reconcile source](gotk_reconcile_source.md) - Reconcile sources

@ -1,4 +1,4 @@
## tk reconcile helmrelease ## gotk reconcile helmrelease
Reconcile a HelmRelease resource Reconcile a HelmRelease resource
@ -8,17 +8,17 @@ Reconcile a HelmRelease resource
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.
``` ```
tk reconcile helmrelease [name] [flags] gotk reconcile helmrelease [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Trigger a HelmRelease apply outside of the reconciliation interval # Trigger a HelmRelease apply outside of the reconciliation interval
tk reconcile hr podinfo gotk 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
tk reconcile hr podinfo --with-source gotk reconcile hr podinfo --with-source
``` ```
@ -40,5 +40,5 @@ tk reconcile helmrelease [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk reconcile](tk_reconcile.md) - Reconcile sources and resources * [gotk reconcile](gotk_reconcile.md) - Reconcile sources and resources

@ -1,4 +1,4 @@
## tk reconcile kustomization ## gotk reconcile kustomization
Reconcile a Kustomization resource Reconcile a Kustomization resource
@ -8,17 +8,17 @@ Reconcile a Kustomization resource
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.
``` ```
tk reconcile kustomization [name] [flags] gotk reconcile kustomization [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Trigger a Kustomization apply outside of the reconciliation interval # Trigger a Kustomization apply outside of the reconciliation interval
tk reconcile kustomization podinfo gotk 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
tk reconcile kustomization podinfo --with-source gotk reconcile kustomization podinfo --with-source
``` ```
@ -40,5 +40,5 @@ tk reconcile kustomization [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk reconcile](tk_reconcile.md) - Reconcile sources and resources * [gotk reconcile](gotk_reconcile.md) - Reconcile sources and resources

@ -1,4 +1,4 @@
## tk reconcile source ## gotk reconcile source
Reconcile sources Reconcile sources
@ -23,7 +23,7 @@ The reconcile source sub-commands trigger a reconciliation of sources.
### SEE ALSO ### SEE ALSO
* [tk reconcile](tk_reconcile.md) - Reconcile sources and resources * [gotk reconcile](gotk_reconcile.md) - Reconcile sources and resources
* [tk reconcile source git](tk_reconcile_source_git.md) - Reconcile a GitRepository source * [gotk reconcile source git](gotk_reconcile_source_git.md) - Reconcile a GitRepository source
* [tk reconcile source helm](tk_reconcile_source_helm.md) - Reconcile a HelmRepository source * [gotk reconcile source helm](gotk_reconcile_source_helm.md) - Reconcile a HelmRepository source

@ -1,4 +1,4 @@
## tk reconcile source git ## gotk reconcile source git
Reconcile a GitRepository source Reconcile a GitRepository source
@ -7,14 +7,14 @@ Reconcile a GitRepository source
The reconcile source command triggers a reconciliation of a GitRepository resource and waits for it to finish. The reconcile source command triggers a reconciliation of a GitRepository resource and waits for it to finish.
``` ```
tk reconcile source git [name] [flags] gotk reconcile source git [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Trigger a git pull for an existing source # Trigger a git pull for an existing source
tk reconcile source git podinfo gotk reconcile source git podinfo
``` ```
@ -35,5 +35,5 @@ tk reconcile source git [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk reconcile source](tk_reconcile_source.md) - Reconcile sources * [gotk reconcile source](gotk_reconcile_source.md) - Reconcile sources

@ -1,4 +1,4 @@
## tk reconcile source helm ## gotk reconcile source helm
Reconcile a HelmRepository source Reconcile a HelmRepository source
@ -7,14 +7,14 @@ Reconcile a HelmRepository source
The reconcile source command triggers a reconciliation of a HelmRepository resource and waits for it to finish. The reconcile source command triggers a reconciliation of a HelmRepository resource and waits for it to finish.
``` ```
tk reconcile source helm [name] [flags] gotk reconcile source helm [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Trigger a reconciliation for an existing source # Trigger a reconciliation for an existing source
tk reconcile source helm podinfo gotk reconcile source helm podinfo
``` ```
@ -35,5 +35,5 @@ tk reconcile source helm [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk reconcile source](tk_reconcile_source.md) - Reconcile sources * [gotk reconcile source](gotk_reconcile_source.md) - Reconcile sources

@ -1,4 +1,4 @@
## tk resume ## gotk resume
Resume suspended resources Resume suspended resources
@ -23,7 +23,7 @@ The resume sub-commands resume a suspended resource.
### SEE ALSO ### SEE ALSO
* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines
* [tk resume helmrelease](tk_resume_helmrelease.md) - Resume a suspended HelmRelease * [gotk resume helmrelease](gotk_resume_helmrelease.md) - Resume a suspended HelmRelease
* [tk resume kustomization](tk_resume_kustomization.md) - Resume a suspended Kustomization * [gotk resume kustomization](gotk_resume_kustomization.md) - Resume a suspended Kustomization

@ -1,4 +1,4 @@
## tk resume helmrelease ## gotk resume helmrelease
Resume a suspended HelmRelease Resume a suspended HelmRelease
@ -8,14 +8,14 @@ The resume command marks a previously suspended HelmRelease resource for reconci
finish the apply. finish the apply.
``` ```
tk resume helmrelease [name] [flags] gotk resume helmrelease [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Resume reconciliation for an existing Helm release # Resume reconciliation for an existing Helm release
tk resume hr podinfo gotk resume hr podinfo
``` ```
@ -36,5 +36,5 @@ tk resume helmrelease [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk resume](tk_resume.md) - Resume suspended resources * [gotk resume](gotk_resume.md) - Resume suspended resources

@ -1,4 +1,4 @@
## tk resume kustomization ## gotk resume kustomization
Resume a suspended Kustomization Resume a suspended Kustomization
@ -8,14 +8,14 @@ The resume command marks a previously suspended Kustomization resource for recon
finish the apply. finish the apply.
``` ```
tk resume kustomization [name] [flags] gotk resume kustomization [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Resume reconciliation for an existing Kustomization # Resume reconciliation for an existing Kustomization
tk resume ks podinfo gotk resume ks podinfo
``` ```
@ -36,5 +36,5 @@ tk resume kustomization [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk resume](tk_resume.md) - Resume suspended resources * [gotk resume](gotk_resume.md) - Resume suspended resources

@ -1,4 +1,4 @@
## tk suspend ## gotk suspend
Suspend resources Suspend resources
@ -23,7 +23,7 @@ The suspend sub-commands suspend the reconciliation of a resource.
### SEE ALSO ### SEE ALSO
* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines
* [tk suspend helmrelease](tk_suspend_helmrelease.md) - Suspend reconciliation of HelmRelease * [gotk suspend helmrelease](gotk_suspend_helmrelease.md) - Suspend reconciliation of HelmRelease
* [tk suspend kustomization](tk_suspend_kustomization.md) - Suspend reconciliation of Kustomization * [gotk suspend kustomization](gotk_suspend_kustomization.md) - Suspend reconciliation of Kustomization

@ -1,4 +1,4 @@
## tk suspend helmrelease ## gotk suspend helmrelease
Suspend reconciliation of HelmRelease Suspend reconciliation of HelmRelease
@ -7,14 +7,14 @@ Suspend reconciliation of HelmRelease
The suspend command disables the reconciliation of a HelmRelease resource. The suspend command disables the reconciliation of a HelmRelease resource.
``` ```
tk suspend helmrelease [name] [flags] gotk suspend helmrelease [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Suspend reconciliation for an existing Helm release # Suspend reconciliation for an existing Helm release
tk suspend hr podinfo gotk suspend hr podinfo
``` ```
@ -35,5 +35,5 @@ tk suspend helmrelease [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk suspend](tk_suspend.md) - Suspend resources * [gotk suspend](gotk_suspend.md) - Suspend resources

@ -1,4 +1,4 @@
## tk suspend kustomization ## gotk suspend kustomization
Suspend reconciliation of Kustomization Suspend reconciliation of Kustomization
@ -7,14 +7,14 @@ Suspend reconciliation of Kustomization
The suspend command disables the reconciliation of a Kustomization resource. The suspend command disables the reconciliation of a Kustomization resource.
``` ```
tk suspend kustomization [name] [flags] gotk suspend kustomization [name] [flags]
``` ```
### Examples ### Examples
``` ```
# Suspend reconciliation for an existing Kustomization # Suspend reconciliation for an existing Kustomization
tk suspend ks podinfo gotk suspend ks podinfo
``` ```
@ -35,5 +35,5 @@ tk suspend kustomization [name] [flags]
### SEE ALSO ### SEE ALSO
* [tk suspend](tk_suspend.md) - Suspend resources * [gotk suspend](gotk_suspend.md) - Suspend resources

@ -1,4 +1,4 @@
## tk uninstall ## gotk uninstall
Uninstall the toolkit components Uninstall the toolkit components
@ -7,17 +7,17 @@ Uninstall the toolkit components
The uninstall command removes the namespace, cluster roles, cluster role bindings and CRDs from the cluster. The uninstall command removes the namespace, cluster roles, cluster role bindings and CRDs from the cluster.
``` ```
tk uninstall [flags] gotk uninstall [flags]
``` ```
### Examples ### Examples
``` ```
# Dry-run uninstall of all components # Dry-run uninstall of all components
tk uninstall --dry-run --namespace=gitops-system gotk uninstall --dry-run --namespace=gitops-system
# Uninstall all components and delete custom resource definitions # Uninstall all components and delete custom resource definitions
tk uninstall --resources --crds --namespace=gitops-system gotk uninstall --resources --crds --namespace=gitops-system
``` ```
@ -42,5 +42,5 @@ tk uninstall [flags]
### SEE ALSO ### SEE ALSO
* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [gotk](gotk.md) - Command line utility for assembling Kubernetes CD pipelines

@ -34,13 +34,13 @@ curl -s https://toolkit.fluxcd.io/install.sh | sudo bash
Verify that your dev machine satisfies the prerequisites with: Verify that your dev machine satisfies the prerequisites with:
```sh ```sh
tk check --pre gotk check --pre
``` ```
Install the toolkit controllers on the dev cluster: Install the toolkit controllers on the dev cluster:
```sh ```sh
tk install gotk install
``` ```
## Clone the sample controller ## Clone the sample controller
@ -84,7 +84,7 @@ make run
Create a Git source: Create a Git source:
```sh ```sh
tk create source git test \ gotk create source git test \
--url=https://github.com/stefanprodan/podinfo \ --url=https://github.com/stefanprodan/podinfo \
--tag=4.0.0 --tag=4.0.0
``` ```
@ -100,7 +100,7 @@ Processing files...
Change the Git tag: Change the Git tag:
```sh ```sh
tk create source git test \ gotk create source git test \
--url=https://github.com/stefanprodan/podinfo \ --url=https://github.com/stefanprodan/podinfo \
--tag=4.0.1 --tag=4.0.1
``` ```

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Before

Width:  |  Height:  |  Size: 289 KiB

After

Width:  |  Height:  |  Size: 289 KiB

@ -6,7 +6,7 @@
Flux v1 is a monolithic do-it-all operator; the GitOps Toolkit separates the functionalities into specialized controllers. Flux v1 is a monolithic do-it-all operator; the GitOps Toolkit separates the functionalities into specialized controllers.
Flux v2 will be a curated configuration of the GitOps Toolkit, which you can install and operate simply using the `tk` command. You can easily pick and choose the functionality you need and extend it to serve your own purposes. Flux v2 will be a curated configuration of the GitOps Toolkit, which you can install and operate simply using the `gotk` command. You can easily pick and choose the functionality you need and extend it to serve your own purposes.
The timeline we are looking at right now is: The timeline we are looking at right now is:

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save