Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Honour KUBECONFIG environment variable #63

Merged
merged 2 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmd/tk/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ func kubeconfigFlag() {
rootCmd.PersistentFlags().StringVarP(&kubeconfig, "kubeconfig", "", "",
"absolute path to the kubeconfig file")
}

if len(os.Getenv("KUBECONFIG")) > 0 {
kubeconfig = os.Getenv("KUBECONFIG")
}
}

func generateDocs() {
Expand Down
23 changes: 21 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ site_description: Documentation for GitOps Toolkit.
site_author: The Flux CD contributors
site_url: https://fluxcd.github.io/toolkit/

# Repository
repo_name: fluxcd/toolkit
repo_url: https://github.com/fluxcd/toolkit
edit_uri: ""
Expand Down Expand Up @@ -48,14 +47,34 @@ nav:
- Kustomization CRD: components/kustomize/kustomization.md
- Kustomize API Reference: components/kustomize/api.md
- Toolkit CLI:
- Overview: cmd/tk.md
- Bootstrap: cmd/tk_bootstrap.md
- Bootstrap github: cmd/tk_bootstrap_github.md
- Bootstrap gitlab: cmd/tk_bootstrap_gitlab.md
- Check: cmd/tk_check.md
- Create: cmd/tk_create.md
- Create kustomization: cmd/tk_create_kustomization.md
- Create source: cmd/tk_create_source.md
- Create source git: cmd/tk_create_source_git.md
- Delete: cmd/tk_delete.md
- Delete kustomization: cmd/tk_delete_kustomization.md
- Delete source: cmd/tk_delete_source.md
- Delete source git: cmd/tk_delete_source_git.md
- Export: cmd/tk_export.md
- Export kustomization: cmd/tk_export_kustomization.md
- Export source: cmd/tk_export_source.md
- Export source git: cmd/tk_export_source_git.md
- Get: cmd/tk_get.md
- Get kustomizations: cmd/tk_get_kustomizations.md
- Get sources: cmd/tk_get_sources.md
- Get sources git: cmd/tk_get_sources_git.md
- Install: cmd/tk_install.md
- Resume: cmd/tk_resume.md
- Resume kustomization: cmd/tk_resume_kustomization.md
- Suspend: cmd/tk_suspend.md
- Synchronize: cmd/tk_sync.md
- Suspend kustomization: cmd/tk_suspend_kustomization.md
- Sync: cmd/tk_sync.md
- Sync kustomization: cmd/tk_sync_kustomization.md
- Sync source: cmd/tk_sync_source.md
- Sync source git: cmd/tk_sync_source_git.md
- Uninstall: cmd/tk_uninstall.md